Wx-0.9923/000775000000000000 012316265016 10403 5ustar00Mark000000000000Wx-0.9923/build/000775000000000000 012316265010 11474 5ustar00Mark000000000000Wx-0.9923/build/Wx/000775000000000000 012316265011 12073 5ustar00Mark000000000000Wx-0.9923/build/Wx/build/000775000000000000 012316265011 13172 5ustar00Mark000000000000Wx-0.9923/build/Wx/build/MakeMaker/000775000000000000 012316265011 15027 5ustar00Mark000000000000Wx-0.9923/build/Wx/build/MakeMaker/Any_OS.pm000664000000000000 2026312306612233 16621 0ustar00Mark000000000000package Wx::build::MakeMaker::Any_OS; use strict; use base 'Wx::build::MakeMaker'; use File::Spec::Functions qw(curdir); use Wx::build::Options; use Wx::build::Utils qw(xs_dependencies lib_file); my $exp = lib_file( 'Wx/Wx_Exp.pm' ); my @generated_xs = qw(XS/ItemContainer.xs XS/ItemContainerImmutable.xs XS/VarScrollHelperBase.xs XS/VarVScrollHelper.xs XS/VarHScrollHelper.xs XS/VarHVScrollHelper.xs); sub get_flags { my $this = shift; my %config; if( %Wx::build::MakeMaker::additional_arguments ) { $config{WX}{lc $_} = $Wx::build::MakeMaker::additional_arguments{$_} foreach keys %Wx::build::MakeMaker::additional_arguments; $ExtUtils::MakeMaker::Recognized_Att_Keys{WX} = 1; %Wx::build::MakeMaker::additional_arguments = (); } if( $config{WX}{wx_overload} ) { $_ = File::Spec->catfile( split /\//, $_ ) foreach values %{$config{WX}{wx_overload}}; } $config{INC} .= '-I' . curdir . ' '; $config{INC} .= '-I' . $this->get_api_directory . ' '; unless( $this->_core ) { $config{DEFINE} .= " -DWXPL_EXT "; } if( $this->_static ) { $config{DEFINE} .= " -DWXPL_STATIC "; } return %config; } sub metafile_target_ext { return '' if Wx::build::MakeMaker::is_wxPerl_tree; return shift->MM::metafile_target( @_ ); } sub metafile_target_core { return shift->MM::metafile_target( @_ ); } sub configure_core { my $this = shift; my %config = $this->get_flags; $config{clean} = { FILES => "$config{WX}{wx_overload}{source}" . " $config{WX}{wx_overload}{header} Opt" . " files.lst cpp/setup.h cpp/v_cback_def.h" . " " . join( " ", @generated_xs ) . " overload.lst xspp wxt_*" }; return %config; } sub configure_ext { my $this = shift; my %config = $this->get_flags; my( $ovlc, $ovlh ) = $config{WX}{wx_overload} ? @{$config{WX}{wx_overload}}{qw(source header)} : (); if( $ovlc && $ovlh ) { $config{clean} = { FILES => "$config{WX}{wx_overload}{source}" . " $config{WX}{wx_overload}{header} wxt_overload" }; } $config{clean}{FILES} .= " xspp"; return %config; } sub files_with_constants { my( $this ) = @_; return @{$this->{wx_files_with_constants}} if $this->{wx_files_with_constants}; return @{$this->{wx_files_with_constants} = [ Wx::build::Utils::files_with_constants ]}; } sub files_with_overload { my( $this ) = @_; return @{$this->{wx_files_with_overload}} if $this->{wx_files_with_overload}; return @{$this->{wx_files_with_overload} = [ Wx::build::Utils::files_with_overload ]}; } sub _depend_common { my $this = shift; my $top_file = $this->{WX}{wx_top} || $this->{ARGS}{VERSION_FROM} || $this->{ARGS}{ABSTRACT_FROM} || 'Wx.pm'; my( $ovlc, $ovlh ) = $this->{WX}{wx_overload} ? @{$this->{WX}{wx_overload}}{qw(source header)} : (); return ( xs_dependencies( $this, [ curdir, $this->get_api_directory ], Wx::build::Utils::src_dir( $top_file ) ), # overload ( $ovlc && $ovlh ? ( $ovlc => 'wxt_overload', $ovlh => $ovlc, ) : ( ) ), ); } sub depend_core { my $this = shift; my %files = $this->files_to_install(); my %depend = ( _depend_common( $this ), $exp => join( ' ', $this->files_with_constants, ), 'wxt_fix_alien' => 'pm_to_blib', 'pm_to_blib' => 'wxt_copy_files', 'blibdirs' => 'wxt_copy_files', 'blibdirs.ts' => 'wxt_copy_files', 'wxt_copy_files' => join( ' ', keys %files ), ); my %this_depend = @_; foreach ( keys %depend ) { $this_depend{$_} .= ' ' . $depend{$_}; } $this->SUPER::depend_core( %this_depend ); } sub depend_ext { my $this = shift; my %depend = _depend_common( $this ); my %this_depend = @_; foreach ( keys %depend ) { $this_depend{$_} .= ' ' . $depend{$_}; } $this->SUPER::depend_ext( %this_depend ); } sub subdirs_core { my $this = shift; my $text = $this->SUPER::subdirs_core( @_ ); return <SUPER::subdirs_core( @_ ); return ( $this->{WX}{wx_overload} ? <files_with_overload ); } my $ovl_script = Wx::build::MakeMaker::is_wxPerl_tree() ? 'script/wxperl_overload' : "-S wxperl_overload"; my( $ovlc, $ovlh ) = $this->{WX}{wx_overload} ? @{$this->{WX}{wx_overload}}{qw(source header)} : (); return ( $this->{WX}{wx_overload} ? <files_to_install(); # not all the dependencies added in Utils.pm for Wx_Exp.pm are # strictly necessary, but it's better to keep them in case the # dependencies here are changed require Data::Dumper; Wx::build::Utils::write_string( 'files.lst', Data::Dumper->Dump( [ \%files ] ) ); # $exp and fix_alien depend on wxt_copy_files to ensure that blib/lib/Wx # has been created my $text = <postamble_overload; $exp : wxt_copy_files wxt_binary_\$(LINKTYPE) \t\$(PERL) script/make_exp_list.pl $exp @{[$this->files_with_constants]} xspp/*.h ext/*/xspp/*.h \$(LINKTYPE) :: wxt_fix_alien $exp wxt_binary_static : \$(INST_STATIC) \$(NOECHO) \$(TOUCH) wxt_binary_static wxt_binary_dynamic : \$(INST_DYNAMIC) \$(NOECHO) \$(TOUCH) wxt_binary_dynamic wxt_copy_files : \t\$(PERL) script/copy_files.pl files.lst \t\$(TOUCH) wxt_copy_files wxt_fix_alien : wxt_copy_files lib/Wx/Mini.pm \t\$(PERL) script/fix_alien_path.pl lib/Wx/Mini.pm blib/lib/Wx/Mini.pm \t\$(TOUCH) wxt_fix_alien parser : yapp -v -s -m Wx::XSP::Grammar -o build/Wx/XSP/Grammar.pm build/Wx/XSP/XSP.yp typemap : typemap.tmpl script/make_typemap.pl \$(PERL) script/make_typemap.pl typemap.tmpl typemap cpp/v_cback_def.h : script/make_v_cback.pl \$(PERL) script/make_v_cback.pl > cpp/v_cback_def.h EOT foreach my $f ( @generated_xs ) { my $file = File::Spec->canonpath( $f ); $text .= sprintf < %s EOT } $text .= sprintf <postamble_overload; } # here because File::Find::find chdirs, and our is_core is, # er, quite limited sub libscan_ext { my( $this, $inst ) = @_; $inst =~ s/(\W+)build\W+Wx/$1Wx/i && return $inst; return $this->SUPER::libscan_core( $inst ); } sub constants_core { my $this = shift; foreach my $k ( grep { m/~$/ } keys %{$this->{PM}} ) { delete $this->{PM}{$k}; } return $this->SUPER::constants_core( @_ ); } # returns an hash of files to be copied sub files_to_install { my @api = qw(cpp/chkconfig.h cpp/compat.h cpp/constants.h cpp/event.h cpp/e_cback.h cpp/helpers.h cpp/overload.h cpp/setup.h cpp/streams.h cpp/v_cback.h cpp/v_cback_def.h cpp/wxapi.h typemap ); # in arch, so $INC{'Opt.pm'} will tell where arch is return ( 'Opt', Wx::build::Utils::arch_file( 'Wx/build/Opt.pm' ), ( map { ( $_ => Wx::build::Utils::lib_file( "Wx/$_" ) ) } @api ), ); } sub manifypods_core { my( $self ) = @_; s{([\\/])build::}{$1} foreach values %{$self->{MAN3PODS}}; return $self->SUPER::manifypods_core; } 1; # local variables: # mode: cperl # end: Wx-0.9923/build/Wx/build/MakeMaker/Any_wx_config.pm000664000000000000 256312306612233 20246 0ustar00Mark000000000000package Wx::build::MakeMaker::Any_wx_config; use strict; use base 'Wx::build::MakeMaker::Any_OS'; use Wx::build::MakeMaker::Hacks 'hijack'; require ExtUtils::Liblist; my $save = hijack( 'MM', 'ext', \&my_ext ); sub my_ext { my $this = shift; my $libs = shift; my $full; if( $libs =~ m{(?:\s+|^)(/\S+)} ) { $full = $1; $libs =~ s{(?:\s+|^)/\S+}{}g } my @libs = &{$save}( $this, $libs, @_ ); if( defined $full ) { $libs[0] = "$libs[0] $full $libs[0]" if $libs[0]; $libs[2] = "$libs[2] $full $libs[2]" if $libs[2]; } return @libs; } sub get_flags { my $this = shift; my %config = $this->SUPER::get_flags; $config{CC} = $ENV{CXX} || Alien::wxWidgets->compiler; $config{LD} = $ENV{CXX} || Alien::wxWidgets->linker; # used to be CCFLAGS, but overrode CCFLAGS from MakeMaker $config{CC} .= ' ' . Alien::wxWidgets->c_flags . ' '; $config{dynamic_lib}{OTHERLDFLAGS} .= Alien::wxWidgets->link_flags . ' '; $config{DEFINE} .= Alien::wxWidgets->defines . ' '; $config{INC} .= Alien::wxWidgets->include_path; if( $this->_debug ) { $config{OPTIMIZE} = ' '; } return %config; } sub const_config { my $text = shift->SUPER::const_config( @_ ); $text =~ s{^(LD(?:DL)?FLAGS\s*=.*?)-L/usr/local/lib64/?}{$1}mg; $text =~ s{^(LD(?:DL)?FLAGS\s*=.*?)-L/usr/local/lib/?}{$1}mg; return $text; } 1; # local variables: # mode: cperl # end: Wx-0.9923/build/Wx/build/MakeMaker/Core.pm000664000000000000 1006412306612233 16357 0ustar00Mark000000000000package Wx::build::MakeMaker::Core::Dummy; # to avoid W::b::MM clobbering our wxWriteMakefile use Wx::build::MakeMaker; package Wx::build::MakeMaker::Core; use strict; use ExtUtils::MakeMaker; use Wx::build::Utils qw'obj_from_src'; use Wx::build::Options; use File::Path 'mkpath'; use base 'Exporter'; use vars qw(@EXPORT @subdirs); @EXPORT = 'wxWriteMakefile'; my @top_level_xs = qw(Wx.xs Constant.xs Controls.xs Event.xs Frames.xs GDI.xs Window.xs); @subdirs = qw(socket dnd filesys grid help html mdi print xrc stc docview calendar datetime media richtext aui dataview propgrid ribbon webview test ipc ); my %subdirs; Wx::build::MakeMaker::_set_is_wxPerl_tree( 1 ); eval { require Alien::wxWidgets }; our $has_alien = $@ ? 0 : 1; my %options = Wx::build::Options->get_makemaker_options if $has_alien; if( $has_alien ) { @subdirs{@subdirs} = (1) x @subdirs; my %opt = %{$options{subdirs}}; @subdirs{keys %opt} = values %opt; @subdirs = grep { $subdirs{$_} } keys %subdirs; # installed versions of Alien may not contain # propgrid, ribbon webview in config so we # cannot build non-monolithic my $alienconfig = Alien::wxWidgets->config; if( exists($alienconfig->{build}) && $alienconfig->{build} eq 'multi' ) { my @alienkeys = grep { /^(propgrid|ribbon|webview)/ } ( Alien::wxWidgets->library_keys ); for my $d ( qw( propgrid ribbon webview ) ) { if(exists($subdirs{$d})) { # check if alien has keys if( grep { /^$d/ } @alienkeys ) { $subdirs{$d} = 1; } else { $subdirs{$d} = 0; } } } } } # # make symlinks to the source tree # if( $options{mksymlinks} ) { require FindBin; require ExtUtils::Manifest; require File::Spec::Functions; local *catfile = \&File::Spec::Functions::catfile; local *splitpath = \&File::Spec::Functions::splitpath; my $manifest = MM->catfile( $FindBin::RealBin, 'MANIFEST' ); die "Can't find MANIFEST" unless -e $manifest; my $files = ExtUtils::Manifest::maniread( $manifest ); foreach my $f ( keys %$files ) { my( $fr, $to ) = ( catfile( $FindBin::RealBin, $f ), $f ); my $dir; ( undef, $dir, undef ) = splitpath( $to ); mkpath( $dir ) if length $dir && !-d $dir; next if -l $to; if( -e $to ){ unlink $to or die "unlink '$to' failed: $!" } symlink( $fr, $to ) or die "symlink '$fr' => '$to' failed: $!"; } } # # write cpp/setup.h # if( $has_alien ) { unless( -d 'cpp' ) { mkpath( 'cpp' ) or die "mkpath 'cpp': $!"; } local *OUT; open OUT, "> cpp/setup.h" or die "open 'cpp/setup.h': $!"; print OUT <write_config_file( 'Opt' ) if $has_alien; # # WriteMakefile wrapper # sub wxWriteMakefile { my %params = @_; local $Wx::build::MakeMaker::is_core = 1; if( $has_alien ) { $params{XSOPT} = ' -nolinenumbers -noprototypes '; $params{CONFIGURE} = \&Wx::build::MakeMaker::configure; $params{OBJECT} = join ' ', obj_from_src( @top_level_xs ), ''; } my $build = Wx::build::MakeMaker::_process_mm_arguments( \%params, $has_alien ); my $minwidgets = 2.007001; if( $build ) { WriteMakefile( %params ); unless( Alien::wxWidgets->can( 'load' ) && (Alien::wxWidgets->version >= $minwidgets) ) { print <> alien_wxwidgets_missing"; print $fh "touched"; sleep 3; } } else { ExtUtils::MakeMaker::WriteEmptyMakefile( %params ); } } 1; # local variables: # mode: cperl # end: Wx-0.9923/build/Wx/build/MakeMaker/Hacks.pm000664000000000000 147612306612233 16507 0ustar00Mark000000000000package Wx::build::MakeMaker::Hacks; use strict; use base 'Exporter'; use vars '@EXPORT_OK'; @EXPORT_OK = qw(hijack); sub _find_name($$) { my( $package, $method ) = @_; no strict 'refs'; return $package if defined &{"${package}::${method}"}; my @isa = @{$package . '::ISA'}; use strict 'refs'; foreach my $i ( @isa ) { my $p = &_find_name( $i, $method ); return $p if $p; } return; } sub hijack($$$) { my( $obj, $method, $replace ) = @_; my $spackage = ref( $obj ) || $obj; my $rpackage = _find_name( $spackage, $method ); die "Can't hijack method '$method' from package '$spackage'", unless $rpackage; my $fqn = "${rpackage}::$method"; no strict 'refs'; my $save = \&{$fqn}; undef *{$fqn}; *{$fqn} = $replace; return $save; } 1; # local variables: # mode: cperl # end: Wx-0.9923/build/Wx/build/MakeMaker/MacOSX_GCC.pm000664000000000000 646212306612233 17224 0ustar00Mark000000000000package Wx::build::MakeMaker::MacOSX_GCC; use strict; use base 'Wx::build::MakeMaker::Any_wx_config'; use Wx::build::Utils qw(write_string); use Config; die "Please set MACOSX_DEPLOYMENT_TARGET to 10.3 or above" if $ENV{MACOSX_DEPLOYMENT_TARGET} && $ENV{MACOSX_DEPLOYMENT_TARGET} < 10.3; my $tools43 = '/Applications/Xcode.app/Contents/Developer/Tools'; my $restoolpath = ( -d $tools43 ) ? $tools43 : '/Developer/Tools'; sub configure_core { my $this = shift; my %config = $this->SUPER::configure_core( @_ ); $config{depend}{'$(INST_STATIC)'} .= ' wxPerl'; $config{depend}{'$(INST_DYNAMIC)'} .= ' wxPerl'; $config{clean}{FILES} .= " wxPerl cpp/wxPerl.osx/build cpp/wxPerl.osx/wxPerl.c cpp/wxPerl.osx/wxPerl.r"; $config{dynamic_lib}{OTHERLDFLAGS} .= ' -framework ApplicationServices '; if( $Config{ptrsize} == 8 && Alien::wxWidgets->version < 2.009 ) { print <SUPER::const_config( @_ ); $text =~ s{^([A-Z_]+FLAGS\s*=.*?)-nostdinc?}{$1}mg; return $text; } sub install_core { my $this = shift; my $text = $this->SUPER::install_core( @_ ); $text =~ m/^(install\s*:+)/m and $text .= "\n\n$1 install_wxperl\n\n"; return $text; } sub postamble_core { my $this = shift; my $text = $this->SUPER::postamble_core( @_ ); my $wx_config = $ENV{WX_CONFIG} || 'wx-config'; my $rfile; return '' unless $Wx::build::MakeMaker::Core::has_alien; if( $Wx::build::MakeMaker::Core::has_alien && Alien::wxWidgets->version < 2.006 ) { my $rsrc = join ' ', grep { /wx/ } split ' ', `$wx_config --rezflags`; $rfile = sprintf <' > cpp/wxPerl.osx/wxPerl.r cat %s >> cpp/wxPerl.osx/wxPerl.r EOR } else { $rfile = <' > cpp/wxPerl.osx/wxPerl.r EOE } my $arch = $this->{INSTALLSITEARCH}; $arch =~ s/\$\(SITEPREFIX\)/$this->{PREFIX}/e; $arch =~ s/\$\(INSTALL_BASE\)/$this->{INSTALL_BASE}/e; write_string( 'cpp/wxPerl.osx/wxPerl.c', sprintf < #include #include int main( int argc, char **argv ) { argv[0] = "%s/auto/Wx/wxPerl.app/Contents/MacOS/wxPerl"; execv( argv[0], argv ); perror( "wxPerl: execv" ); exit( 1 ); } EOT my $arch_flags = join ' ', ( Alien::wxWidgets->c_flags =~ /(^|\s)(-arch\s+\w+)/g ); $text .= sprintf <<'EOT', $rfile, $restoolpath, $arch_flags, $arch_flags; wxPerl : Makefile %s cd cpp/wxPerl.osx && make RESTOOLDIR='%s' ARCH_FLAGS='%s' cp -p $(PERL) `find cpp -name wxPerl.app`/Contents/MacOS/wxPerl mkdir -p $(INST_ARCHLIB)/auto/Wx cp -rp `find cpp -name wxPerl.app` $(INST_ARCHLIB)/auto/Wx $(CC) %s cpp/wxPerl.osx/wxPerl.c -o wxPerl install_wxperl : mkdir -p $(DESTINSTALLBIN) cp -p wxPerl $(DESTINSTALLBIN) EOT return $text; } 1; # local variables: # mode: cperl # end: Wx-0.9923/build/Wx/build/MakeMaker/Win32.pm000664000000000000 423112306612233 16350 0ustar00Mark000000000000package Wx::build::MakeMaker::Win32; use strict; use base 'Wx::build::MakeMaker::Any_OS'; use Wx::build::Utils; use Config; sub is_mingw() { $Config{cc} =~ /gcc/ } sub is_msvc() { $Config{cc} =~ /cl/ } sub get_flags { my $this = shift; my %config = $this->SUPER::get_flags; $config{CC} = Alien::wxWidgets->compiler; $config{LD} = Alien::wxWidgets->linker; # used to be CCFLAGS, but overrode CCFLAGS from MakeMaker $config{CC} .= ' ' . Alien::wxWidgets->c_flags . ' '; # $config{dynamic_lib}{OTHERLDFLAGS} = Alien::wxWidgets->link_flags; $config{clean}{FILES} .= is_mingw ? ' dll.base dll.exp ' :' *.pdb *.pdb *_def.old '; $config{DEFINE} .= Alien::wxWidgets->defines . ' '; $config{INC} .= Alien::wxWidgets->include_path; if( $this->_debug ) { $config{OPTIMIZE} = ' '; } if( is_mingw() ) { # add $MINGWDIR/lib to lib search path, to stop perl from complaining... my $path = Wx::build::Utils::path_search( 'gcc.exe' ) or warn "Unable to find gcc"; $path =~ s{bin[\\/]gcc\.exe$}{}i; $config{LIBS} = "-L${path}lib " . ( $config{LIBS} || '' ); } else { $config{DEFINE} .= '-D_CRT_SECURE_NO_DEPRECATE '; } return %config; } sub configure_core { my $this = shift; my %config = $this->SUPER::configure_core( @_ ); my $res = $this->_res_file; $config{depend} = { $res => 'Wx.rc ' }; $config{LDFROM} .= "\$(OBJECT) $res "; $config{dynamic_lib}{INST_DYNAMIC_DEP} .= " $res"; $config{clean}{FILES} .= " $res Wx_def.old"; return %config; } sub postamble_core { my $this = shift; my $text = $this->SUPER::postamble_core( @_ ); return $text unless $Wx::build::MakeMaker::Core::has_alien; my $wxdir = Alien::wxWidgets->wx_base_directory; my $command = $this->_res_command; my $res_file = $this->_res_file; $command =~ s/%incdir/$wxdir\\include/; $command =~ s/%src/Wx.rc/; $command =~ s/%dest/$res_file/; my $strip = $this->_strip_command; $text .= sprintf <<'EOT', $res_file, $command, $strip, $^X; %s : Wx.rc %s # for compatibility ppmdist : ppm ppm : pure_all %s %s script/make_ppm.pl EOT } 1; # local variables: # mode: cperl # end: Wx-0.9923/build/Wx/build/MakeMaker/Win32_MinGW.pm000664000000000000 255112306612233 17414 0ustar00Mark000000000000package Wx::build::MakeMaker::Win32_MinGW; use strict; use Wx::build::Utils qw(path_search); use base 'Wx::build::MakeMaker::Win32'; use Config; sub _res_file { 'Wx_res.o' } sub _res_command { # specify windres target for xcompilers my $format = ( $Config{ptrsize} == 8 ) ? 'pe-x86-64' : 'pe-i386'; # for info, this is the pe format minus mz headers which is what you # want for object files. Exectuables and dlls get 'pei-x86-64' or 'pei-i386'. return qq(windres --target $format ) . '--include-dir %incdir %src %dest'; } sub _strip_command { return <SUPER::dynamic_lib( @_ ); return $text unless $text =~ m/dlltool/i; return $text unless $Wx::build::MakeMaker::Core::has_alien; my $strip = $this->_debug ? '' : ' -s '; my $ldflags = '-shared'; $ldflags .= ( $Config{ptrsize} == 8 ) ? ' -m64' : ' -m32'; $text =~ s{(?:^\s+(?:dlltool|\$\(LD\)).*\n)+} {\tg++ $ldflags $strip -o \$@ \$(LDFROM) \$(MYEXTLIB) \$(PERL_ARCHIVE) \$(LDLOADLIBS) \$(BASEEXT).def\n}m; # \$(LDDLFLAGS) : in MinGW passes -mdll, and we use -shared... return $text; } 1; # local variables: # mode: cperl # end: Wx-0.9923/build/Wx/build/MakeMaker/Win32_MSVC.pm000664000000000000 232312306612233 17200 0ustar00Mark000000000000package Wx::build::MakeMaker::Win32_MSVC; use strict; use base 'Wx::build::MakeMaker::Win32'; use Wx::build::Utils qw(pipe_stderr); sub _res_file { 'Wx.res' } sub _res_command { 'rc -I%incdir %src' } sub _strip_command { return <<'EOT'; $(NOOP) EOT } my $cl_version; { my @head = pipe_stderr( "cl /help" ); $head[0] =~ /Version (\d+\.+).\d+/ and $cl_version = $1; } sub dynamic_lib { my $this = shift; my $text = $this->SUPER::dynamic_lib( @_ ); return $text if $cl_version < 14 || eval ExtUtils::MakeMaker->VERSION >= 6.33; $text .= <<'EOT' if $text && $text =~ /\$\@/; mt -manifest $@.manifest -outputresource:$@;2 EOT return $text; } =pod sub post_initialize { my( $self ) = @_; $self->{PERL_LIB} = 'C:\Programmi\Devel\Perl\ActivePerl\588.817\xlib\wince-arm-pocket-wce300'; $self->{PERL_ARCHLIB} = 'C:\Programmi\Devel\Perl\ActivePerl\588.817\xlib\wince-arm-pocket-wce300'; $self->{PERL_INC} = $self->catdir( $self->{PERL_LIB}, "CORE" ); return ''; } sub tool_xsubpp { my( $self ) = @_; package MY; local $self->{PERL_LIB} = 'C:\Programmi\Devel\Perl\ActivePerl\588.817\lib'; return $self->SUPER::tool_xsubpp; } =cut 1; # local variables: # mode: cperl # end: Wx-0.9923/build/Wx/build/MakeMaker.pm000664000000000000 2625512306612233 15500 0ustar00Mark000000000000package Wx::build::MakeMaker; use strict; use ExtUtils::MakeMaker; use base 'Exporter'; use Config; use vars qw(@EXPORT $VERSION); use FindBin; use File::Basename qw(); $VERSION = '0.28'; @EXPORT = 'wxWriteMakefile'; # get rid of suffix in MakeMaker version to be able treat it like a number in # comparisons my $MAKEMAKER_VERSION = $ExtUtils::MakeMaker::VERSION; $MAKEMAKER_VERSION =~ s/_\d+$//; # sanitize File::Find on filesystems where nlink of directories is < 2 use File::Find; $File::Find::dont_use_nlink = 1 if ( stat('.') )[3] < 2; =head1 NAME Wx::build::MakeMaker - ExtUtils::MakeMaker specialisation for wxPerl modules =head1 SYNOPSIS use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'My::Module', VERSION_FROM => 'Module.pm' ); =head1 FUNCTIONS =head2 wxWriteMakefile wxWriteMakefile( arameter => value, ... ); This functions is meant to be used exactly as ExtUtils::MakeMaker::WriteMakefile (see). It accepts all WriteMakefile's parameters, plus: =over 4 =item * WX_CORE_LIB WX_CORE_LIB => 'xrc core base' link libraries from wxWidgets' core or contrib directory. If not spedified, defaults to 'adv html core net base' for compatibility. =item * WX_LIB WX_LIB => '-lxrc' Link additional libraries from wxWidgets' contrib directory. =item * REQUIRE_WX REQUIRE_WX => 2.003002 # wxWidgets 2.3.2 Do not build this module if wxWidgets' version is lower than the version specified. =item * NO_WX_PLATFORMS NO_WX_PLATFORMS => [ 'x11', 'msw' ] Do not build this module on the specified platform(s). =item * ON_WX_PLATFORMs ON_WX_PLATFORMS => [ 'gtk' ] only build this module on the specified platform(s). =back =head1 PRIVATE FUNCTIONS These functions are here for reference, do not use them. =head2 is_core if( is_core ) { ... } True if it is building the wxPerl core (Wx.dll), false otherwise. =head2 is_wxPerl_tree if( is_wxPerl_tree ) { ... } True if it is building any part of wxPerl, false otherwise. =cut my $is_wxperl_tree = 0; sub is_core() { -f 'Wx.pm' } sub _set_is_wxPerl_tree { $is_wxperl_tree = $_[0] ? 1 : 0 } sub is_wxPerl_tree { $is_wxperl_tree } # _call_method( 'method', $this, @args ); # calls the _core or _ext version of a method; sub _call_method { my $name = shift; my $this = shift; $name .= is_core ? '_core' : '_ext'; return $this->$name( @_ ); } =head2 set_hook_package Wx::build::MakeMaker::set_hook_package( 'package_name' ); Package to be hooked into the MakeMaker inheritance chain. =cut # this is the default my $hook_package; BEGIN { my $package_to_use; SWITCH: { local $_ = $Config{osname}; # Win32 m/MSWin32/ and do { local $_ = File::Basename::basename( $Config{cc} ); m/^cl/i and $package_to_use = 'Win32_MSVC' and last SWITCH; m/^gcc/i and $package_to_use = 'Win32_MinGW' and last SWITCH; # default die "Your compiler is not currently supported on Win32" }; # MacOS X is slightly different... m/darwin/ and do { $package_to_use = 'MacOSX_GCC'; last SWITCH; }; # default $package_to_use = 'Any_wx_config'; last SWITCH; } $hook_package = 'Wx::build::MakeMaker::' . $package_to_use; } sub set_hook_package { $hook_package = shift; } # this is a crude hack (at best), we put an arbitrary package # into ExtUtils::MakeMaker inheritance chain in order to be able # to customise it sub import { undef *MY::libscan; *MY::libscan = _make_hook( 'libscan' ); Wx::build::MakeMaker->export_to_level( 1, @_ ); } =head1 METHODS =head2 get_api_directory my $dir = $cfg->get_api_directory; =head2 get_arch_directory my $dir = $cfg->get_arch_directory; =cut sub get_api_directory { if( is_wxPerl_tree() ) { return Wx::build::Utils::src_dir( 'Wx.pm' ); } else { my $path = $INC{'Wx/build/MakeMaker.pm'}; my( $vol, $dir, $file ) = File::Spec->splitpath( $path ); my @dirs = File::Spec->splitdir( $dir ); pop @dirs; pop @dirs; return File::Spec->catpath( $vol, File::Spec->catdir( @dirs ) ); } } sub get_arch_directory { if( is_wxPerl_tree() ) { require Carp; Carp::confess( "Should not be called!" ); } else { my $path = $INC{'Wx/build/Opt.pm'}; my( $vol, $dir, $file ) = File::Spec->splitpath( $path ); my @dirs = File::Spec->splitdir( $dir ); pop @dirs; pop @dirs; pop @dirs; return File::Spec->catpath( $vol, File::Spec->catdir( @dirs ) ); } } sub check_core_lib { my( $this, @libs ) = @_; return eval { Alien::wxWidgets->libraries( @libs ); 1 } ? 1 : 0; } sub get_core_lib { my( $this, @libs ) = @_; return join ' ', Alien::wxWidgets->libraries( @libs ); } our $is_core = 0; sub get_wx_platform { Alien::wxWidgets->config->{toolkit} } sub get_wx_version { Alien::wxWidgets->version } sub _unicode { Alien::wxWidgets->config->{unicode} } sub _mslu { Alien::wxWidgets->config->{mslu} } sub _debug { Alien::wxWidgets->config->{debug} } sub _core { $is_core } sub _static { Alien::wxWidgets->config->{static} } sub _make_hook { my $hook_sub = shift; return sub { my $this = $_[0]; my $class = ref $this; ( my $file = $hook_package ) =~ s{::}{/}g; no strict 'refs'; require "$file.pm"; undef *{"${class}::${hook_sub}"}; unshift @{"${class}::ISA"}, $hook_package; shift->$hook_sub( @_ ); } } # this method calls ->configure # in the appropriate Wx::build::MakeMaker::PACKAGE, # and merges the results with its inputs use vars qw(%cfg1 %cfg2); sub _libs($) { ref( $_[0] ) ? @{$_[0]} : ( $_[0] ) } # removes the -L/path from the imput and returns them and # the cleaned input sub _split_lib($) { my $str = shift || ''; my @paths = $str =~ m/(-L[^ ]+)/g; $str =~ s/-L[^ ]+ +//g; return ( $str, @paths ); } sub merge_config { my( $cfg1, $cfg2 ) = @_; local *cfg1 = $cfg1; local *cfg2 = $cfg2; my %cfg = %cfg1; foreach my $i ( keys %cfg2 ) { if( exists $cfg{$i} ) { # merging libraries is always a mess; the hope is that # this will work in all cases, but there are no guarantees... if( $i eq 'LIBS' ) { my @a = _libs( $cfg{LIBS} ); my @b = _libs( $cfg2{LIBS} ); my @c; foreach my $i ( @b ) { my( $mi, @ipaths ) = _split_lib( $i ); foreach my $j ( @a ) { my( $mj, @jpaths ) = _split_lib( $j ); push @c, " @ipaths @jpaths $mj $mi "; } } $cfg{LIBS} = \@c; next; } if( $i eq 'clean' || $i eq 'realclean' ) { $cfg{$i}{FILES} .= ' ' . $cfg{$i}{FILES}; next; } if( ref($cfg{$i}) || ref($cfg2{$i}) ) { die "non scalar key '$i' while merging configuration information"; $cfg{$i} = $cfg2{$i}; } else { $cfg{$i} .= " $cfg2{$i}"; } } else { $cfg{$i} = $cfg2{$i}; } } return %cfg; } sub configure { ( my $file = $hook_package ) =~ s{::}{/}g; require "$file.pm"; # do it at runtime require Alien::wxWidgets; Alien::wxWidgets->VERSION( 0.04 ); my $this = $_[0]; my %cfg1 = %{$_[1]}; my %cfg2 = _call_method( 'configure', $hook_package ); my %cfg = merge_config( \%cfg1, \%cfg2 ); return \%cfg; } sub _make_override { my $name = shift; my $sub = sub { package MY; my $this = shift; my $full = "SUPER::$name"; $this->$full( @_ ); }; no strict 'refs'; *{"${name}_core"} = $sub; *{"${name}_ext"} = $sub; *{"${name}"} = sub { _call_method( $name, @_ ) }; } _make_override( 'subdirs' ); _make_override( 'postamble' ); _make_override( 'depend' ); _make_override( 'install' ); _make_override( 'libscan' ); _make_override( 'constants' ); _make_override( 'metafile_target' ); _make_override( 'manifypods' ); sub ppd { package MY; shift->SUPER::ppd( @_ ) } sub dynamic_lib { package MY; shift->SUPER::dynamic_lib( @_ ) } sub const_config { package MY; shift->SUPER::const_config( @_ ) } use vars qw(%args %additional_arguments $wx_top_file); sub _process_mm_arguments { my( $args, $has_alien ) = @_; local *args = $args; my $build = 1; my %options = Wx::build::Options->get_makemaker_options( is_wxPerl_tree() ? () : ( 'saved' ) ); $additional_arguments{WX_TOP} = $wx_top_file if $wx_top_file; unless( $has_alien ) { $args{depend} = { '$(FIRST_MAKEFILE)' => 'alien_wxwidgets_missing' }; delete $args{$_} foreach grep /WX_|_WX/, keys %args; return 1; } my $platform = Alien::wxWidgets->config->{toolkit}; $args{CCFLAGS} .= $options{extra_cflags} ? ' ' . $options{extra_cflags} : ''; $args{LIBS} .= $options{extra_libs} ? ' ' . $options{extra_libs} : ''; $args{WX_CORE_LIB} ||= 'adv html core net base'; foreach ( keys %args ) { my $v = $args{$_}; m/^(NO|ON)_WX_PLATFORMS$/ and do { my $on = $1 eq 'ON'; if( $on ) { # build if platform is explicitly listed $build &&= grep { $_ eq $platform } @$v; } else { # build unless platform is explicitly listed $build &&= !grep { $_ eq $platform } @$v; } delete $args{$_}; }; m/^REQUIRE_WX$/ and do { $build &&= __PACKAGE__->get_wx_version() >= $v; delete $args{$_}; }; m/^REQUIRE_WX_LIB$/ and do { my @libs = split ' ', $v; $build &&= __PACKAGE__->check_core_lib( @libs ) if $v=~/\S/; delete $args{$_}; }; } return $build unless $build; foreach ( keys %args ) { my $v = $args{$_}; m/^WX_CORE_LIB_MAYBE$/ and do { my @libs = split ' ', $v; $args{LIBS} .= ' ' . join ' ', map { __PACKAGE__->get_core_lib( $_ ) } grep { __PACKAGE__->check_core_lib( $_ ) } ( $v=~/\S/ ? @libs : () ); delete $args{$_}; }; m/^WX_CORE_LIB$/ and do { my @libs = split ' ', $v; $args{LIBS} .= ' ' . join ' ', __PACKAGE__->get_core_lib( @libs ) if $v=~/\S/; delete $args{$_}; }; m/^WX_LIB$/ and do { die "Please use WX_CORE_LIB instead of WX_LIB"; }; m/^(?:ABSTRACT_FROM|AUTHOR)/ and do { # args not known prior to Perl 5.005_03 (the check is a bit conservative) delete $args{$_} if $MAKEMAKER_VERSION < 5.43; }; m/^(?:LICENSE)/ and do { # args not known prior to MakeMaker 6.32 delete $args{$_} if $MAKEMAKER_VERSION < 6.32; }; m/^WX_TOP$/ and do { $wx_top_file = $args{$_}; }; m/^WX_/ and do { $additional_arguments{$_} = delete $args{$_}; }; } return $build; } sub wxWriteMakefile { my %params = @_; local $is_core = 0; my $has_alien = $Wx::build::MakeMaker::Core::has_alien; $has_alien = defined( $has_alien ) ? $has_alien : 1; $params{XSOPT} = ' -noprototypes' . ( is_wxPerl_tree() ? ' -nolinenumbers ' : ' ' ); if( $has_alien ) { $params{CONFIGURE} = \&Wx::build::MakeMaker::configure; require Wx::build::MakeMaker::Any_OS; push @{$params{TYPEMAPS} ||= []}, File::Spec->catfile( __PACKAGE__->get_api_directory, 'typemap' ); ( $params{PREREQ_PM} ||= {} )->{Wx} ||= '0.19' unless is_wxPerl_tree(); } my $build = Wx::build::MakeMaker::_process_mm_arguments( \%params, $has_alien ); if( $build ) { WriteMakefile( %params ); } else { ExtUtils::MakeMaker::WriteEmptyMakefile( %params ); } } 1; # local variables: # mode: cperl # end: Wx-0.9923/build/Wx/build/Options.pm000664000000000000 1055112306612233 15266 0ustar00Mark000000000000package Wx::build::Options; use strict; =head1 NAME Wx::build::Options - retrieve wxWidgets/wxPerl build options =head1 METHODS =cut use Getopt::Long; Getopt::Long::Configure( 'pass_through' ); my $help = 0; my $mksymlinks = 0; my $extra_libs = ''; my $extra_cflags = ''; my $alien_key = ''; my %subdirs = (); my %wx = (); my $options; sub _wx_version { my( $o, $v ) = @_; $v =~ m/(\d+)\.(\d+)(?:\.(\d+))?/ or die 'Invalid version specification: ', $v, "\n"; if( defined $3 ) { $wx{version} = [ $1 + ( $2 + $3 / 1000 ) / 1000, $1 + ( $2 + ( $3 + 1 ) / 1000 ) / 1000 ]; } else { $wx{version} = [ $1 + $2 / 1000, $1 + ( $2 + 1 ) / 1000 ]; } } sub _load_options { return if $options; $options = do 'Wx/build/Opt.pm'; die "Unable to load options: $@" unless $options; ( $extra_cflags, $extra_libs, $alien_key ) = @{$options}{qw(extra_cflags extra_libs alien_key)}; require Alien::wxWidgets; Alien::wxWidgets->load( key => $alien_key ); } my $parsed = 0; my @argv; sub _parse_options { return if $parsed; $parsed = 1; my $result = GetOptions( 'help' => \$help, 'mksymlinks' => \$mksymlinks, 'extra-libs=s' => \$extra_libs, 'extra-cflags=s' => \$extra_cflags, # for Alien::wxWidgets 'wx-debug!' => \($wx{debug}), 'wx-unicode!' => \($wx{unicode}), 'wx-mslu!' => \($wx{mslu}), 'wx-version=s' => \&_wx_version, 'wx-toolkit=s' => \($wx{toolkit}), '<>' => \&_process_options, ); @ARGV = @argv; @argv = (); if( !$result || $help ) { print <can( 'load' ) ) { Alien::wxWidgets->load( map { $_ => $wx{$_} } grep { defined $wx{$_} } keys %wx ); $alien_key = Alien::wxWidgets->key; } } sub _process_options { my $i = shift; unless( $i =~ m/^-/ ) { push @argv, $i; return; } if( $i =~ m/^--(enable|disable)-(\w+)$/ ) { $subdirs{$2} = ( $1 eq 'enable' ? 1 : 0 ); } else { die "invalid option $i"; } } =head2 get_makemaker_options my %mm_options = Wx::build::Options->get_makemaker_options; Returns options meaningful at wxPerl building time. my %options = ( mksymlinks => 0, extra_libs => '', extra_cflags => '', subdirs => { stc => 1, xrc => 0 } ) =cut sub get_makemaker_options { my $ref = shift; my $from = shift || ''; if( $from eq 'saved' ) { _load_options(); } else { _parse_options(); } return ( mksymlinks => $mksymlinks, extra_libs => $extra_libs, extra_cflags => $extra_cflags, subdirs => \%subdirs ); } =head2 write_config_file my $ok = Wx::build::Options->write_config_file( '/path/to/file' ); Writes a machine-readable representation of command-line options given to top-level Makefile.PL =cut sub write_config_file { my $class = shift; my $file = shift; require Data::Dumper; my $str = Data::Dumper->Dump( [ { extra_libs => $extra_libs, extra_cflags => $extra_cflags, alien_key => $alien_key, } ] ); Wx::build::Utils::write_string( $file, $str ); } 1; # local variables: # mode: cperl # end: Wx-0.9923/build/Wx/build/Utils.pm000664000000000000 1551612306612233 14741 0ustar00Mark000000000000package Wx::build::Utils; use strict; use Config; use base 'Exporter'; use File::Spec::Functions qw(curdir catdir catfile updir); use File::Find qw(find); use File::Path qw(mkpath); use File::Basename qw(dirname); use Carp; use vars qw(@EXPORT @EXPORT_OK); @EXPORT_OK = qw(obj_from_src xs_dependencies write_string lib_file arch_file arch_auto_file path_search files_with_overload files_with_constants pipe_stderr read_file write_file); =head1 NAME Wx::build::Utils - utility routines =head1 SUBROUTINES =head2 xs_dependencies my %dependencies = xs_dependencies( $mm_object, [ 'dir1', 'dir2' ] ); =cut sub _uniq { my( %x ); $x{$_} = 1 foreach @_; return sort keys %x; } sub xs_dependencies { my( $this, $dirs, $top_dir ) = @_; my( %depend ); my( $c, $o, $cinclude, $xsinclude ); foreach ( keys %{ $this->{XS} } ) { ( $cinclude, $xsinclude ) = scan_xs( $_, $dirs, $top_dir ); $c = $this->{XS}{$_}; $o = obj_from_src( $c ); $depend{$c} = $_ . ' ' . join( ' ', _uniq( @$xsinclude ) ); $depend{$o} = $c . ' ' . join( ' ', _uniq( @$cinclude ) ); } return %depend; } =head2 obj_from_src my @obj_files = obj_from_src( 'Foo.xs', 'bar.c', 'cpp/bar.cpp' ); Calculates the object file name from the source file name. In scalar context returns the first file. =cut sub obj_from_src { my @xs = @_; my $obj_ext = $Config{obj_ext} || $Config{_o}; foreach ( @xs ) { s[\.(?:xs|c|cc|cpp)$][$obj_ext] } return wantarray ? @xs : $xs[0]; } sub src_dir { my( $file ) = @_; my $d = curdir; for ( 1 .. 5 ) { return $d if -f catfile( $d, $file ); $d = catdir( updir, $d ); } confess "Unable to find top level directory ($file)"; } # # quick and dirty method for creating dependencies: # considers files included via #include "...", INCLUDE: or INCLUDE_COMMAND: # (not #include <...>) and does not take into account preprocessor directives # sub scan_xs($$$); sub scan_xs($$$) { my( $xs, $incpath, $top_dir ) = @_; local( *IN, $_ ); my( @cinclude, @xsinclude ); open IN, $xs; my $file; my $arr; while( defined( $_ = ) ) { undef $file; m/^\#\s*include\s+"([^"]*)"\s*$/ and $file = $1 and $arr = \@cinclude; m/^\s*INCLUDE:\s+(.*)$/ and $file = $1 and $arr = \@xsinclude; m/^\s*INCLUDE_COMMAND:\s+.*\s(\S+\.(?:xsp?|h))\s*/ and $file = $1 and $arr = \@xsinclude; m/^\s*\%include{([^}]+)}\s*;\s*$/ and $file = $1 and $arr = \@xsinclude; if( defined $file ) { $file = catfile( split '/', $file ); foreach my $dir ( @$incpath ) { my $f = $dir eq curdir() ? $file : catfile( $dir, $file ); if( -f $f ) { push @$arr, $f; my( $cinclude, $xsinclude ) = scan_xs( $f, $incpath, $top_dir ); push @cinclude, @$cinclude; push @xsinclude, @$xsinclude; last; } elsif( $file =~ m/ovl_const\.(?:cpp|h)/i || $file =~ m/v_cback_def\.h/i || $file =~ m/ItemContainer(?:Immutable)?\.xs/i || $file =~ m/Var[VH]{0,2}ScrollHelper(?:Base)?\.xs/i ) { push @$arr, ( ( $top_dir eq curdir() ) ? $file : catfile( $top_dir, $file ) ); } } } } close IN; ( \@cinclude, \@xsinclude ); } =head2 write_string, write_file write_string( 'file', $scalar ); write_file( 'file', $scalar ); Like File::Slurp. =head2 read_file my $string = read_file( 'file' ); =cut *write_string = \&write_file; sub write_file { my( $file, $string ) = @_; mkpath( dirname( $file ) ) if dirname( $file ); open my $fh, ">", $file or die "open '$file': $!"; binmode $fh; print $fh $string or die "print '$file': $!"; close $fh or die "close '$file': $!"; } sub read_file { my( $file ) = @_; local $/ = wantarray ? $/ : undef;; open my $fh, "<", $file or die "open '$file': $!"; binmode $fh; return <$fh>; } =head2 lib_file, arch_file, arch_auto_file my $file = lib_file( 'Foo.pm' ); # blib/lib/Foo.pm on *nix my $file = lib_file( 'Foo/Bar.pm' ); # blib\lib\Foo\Bar.pm on Win32 my $file = arch_auto_file( 'My\My.dll' ); # blib\arch\auto\My\My.dll All input paths must be relative, output paths may be absolute. =cut sub _split { require File::Spec::Unix; my $path = shift; my( $volume, $dir, $file ) = File::Spec::Unix->splitpath( $path ); my @dirs = File::Spec::Unix->splitdir( $dir ); return ( @dirs, $file ); } sub lib_file { my @split = _split( shift ); return File::Spec->catfile( 'blib', 'lib', @split ); } sub arch_file { my @split = _split( shift ); return File::Spec->catfile( 'blib', 'arch', @split ); } sub arch_auto_file { my @split = _split( shift ); return File::Spec->catfile( 'blib', 'arch', 'auto', @split ); } =head2 path_search my $file = path_search( 'foo.exe' ); Searches PATH for the given executable. =cut sub path_search { my $file = shift; foreach my $d ( File::Spec->path ) { my $full = File::Spec->catfile( $d, $file ); return $full if -f $full; } return; } =head2 files_with_constants my @files = files_with_constants; Finds files containing constants =cut sub files_with_constants { my @files; my $wanted = sub { my $name = $File::Find::name; m/\.(?:pm|xsp?|cpp|h)$/i && do { local *IN; my $line; open IN, "< $_" || warn "unable to open '$_'"; while( defined( $line = ) ) { $line =~ m/^\W+\!\w+:/ && do { push @files, $name; return; }; # for XS++ files containing enums, see comment in Any_OS.pm $line =~ m/^\s*enum\b/ && do { push @files, $name; return; }; }; }; }; find( $wanted, curdir ); return @files; } =head2 files_with_overload my @files = files_with_overload; Finds files containing overloaded XS/Perl subroutines =cut sub files_with_overload { my @files; my $wanted = sub { my $name = $File::Find::name; m/\.pm$/i && do { my $line; local *IN; open IN, "< $_" || warn "unable to open '$_'"; while( defined( $line = ) ) { $line =~ m/Wx::_match/ && do { push @files, $name; return; }; } }; m/\.xsp?$/i && do { my $line; local *IN; open IN, "< $_" || warn "unable to open '$_'"; while( defined( $line = ) ) { $line =~ m/wxPli_match_arguments|BEGIN_OVERLOAD\(\)/ && do { push @files, $name; return; }; } }; }; find( $wanted, curdir ); return @files; } sub pipe_stderr { my( $cmd ) = @_; my $pipe = File::Spec->catfile( 'script', 'pipe.pl' ); if( -f $pipe ) { return qx{$^X $pipe $cmd}; } else { # fix quoting later if necessary return qx[$^X -e "open STDERR, q{>&STDOUT}; exec q{$cmd}"]; } } 1; # local variables: # mode: cperl # end: Wx-0.9923/build/Wx/Overload/000775000000000000 012316265011 13646 5ustar00Mark000000000000Wx-0.9923/build/Wx/Overload/Driver.pm000664000000000000 1067012306612234 15545 0ustar00Mark000000000000############################################################################# ## Name: build/Wx/Overload/Driver.pm ## Purpose: builds overload constants ## Author: Mattia Barbon ## Modified by: ## Created: 17/08/2001 ## RCS-ID: $Id: Driver.pm 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2001-2003, 2005-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 ############################################################################# package Wx::Overload::Driver; use strict; use Symbol qw(gensym); use Wx::Overload::Handle; my %_name2type = ( wimg => 'Wx::Image', wbmp => 'Wx::Bitmap', wico => 'Wx::Icon', wmen => 'Wx::Menu', wmit => 'Wx::MenuItem', wrec => 'Wx::Rect', wreg => 'Wx::Region', wszr => 'Wx::Sizer', wtip => 'Wx::ToolTip', wwin => 'Wx::Window', wcol => 'Wx::Colour', wlci => 'Wx::ListItem', wgco => 'Wx::GridCellCoords', wdat => 'Wx::DataObject', wcur => 'Wx::Cursor', wehd => 'Wx::EvtHandler', wfon => 'Wx::Font', wdc => 'Wx::DC', wfrm => 'Wx::Frame', wsiz => 1, wpoi => 1, wist => 1, wost => 1, num => 1, str => 1, bool => 1, arr => 1, wpos => 1, zzz => 1, ); my %name2type = %_name2type; my %constants; sub new { my( $class, %args ) = @_; my $self = bless \%args, $class; return $self; } sub process { my( $self ) = @_; $self->_parse; $self->_write; } sub _parse { my( $self ) = @_; foreach my $i ( $self->files ) { my %namedecl = %_name2type; open my $fh, '<', $i or die "open '$i': $!"; while( <$fh> ) { if( m/DECLARE_OVERLOAD\(\s*(\w+)\s*,\s*(\S+)\s*\)/ ) { $namedecl{$1} = $2; next if exists $name2type{$1} && $name2type{$1} eq $2; die "Clashing type: '$1' was '$name2type{$1}', redeclared as '$2'" if exists $name2type{$1}; $name2type{$1} = $2; } if( m/Wx::_match\(\s*\@_\s*,\s*\$Wx::_(\w+)\s*\,/ || m/wxPliOvl_(\w+)/ ) { my $const = $1; my @const = split /_/, $const; foreach my $j ( @const ) { $j = 'num' if $j eq 'n'; $j = 'str' if $j eq 's'; $j = 'bool' if $j eq 'b'; die "unrecognized type '$j' in file '$i'" unless $namedecl{$j}; $constants{$const} = \@const; } } } } } sub _write { my( $self ) = @_; my @keys = ( ( sort grep { $name2type{$_} eq '1' } keys %name2type ), ( sort grep { $name2type{$_} ne '1' } keys %name2type ) ); my $vars_comma = join ", ", map "\$$_", @keys; my $vars = $vars_comma; $vars =~ s/,//g; my $types = join ", ", map "'$name2type{$_}'", grep $name2type{$_} ne '1', @keys; my $cpp_types = $types; $cpp_types =~ s/\'/\"/g; # header { my $out = gensym; tie *$out, 'Wx::Overload::Handle', $self->header; my $enum = join ",\n", map " wxPliOvl$_", @keys; print $out <source; print $out <{source} } sub header { $_[0]->{header} } sub files { @{$_[0]->{files}} } 1; Wx-0.9923/build/Wx/Overload/Handle.pm000664000000000000 235512306612234 15466 0ustar00Mark000000000000############################################################################# ## Name: build/Wx/Overload/Handle.pm ## Purpose: builds overload constants ## Author: Mattia Barbon ## Modified by: ## Created: 17/08/2001 ## RCS-ID: $Id: Handle.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2003, 2005-2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::Overload::Handle; use strict; use Wx::build::Utils qw(read_file write_file); sub TIEHANDLE { my( $class, $file ) = @_; return bless { FILE => $file, DATA => '' }, $class; } sub PRINT { my( $this ) = shift; $this->{DATA} .= join '', @_; } sub do_write { my( $this ) = @_; print "Writing '", $this->{FILE}, "'.\n"; write_file( $this->{FILE}, $this->{DATA} ); } sub CLOSE { my( $this ) = @_; eval { my $text = read_file( $this->{FILE} ); if( $text eq $this->{DATA} ) { print "'", $this->{FILE}, "' not modified, skipping\n"; } else { $this->do_write } }; if( $@ ) { $this->do_write; }; } 1; Wx-0.9923/build/Wx/XSP/000775000000000000 012316265011 12545 5ustar00Mark000000000000Wx-0.9923/build/Wx/XSP/Enum.pm000664000000000000 535712306612234 14103 0ustar00Mark000000000000package build::Wx::XSP::Enum; # Allow use when installed for other Wx based modules # but always use this when building Wx package Wx::XSP::Enum; @ISA = qw( build::Wx::XSP::Enum ); package build::Wx::XSP::Enum; use strict; use warnings; sub new { return bless { parser => $_[1], exporttag => '' }, $_[0] } sub register_plugin { my( $class, $parser ) = @_; my $instance = $class->new( $parser ); $parser->add_post_process_plugin( plugin => $instance ); $parser->add_toplevel_tag_plugin( plugin => $instance, tag => 'EnumExportTag' ); } sub handle_toplevel_tag { my( $self, $empty, $tag, %args ) = @_; my $checktag = $args{any_positional_arguments}[0]; die qq(Invalid Export Tag $checktag) if $checktag !~ /^[a-z]+$/; $self->{exporttag} = $checktag; 1; # we handled the tag } sub post_process { my( $self, $nodes ) = @_; my $parser = $self->{parser}; my $exporttag = $self->{exporttag}; my( %constants, %conditions ); foreach my $node ( @$nodes ) { next unless $node->isa( 'ExtUtils::XSpp::Node::Enum' ); $conditions{$node->condition_expression} ||= 1 if $node->condition_expression; foreach my $val ( @{$node->elements} ) { next unless $val->isa( 'ExtUtils::XSpp::Node::EnumValue' ); $constants{$val->name} ||= [ $val->condition ]; $conditions{$val->condition_expression} ||= 1 if $val->condition_expression; } } ( my $name = File::Basename::basename( $parser->current_file ) ) =~ tr/./_/; my $file = "xspp/const_$name.h"; my @defines; while( my( $k, $v ) = each %constants ) { if( $v->[0] ) { push @defines, "#ifdef $v->[0]", " r( $k );", "#endif", } else { push @defines, " r( $k );", } } my $consts = join "\n", @defines; my $all_conditions = join ' && ', 1, keys %conditions; my @lines = sprintf <<'EOT', $all_conditions, $name, $exporttag, $consts, $name, $name; #if %s #include "cpp/constants.h" static double %s_constant( const char* name, int arg ) { #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); // !package: Wx // !tag: %s // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // switch( fl ) // { %s // default: // break; // } #undef r WX_PL_CONSTANT_CLEANUP(); } static wxPlConstants %s_module( &%s_constant ); #endif EOT push @$nodes, ExtUtils::XSpp::Node::Raw->new( rows => [ qq{#include "$file"} ] ), ExtUtils::XSpp::Node::File->new( file => $file ), ExtUtils::XSpp::Node::Raw->new( rows => \@lines ), ExtUtils::XSpp::Node::File->new( file => '-' ); } 1; Wx-0.9923/build/Wx/XSP/Event.pm000664000000000000 552312313623533 14255 0ustar00Mark000000000000package build::Wx::XSP::Event; # Allow use when installed for other Wx based modules # but always use this when building Wx package Wx::XSP::Event; @ISA = qw( build::Wx::XSP::Event ); package build::Wx::XSP::Event; use strict; use warnings; sub new { return bless { parser => $_[1], events => [], exporttag => '' }, $_[0] } sub register_plugin { my( $class, $parser ) = @_; my $plugin = $class->new( $parser ); $parser->add_toplevel_tag_plugin( plugin => $plugin); $parser->add_toplevel_tag_plugin( plugin => $plugin, tag => 'EventExportTag' ); $parser->add_post_process_plugin( plugin => $plugin ); } sub handle_toplevel_tag { my( $self, undef, $tag, %args ) = @_; if ( $tag eq 'EventExportTag') { my $checktag = $args{any_positional_arguments}[0]; die qq(Invalid Export Tag $checktag) if $checktag !~ /^[a-z]+$/; $self->{exporttag} = $checktag; return 1; # we handled the tag } if ( $tag eq 'Event') { my( $evt, $const ) = ( $args{any_positional_arguments}[0][0], $args{any_positional_arguments}[1][0] ); my( $name, $args ) = $evt =~ /^(\w+)\((.*)\)$/ or die $evt; my @args = split /\s*,\s*/, $args; push @{$self->{events}}, [ $name, 1 + @args, $const, $args{condition} ]; return 1; } return 0; } sub post_process { my( $self, $nodes ) = @_; my $parser = $self->{parser}; my $exporttag = $self->{exporttag}; my( @events, %conditions ); foreach my $e ( @{$self->{events}} ) { my( $name, $args, $const, $cond ) = @$e; if( !$const ) { push @events, " wxPli_StdEvent( $name, $args )"; } else { push @events, " wxPli_Event( $name, $args, $const )"; } $conditions{$cond} ||= 1; } ( my $name = File::Basename::basename( $parser->current_file ) ) =~ tr/./_/; my $file = "xspp/evt_$name.h"; my $evts = join "\n", @events; my $all_conditions = join ' && ', 1, map "defined( $_ )", keys %conditions; my @lines = sprintf <<'EOT', $all_conditions, $exporttag, $name, $evts; #if %s // !package: Wx::Event // !tag: %s // !parser: sub { $_[0] =~ m<^\s*wxPli_(?:Std)?Event\(\s*(\w+)\s*\,> } #include "cpp/helpers.h" static wxPliEventDescription %s_events[] = { %s { 0, 0, 0 } }; #endif EOT push @$nodes, ExtUtils::XSpp::Node::Raw->new( rows => [ qq{#include "$file"} ] ), ExtUtils::XSpp::Node::File->new( file => $file ), ExtUtils::XSpp::Node::Raw->new( rows => \@lines ), ExtUtils::XSpp::Node::File->new( file => '-' ), ExtUtils::XSpp::Node::Raw->new ( rows => [ 'BOOT:', " wxPli_set_events( ${name}_events );" ], emit_condition => $all_conditions, ) ; } 1; Wx-0.9923/build/Wx/XSP/Overload.pm000664000000000000 2372512306612234 14771 0ustar00Mark000000000000package build::Wx::XSP::Overload; # Allow use when installed for other Wx based modules # but always use this when building Wx package Wx::XSP::Overload; @ISA = qw( build::Wx::XSP::Overload ); package build::Wx::XSP::Overload; use strict; use warnings; my $overload_number_types = [ 'int', 'unsigned', 'short', 'long', 'unsigned int', 'unsigned short', 'unsigned long', 'float', 'double', 'wxAlignment', 'wxBrushStyle', 'size_t', 'ssize_t', 'wxCoord', 'wxUint32', 'wxDirection', 'wxBitmapType', ]; my $overload_any_types = [ 'Wx_UserDataO', 'Wx_UserDataCD', 'wxVariantArg' ]; sub new { return bless { overload_methods => {}, }, $_[0] } sub register_plugin { my( $class, $parser ) = @_; my $instance = $class->new; $parser->add_post_process_plugin( plugin => $instance ); $parser->add_method_tag_plugin( plugin => $instance, tag => 'Overload' ); $parser->add_toplevel_tag_plugin ( plugin => $instance, tag => 'OverloadNumberType' ); $parser->add_toplevel_tag_plugin ( plugin => $instance, tag => 'OverloadAnyType' ); } sub handle_toplevel_tag { my( $self, $empty, $tag, %args ) = @_; if( $tag eq 'OverloadNumberType' ) { my $newtype = $args{any_positional_arguments}[0]; die qq(Invalid Number Type) if !$newtype; push( @$overload_number_types, $newtype ); } if( $tag eq 'OverloadAnyType' ) { my $newtype = $args{any_positional_arguments}[0]; die qq(Invalid Number Type) if !$newtype; push( @$overload_any_types, $newtype ); } 1; } sub handle_method_tag { my( $self, $method, $tag, %args ) = @_; $self->{overload_methods}{$method} = 1; 1; } sub post_process { my( $self, $nodes ) = @_; foreach my $node ( @$nodes ) { next unless $node->isa( 'ExtUtils::XSpp::Node::Class' ); my %all_methods; foreach my $method ( @{$node->methods} ) { next unless $method->isa( 'ExtUtils::XSpp::Node::Method' ); next if $method->isa( 'ExtUtils::XSpp::Node::Destructor' ); next if $method->cpp_name ne $method->perl_name && !$self->{overload_methods}{$method}; push @{$all_methods{$method->cpp_name} ||= []}, $method; } my @ovl_methods = grep { @{$all_methods{$_}} > 1 } keys %all_methods; if( @ovl_methods ) { $node->add_methods( ExtUtils::XSpp::Node::Raw->new( rows => [ '#include "cpp/overload.h"' ] ) ); } foreach my $method_name ( @ovl_methods ) { _add_overload( $self, $node, $all_methods{$method_name} ); } } } =pod void wxCaret::Move( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wpoi, MovePoint ) MATCH_REDISP( wxPliOvl_n_n, MoveXY ) END_OVERLOAD( Wx::Caret::Move ) =cut sub is_bool { my( $type ) = @_; return 0 if $type->is_pointer; return $type->base_type eq 'bool'; } sub is_string { my( $type ) = @_; # TODO wxPerl-specific types return 1 if $type->base_type eq 'char' && $type->is_pointer == 1; return 1 if $type->base_type eq 'wxChar' && $type->is_pointer == 1; return 0 if $type->is_pointer; return $type->base_type eq 'wxString'; } sub is_number { my( $type ) = @_; return 0 if $type->is_pointer; # TODO wxPerl-specific types return grep $type->base_type eq $_, @$overload_number_types; } sub is_value { my( $type, $class ) = @_; return 0 if $type->is_pointer; return $type->base_type eq $class; } sub is_any { my( $type ) = @_; return ( grep $type->base_type eq $_, @$overload_any_types ) ? 1 : 0; } sub _compare_function { my( $ca, $cb ) = ( 0, 0 ); # arbitrary order for functions with the same name, assuming they # will be guarded with different #ifdefs return $a <=> $b if $a->perl_name eq $b->perl_name; $ca += 1 foreach grep !$_->has_default, @{$a->arguments}; $cb += 1 foreach grep !$_->has_default, @{$b->arguments}; return $ca - $cb if $ca != $cb; for( my $i = 0; $i < 10000; ++$i ) { return -1 if $#{$a->arguments} < $i && $#{$b->arguments} >= $i; return 1 if $#{$a->arguments} >= $i && $#{$b->arguments} < $i; return 0 if $#{$a->arguments} < $i && $#{$b->arguments} < $i; # since optional arguments might not be specified, we can't rely on them # to disambiguate two calls return 0 if $ca < $i && $cb < $i; my $ta = $a->arguments->[$i]->type; my $tb = $b->arguments->[$i]->type; my( $as, $bs ) = ( is_string( $ta ) || is_any( $ta ), is_string( $tb ) || is_any( $tb ) ); my( $ai, $bi ) = ( is_number( $ta ), is_number( $tb ) ); my( $ab, $bb ) = ( is_bool( $ta ), is_bool( $tb ) ); my $asimple = $as || $ai || $ab; my $bsimple = $bs || $bi || $bb; # first complex types, then integer, then boolean/string # this does not handle overloading on a base and a derived type, # it is good enough for wxPerl return -1 if !$asimple && !$bsimple; return -1 if !$asimple && $bsimple; return 1 if $asimple && !$bsimple; next if $ai && $bi; return -1 if $ai && !$bi; return 1 if !$ai && $bi; # string/bool are ambiguous next; } return 0; } sub _make_dispatch { my( $self, $methods, $method ) = @_; if( $method->cpp_name eq $method->perl_name ) { for( my $i = 0; $i < @$methods; ++$i ) { if( $method == $methods->[$i] ) { $method->{PERL_NAME} = $method->cpp_name . $i; last; } } } if( @{$method->arguments} == 0 ) { my $init = <perl_name ), $method->condition_expression || 1 ]; } if( @$methods == 2 && @{$methods->[0]->arguments} == 0 ) { return [ undef, 'NULL', sprintf( ' MATCH_ANY_REDISP( %s )', $method->perl_name ), $method->condition_expression || 1 ]; } my( $min, $max, @indices ) = ( 0, 0 ); foreach my $arg ( @{$method->arguments} ) { ++$max; ++$min unless defined $arg->default; if( is_bool( $arg->type ) ) { push @indices, 'wxPliOvlbool'; next; } if( is_string( $arg->type ) || is_any( $arg->type ) ) { push @indices, 'wxPliOvlstr'; next; } if( is_number( $arg->type ) ) { push @indices, 'wxPliOvlnum'; next; } # TODO 3 wxPerl-specific types if( is_value( $arg->type, 'wxPoint' ) ) { push @indices, 'wxPliOvlwpoi'; next; } if( is_value( $arg->type, 'wxPosition' ) ) { push @indices, 'wxPliOvlwpos'; next; } if( is_value( $arg->type, 'wxSize' ) ) { push @indices, 'wxPliOvlwsiz'; next; } # TODO name mapping is wxPerl-specific die 'Unable to dispatch ', $arg->type->base_type unless $arg->type->base_type =~ /^[Ww]x/; { # convert typemap parsed types my $subtype = substr $arg->type->base_type, 2; $subtype =~ s/__parsed.*$//; push @indices, '"Wx::' . $subtype . '"'; } } my $proto_name = sprintf '%s_proto', $method->perl_name; my $init = sprintf <perl_name, join( ', ', @indices ), $method->perl_name, $method->perl_name, $method->perl_name, $method->perl_name; if( $min != $max ) { return [ $init, $proto_name, sprintf( ' MATCH_REDISP_COUNT_ALLOWMORE( %s_proto, %s, %d )', $method->perl_name, $method->perl_name, $min ), $method->condition_expression || 1 ]; } else { return [ $init, $proto_name, sprintf( ' MATCH_REDISP_COUNT( %s_proto, %s, %d )', $method->perl_name, $method->perl_name, $max ), $method->condition_expression || 1 ]; } } sub _add_overload { my( $self, $class, $methods ) = @_; my @methods = sort _compare_function @$methods; for( my $i = 0; $i < $#methods; ++$i ) { ( $a, $b ) = ( $methods[$i], $methods[$i + 1] ); next if _compare_function() != 0; die "Ambiguous overload for ", $a->perl_name, " and ", $b->perl_name; } my @dispatch = map _make_dispatch( $self, $methods, $_ ), @methods; my $method_name = $class->cpp_name eq $methods[0]->cpp_name ? 'new' : $methods[0]->cpp_name; my $code = sprintf <cpp_name, $method_name; my @prototypes; foreach my $dispatch ( @dispatch ) { next unless $dispatch->[0]; chomp $dispatch->[0]; $code .= <[3] $dispatch->[0] #endif // $dispatch->[3] EOT push @prototypes, <[3] &$dispatch->[1], #endif // $dispatch->[3] EOT } $code .= sprintf <[3] $dispatch->[2] #endif // $dispatch->[3] EOT } $code .= sprintf <perl_name, $method_name; $class->add_methods( ExtUtils::XSpp::Node::Raw->new ( rows => [ $code ], emit_condition => $class->condition_expression, ) ); } 1; Wx-0.9923/build/Wx/XSP/Virtual.pm000664000000000000 5664312306612234 14651 0ustar00Mark000000000000package build::Wx::XSP::Virtual; # Allow use when installed for other Wx based modules # but always use this when building Wx package Wx::XSP::Virtual; @ISA = qw( build::Wx::XSP::Virtual ); package build::Wx::XSP::Virtual; use strict; use warnings; my %type_map; sub new { return bless { virtual_methods => {}, virtual_classes => {}, skip_virtual_base => {}, virtual_non_object => {}, }, $_[0]; } sub _add_type_map_template { my $template = shift; my @validmaptypes = qw( convert_return default_value type_char arguments ); my $tmap = {}; my $tname = $template->{name}; # if we specified a merge, use those values as our base if(exists($template->{merge})) { if(exists($type_map{$template->{merge}})) { my $mergebase = $type_map{$template->{merge}}; for my $vtype ( @validmaptypes ) { $tmap->{$vtype} = $mergebase->{$vtype} if(exists($mergebase->{$vtype})); } } else { die qq(virtual template merge attempted for type $tname with unknown base type $template->{merge}); } } # add values for this template, overriding anything in merged type and replacing any # existing map for the named type for my $vtype ( @validmaptypes ) { $tmap->{$vtype} = $template->{$vtype} if(exists($template->{$vtype})); } $type_map{$tname} = $tmap; } sub register_plugin { my( $class, $parser ) = @_; my $instance = $class->new; $parser->add_toplevel_tag_plugin ( plugin => $instance, tag => 'VirtualTypeMap' ); $parser->add_class_tag_plugin( plugin => $instance, tag => 'NoVirtualBase' ); $parser->add_class_tag_plugin( plugin => $instance, tag => 'VirtualNonObject' ); $parser->add_class_tag_plugin( plugin => $instance, tag => 'VirtualImplementation' ); $parser->add_method_tag_plugin( plugin => $instance, tag => 'Virtual' ); $parser->add_post_process_plugin( plugin => $instance ); } sub handle_toplevel_tag { my( $self, $empty, $tag, %args ) = @_; if( $tag eq 'VirtualTypeMap' ) { my %map = @{$args{any_named_arguments}}; my $typename = $map{Name}[0][0] || undef; die 'No Name in VirtualTypeMap' if !$typename; my $vtmap = { 'name' => $typename, 'convert_return' => $map{ConvertReturn}[0][0] || undef, 'default_value' => $map{DefaultValue}[0][0] || undef, 'type_char' => $map{TypeChar}[0][0] || undef, 'arguments' => $map{Arguments}[0][0] || undef, 'merge' => $map{Merge}[0][0] || undef, }; foreach my $key (sort keys( %$vtmap ) ) { delete($vtmap->{$key}) unless defined($vtmap->{$key}); } _add_type_map_template($vtmap); } 1; } sub handle_class_tag { my( $self, $class, $tag, %args ) = @_; if( $tag eq 'NoVirtualBase' ) { $self->{skip_virtual_base}{$class->cpp_name} = 1; } elsif( $tag eq 'VirtualNonObject' ) { $self->{virtual_non_object}{$class->cpp_name} = 1; } elsif( $tag eq 'VirtualImplementation' ) { my %map = @{$args{any_named_arguments}}; $self->{virtual_implementation}{$class->cpp_name} = { name => $map{Name}[0][0] || '', declaration => join( "\n", @{$map{Declaration}[0] || []} ), implementation => join( "\n", @{$map{Implementation}[0] || []} ), }; } 1; } sub handle_method_tag { my( $self, $method, $tag, %args ) = @_; if( $args{any_positional_arguments} && $args{any_positional_arguments}[0] eq 'pure' ) { $self->{virtual_methods}{$method} = [ $method, 1 ]; } else { $self->{virtual_methods}{$method} = [ $method, 0 ]; } 1; } # create some base templates for common types { my @basetemplates = ( { name => 'bool', convert_return => 'SvTRUE( ret )', default_value => 'false', type_char => 'b', }, { name => 'int', convert_return => 'SvIV( ret )', default_value => '0', type_char => 'i', }, { name => 'long', convert_return => 'SvIV( ret )', default_value => '0', type_char => 'l', }, { name => 'double', convert_return => 'SvNV( ret )', default_value => '0.0', type_char => 'd', }, { name => 'wxAlignment', convert_return => '(wxAlignment)SvIV( ret )', default_value => '(wxAlignment)0', type_char => 'i', }, { name => 'wxGridCellAttr::wxAttrKind', convert_return => '(wxGridCellAttr::wxAttrKind)SvIV( ret )', default_value => '(wxGridCellAttr::wxAttrKind)0', type_char => 'i', }, { name => 'unsigned int', convert_return => 'SvUV( ret )', default_value => '0', type_char => 'I', }, { name => 'wxUint32', convert_return => 'SvIV( ret )', default_value => '0', type_char => 'i', }, { name => 'size_t', merge => 'unsigned int', }, { name => 'wxString', convert_return => 'wxPli_sv_2_wxString( aTHX_ ret )', default_value => 'wxEmptyString', type_char => 'P', arguments => '&%s', }, { name => 'wxString&' , merge => 'wxString', }, { name => 'const wxString&', merge => 'wxString', }, { name => 'wxString*', convert_return => '(wxString*)wxPli_sv_2_wxString( aTHX_ ret )', default_value => 'wxEmptyString', type_char => 'P', arguments => '&%s', }, { name => 'wxVariant', convert_return => 'wxPli_sv_2_wxvariant( aTHX_ ret )', default_value => 'wxVariant()', type_char => 'q', arguments => '&%s, "Wx::Variant"', }, { name => 'wxVariant&', merge => 'wxVariant',}, { name => 'const wxVariant&', merge => 'wxVariant',}, { name => 'wxBitmap', convert_return => '*(wxBitmap*)wxPli_sv_2_object( aTHX_ ret, "Wx::Bitmap" )', default_value => 'wxBitmap()', type_char => 'O', arguments => '&%s', }, { name => 'wxBitmap&', merge => 'wxBitmap',}, { name => 'const wxBitmap&', merge => 'wxBitmap',}, { name => 'wxPoint', convert_return => 'wxPli_sv_2_wxpoint( aTHX_ ret )', default_value => 'wxPoint()', type_char => 'o', arguments => '&%s, "Wx::Point"', }, { name => 'wxPoint&', merge => 'wxPoint',}, { name => 'const wxPoint&', merge => 'wxPoint',}, { name => 'wxSize', convert_return => 'wxPli_sv_2_wxsize( aTHX_ ret )', default_value => 'wxSize()', type_char => 'o', arguments => '&%s, "Wx::Size"', }, { name => 'wxSize&', merge => 'wxSize',}, { name => 'const wxSize&', merge => 'wxSize',}, { name => 'const wxRect&', convert_return => '*(wxRect*)wxPli_sv_2_object( aTHX_ ret, "Wx::Rect" )', default_value => 'wxRect()', type_char => 'O', arguments => '&%s', }, { name => 'const wxHeaderColumn&', convert_return => '*(wxHeaderColumn*)wxPli_sv_2_object( aTHX_ ret, "Wx::HeaderColumn" )', type_char => 'O', arguments => '&%s', }, { name => 'wxGrid*', convert_return => '(wxGrid*)wxPli_sv_2_object( aTHX_ ret, "Wx::Grid" )', type_char => 'O', arguments => '&%s', }, { name => 'wxGridCellAttr*', convert_return => 'convert_GridCellAttrOut( aTHX_ ret )', type_char => 'O', arguments => '&%s', }, ); _add_type_map_template($_) for ( @basetemplates ); } sub _virtual_typemap { my( $type ) = @_; my $tm = $type_map{$type->print}; die "No virtual typemap for ", $type->print unless $tm; return $tm; } sub _emit_method_conditions { my( $class ) = @_; my @res; foreach my $method ( @{$class->methods} ) { next unless $method->isa( 'ExtUtils::XSpp::Node::Preprocessor' ); push @res, $method; } return @res; } sub post_process { my( $self, $nodes ) = @_; my @copy = @$nodes; foreach my $node ( @copy ) { next unless $node->isa( 'ExtUtils::XSpp::Node::Class' ); next if $self->{virtual_classes}{$node}; my( @virtual, $abstract_class, @classes, %redefined, $vnon_object, $nonobject_forced ); @classes = $node; # find virtual method in this class and in all base classes while( @classes ) { my $class = shift @classes; next if $class ne $node && $self->{skip_virtual_base}{$class->cpp_name}; $vnon_object = ( $self->{virtual_non_object}{$class->cpp_name} ) ? 1 : 0; foreach my $method ( @{$class->methods} ) { next unless $method->isa( 'ExtUtils::XSpp::Node::Method' ); # do not generate virtual handling code for methods that # are marked as virtual in a base class and redefined as # non-virtual in this class unless( $self->{virtual_methods}{$method} ) { $redefined{$method->cpp_name} ||= 1; next; } next if $redefined{$method->cpp_name}; push @virtual, $self->{virtual_methods}{$method}; $abstract_class ||= $virtual[-1][1]; } # force abstract style for O_NON_WXOBJECT types # so that constructors return a self ref and all # methods therefore forward the self ref and not # a scalarish object. (At least for SV* obtained # from constructor or CallBack) if( $vnon_object && !$abstract_class) { $abstract_class = 1; $nonobject_forced = 1; } push @classes, @{$class->base_classes}; } next unless @virtual; # TODO wxPerl-specific my $cpp_class; if( $self->{virtual_implementation}{$node->cpp_name}{name} ) { $cpp_class = $self->{virtual_implementation}{$node->cpp_name}{name}; } else { ( $cpp_class = $node->cpp_name ) =~ s/^wx/wxPl/; } my $perl_class; if( $abstract_class ) { ( $perl_class = $cpp_class ) =~ s/^wx/Wx::/; } else { ( $perl_class = $cpp_class ) =~ s/^wxPl/Wx::/; } my $file = lc "xspp/$cpp_class.h"; my $include = ExtUtils::XSpp::Node::Raw->new ( rows => [ "#include \"$file\"" ] ); for( my $i = 0; $i <= $#$nodes; ++$i ) { next unless $nodes->[$i] == $node; splice @$nodes, $i, 0, $include; # TODO a very crude hack that should somehow be # encapsulated by XS++: the class definition in the # generated .h need to use the preprocessor conditions # applied to the various methods, but the conditions are # only emitted together with the method definition, which # require the header # # this forces the preprocessor #defines to be emitted just before # including the header splice @$nodes, $i, 0, _emit_method_conditions( $node ); last; } # for abstract class, delete all constructors my @constructors = grep $_->isa( 'ExtUtils::XSpp::Node::Constructor' ), @{$node->methods}; $node->delete_methods( @constructors ); # for non_object classes, put destructors in the Wx::Pl##Name package my @destructors = ( $vnon_object ) ? grep $_->isa( 'ExtUtils::XSpp::Node::Destructor' ), @{$node->methods} : (); $node->delete_methods( @destructors ); my @cpp_code; push @cpp_code, sprintf <cpp_name, $self->{virtual_implementation}{$node->cpp_name}{declaration} || ''; # add the (implicit) default constructor unless( @constructors ) { push @constructors, ExtUtils::XSpp::Node::Constructor->new ( cpp_name => $cpp_class, arguments => [], emit_condition => $node->condition_expression, ); } my( @new_constructors, @call_base ); foreach my $constructor ( @constructors ) { my $cpp_parms = join ', ', map $_->name, @{$constructor->arguments}; my $cpp_args = join ', ', map $_->print, @{$constructor->arguments}; my $comma = @{$constructor->arguments} ? ',' : ''; push @cpp_code, sprintf <cpp_name, $cpp_parms, $perl_class; my $code = [ "RETVAL = new $cpp_class( CLASS $comma $cpp_parms );" ]; my $ctor_name = $constructor->perl_name eq $node->cpp_name ? $cpp_class : $constructor->perl_name; my $new_ctor = ExtUtils::XSpp::Node::Constructor->new ( cpp_name => $cpp_class, perl_name => $ctor_name, code => $code, arguments => $constructor->arguments, postcall => $constructor->postcall, cleanup => $constructor->cleanup, condition => $constructor->condition, ); push @new_constructors, $new_ctor; } foreach my $m ( @virtual ) { my( $method, $pure ) = @$m; my( @cpp_parms, @arg_types ); foreach my $arg ( @{$method->arguments} ) { my $typemap = _virtual_typemap( $arg->type ); my $format = $typemap->{arguments} || '%s'; push @cpp_parms, sprintf $format, $arg->name; push @arg_types, $typemap->{type_char}; } my @base_parms = map $_->name, @{$method->arguments}; my( $cpp_parms, $arg_types ); if( @cpp_parms ) { $cpp_parms = join ', ', @cpp_parms; $arg_types = '"' . join( '', @arg_types ) . '", '; } else { $cpp_parms = ''; $arg_types = 'NULL'; } push @cpp_code, '#if ' . ( $method->condition_expression || 1 ); push @cpp_code, ' ' . $method->print_declaration; my $call_base = $node->cpp_name . '::' . $method->cpp_name . '(' . join( ', ', @base_parms ) . ')'; if( $method->ret_type->is_void ) { my $default = $pure ? 'return' : $call_base; push @cpp_code, sprintf <cpp_name, $arg_types, $cpp_parms, $default; } else { my $ret_type_map = _virtual_typemap( $method->ret_type ); my $default = $pure ? $ret_type_map->{default_value} : $call_base; # pure virtual without default value: abort if( !defined $default ) { # TODO better error message $default = 'croak( "Must override" );'; } else { $default = 'return ' . $default; } my $convert = $ret_type_map->{convert_return}; push @cpp_code, sprintf <cpp_name, $arg_types, $cpp_parms, $convert, $default; } push @cpp_code, '#endif'; my $callbase_decl = $method->ret_type->print . ' ' . 'base_' . $method->cpp_name . '( ' . join( ', ', map $_->print, @{$method->arguments} ) . ')' . ( $method->const ? ' const' : '' ); if( !$pure ) { push @cpp_code, '#if ' . ( $method->condition_expression || 1 ); push @cpp_code, ' ' . $callbase_decl, ' {'; if( $method->ret_type->is_void ) { push @cpp_code, ' ' . $call_base . ';'; } else { push @cpp_code, ' return ' . $call_base . ';'; } push @cpp_code, ' }'; push @cpp_code, '#endif'; my $call_base = ExtUtils::XSpp::Node::Method->new ( cpp_name => 'base_' . $method->cpp_name, perl_name => $method->perl_name, arguments => $method->arguments, condition => $method->condition, emit_condition => $method->condition_expression, ); push @call_base, $call_base; } } push @cpp_code, sprintf <<'EOT', }; %s EOT $self->{virtual_implementation}{$node->cpp_name}{implementation} || ''; mkdir 'xspp' unless -d 'xspp'; open my $h_file, '>', $file or die "open '$file': $!"; print $h_file join "\n", @cpp_code; close $h_file; ExtUtils::XSpp::Typemap::add_class_default_typemaps( $cpp_class ); if( $abstract_class ) { my $new_class = ExtUtils::XSpp::Node::Class->new ( cpp_name => $cpp_class, perl_name => $perl_class, base_classes => [ $node ], condition => $node->condition, emit_condition => $node->condition_expression, methods => [ @new_constructors, @call_base, @destructors ], ); push @$nodes, $new_class; # THIS HACK DOES NOT WORK ##if( $nonobject_forced ) { ## ## # No pure virtual methods so user is expecting ## # Wx::Something->new to work ( as opposed to Wx::PlSomething->new ). ## # Hack a set of constructors so that user expectation will ## # be met in most cases. ## ## my $use_perl_class = $perl_class; ## $use_perl_class =~ s/^Wx::Pl/Wx::/; ## my $ctors_class = ExtUtils::XSpp::Node::Class->new ## ( cpp_name => $cpp_class, ## perl_name => $use_perl_class, ## condition => $node->condition, ## emit_condition => $node->condition_expression, ## methods => [ @new_constructors ], ## ); ## ## push @$nodes, $ctors_class; ##} } else { $node->add_methods( @new_constructors ); if( @call_base ) { # make calls to base_* methods available; needs to be a # new class object because the generated methods are only # available in the generated C++ class # # does not specify base classes because the base class # list is emitted for the class in $node; at some # point XS++ should be fixed to detect and remove the # duplicate base class list # for now hack out any duplicates ourself { my %callbasenamehash; for my $callmethod ( @call_base ) { if( $callmethod->isa('ExtUtils::XSpp::Node::Method') ) { my $pmname = $callmethod->perl_name; $callbasenamehash{$pmname} = 1; } } my @delmethods = (); for my $basemethod ( @{$node->methods} ) { if( $basemethod->isa('ExtUtils::XSpp::Node::Method') ) { my $pmname = $basemethod->perl_name; push( @delmethods, $basemethod ) if exists($callbasenamehash{$pmname}); } } $node->delete_methods( @delmethods ) if @delmethods; } # end of hack my $new_class = ExtUtils::XSpp::Node::Class->new ( cpp_name => $cpp_class, perl_name => $perl_class, condition => $node->condition, emit_condition => $node->condition_expression, methods => [ @call_base ], ); push @$nodes, $new_class; } } } } 1; Wx-0.9923/Changes000664000000000000 5552512316264534 12016 0ustar00Mark000000000000Revision history for Perl extension Wx. 0.9923 Mon Mar 31 2014 - added wxWindow::InitDialog - updated wxComboBox::GetSelection - build wxWidgets 3.0.0 - added wxComboBox::Popup() wxComboBox::Dismiss() ( Eric Colson ) 0.9922 Wed May 01 2013 - added wxCommandLinkButton - updates to ID creation methods - rt#84633 - added wxUIActionSimulator - wxFindReplaceDialog new return a hash type object - wxProgressDialog updates - IPC classes object deletion updates - wxString conversion UTF-8 only in Unicode builds - typemap template missing some specs since 0.9917 0.9921 Sun Apr 14 2013 - Fix 2.9.4 handling of wxConnection::Execute 0.9919 Sat Apr 13 2013 - Makefile checks for supported Wx version - Fixed wxUSE_DATAVIEWCTRL constant ( rt#84566 ) - wrapped wxRegionIterator - wrapped IPC - wxConnection / wxServer / wxClient 0.9918 Wed Apr 03 2013 - Added missing GetItemFont / SetItemFont for Wx::ListCtrl - Fixed wxFontEnumerator GetEncodings / GetFacenames ( thanks to Marton Papp ) - Wrapped wxFontEnumerator callbacks 0.9917 Mon Feb 11 2013 - Stopped wxWidgets >= 2.9.0 from setting locale to current user locale ( thanks to Tarek Unger ) 0.9916 Sat Jan 19 2013 - put correct version check around wxLogChain::DetachOldLog - fixed paper type tests in ext/print/09_paper.t 0.9915 Sun Dec 30 2012 - fix bug for wxMac and wxwidgets 2.9.4+ in cpp/app.h - add some missing aui events 0.9914 Tue Oct 02 2012 - Wx::StyledTextCtrl additions for 2.9.4 - wxLog functions for 2.9.x added - wrapped wxRearrangeCtrl - added start of Wx::PerlTest - to aid documentation and examples - Additions for Wx::XSP::* classes - wrapped wxEventFilter for 2.9.3 + - updated missing Wx::App methods for 2.9.4 + - added wxEvtHandler::ProcessEventLocally for 2.9.1+ - added some absent wxWindow methods - updated wxTopLevelWindow - added wxFrame::ProcessCommand 0.9913 Fri Sep 28 2012 - ld build fix for some 64 bit *nix 0.9912 Fri Sep 21 2012 - wrapped wxListCtrl::SetItemPtrData. - updated to use sv_magicext / mg_findext so external modules do not stomp on our magic. - updated wxListView so that LC_VIRTUAL style works. - set wxListCtrl full constructor to create evthandler. - updated Wx::Ribbon controls for 2.9.4 interface + tool/button 'Add' and 'Insert' methods now return objects as described in the docs instead of int id's. - added SetClientData to PGProperty and PropertyGridInterface - Wx::ToolBar->SetClientData now deletes any prior set Wx::Object - wxDataViewListCtrl and wxDataViewListStore - fix ClientData for >= 2.9.4 - /usr/local/lib needs removing from LD:DL:FLAGS on all *nix types - nostdinc now removed from any flags on MacOSX - Fixed handling of asserts and debug level > 0 on wxWidgets >= 2.9.3 - Added wxApp::OnAssertFailure 0.9911 Fri Aug 24 2012 - wxDataView - updated for 2.9.4 - wxTreeEvent::GetKeyEvent() added - wxRichTextCtrl::LineBreak() added 0.9910 no release 0.9909 Thu May 31 2012 - corrected wxThePrintPaperDatabase 0.9908 Tue May 22 2012 - wxHtmlPrintout & wxRichTextPrintout correct typemap and destruction - wxRichTextBuffer - added copy constructor - wxPrintPaperDatabase & wxPrintPaperType added 0.9907 Thur May 10 2012 - wrapped wxHtmlPrintout - added missing wxPrintout methods - fixed GetPageInfo for wxRichTextPrintout - fixed broken Makefile.PL with recent EUMM on Mac - some minor additions to RichTextCtrl/RichTextBuffer 0.9906 Tue Mar 27 2012 - wrapped wxWebView ( wxWidgets ge 2.9.3 ) - wrapped wxTimePickerCtrl ( wxWidgets ge 2.9.3 ) - wrapped wxRichToolTip ( wxWidgets ge 2.9.3 ) - wrapped wxBannerWindow ( wxWidgets ge 2.9.3 ) - Allow RichTextPrinting without dialog ( wxWidgets ge 2.9.4 ) (thanks to Steve Cookson ) - wrapped some missing wxPrintData methods 0.9905 Fri Mar 16 2012 - wrapped wxPropertyGrid ( wxWidgets ge 2.9.3 ) - wrapped native wxTreeListCtrl ( wxWidgets ge 2.9.3 ) - wrapped wxRibbonControl ( wxWidgets ge 2.9.3 ) - ShowModal implementation for wxPrintDialog and wxPageSetupDialog ( thanks to Tomohiro Hosaka ) - recent EUMM breaks EU_MY_Metafile 0.9904 Tue Feb 28 2012 - Implemented TextCtrlIface for RichTextCtrl in >= 2.9.2 - Implemented TextCtrlIface for SearchCtrl in >= 2.9.2 - several 2.9.2 / 2.9.3 compatibility changes - Some additional RichText events wrapped - ( thanks to Steve Cookson ) - wrapped STC specific LineUp and LineDown - wrapped some specific Set/GetLayoutDirection - Fixes for OSX Xcode 4.3 builds 0.9903 Wed Nov 09 08:00:00 BST 2011 - Remove force of static binding for mingw libgcc & libstdc++ 0.9902 Thu Oct 13 08:00:00 BST 2011 - 2.9.2 will now build with recent mingw compilers (>= gcc 4.5.2) - Fixed MSVC6 build (broken in 0.9702) - wrapped wxLogChain::DetachOldLog - added wxDF_UNICODETEXT - added wxMediaCtrl constants for all events 0.9901 Mon June 06 12:00:00 BST 2011 - Bumped ExtUtils::XSpp dependency to 0.1602 - added Wx::Frame::SendSizeEvent 0.99 Thu May 05 08:00:00 BST 2011 - Release 0.98_01 as 0.99 0.98_01 Thu Apr 21 20:31:30 CEST 2010 - Added wxProgressDialog::Pulse (wxWidgets 2.8) - Mac SetFrontProcess can be switched off for editors and tests using env variable. Still switched on by default. Added detail to Wx pod - Added several wxLog functions & methods + Wx::PLlog::Flush - Added wxDateTime::IsValid wxSplitterWindow::UpdateSize - fix for Wx::Locale::FindLanguageInfo / GetLanguageInfo - wxPli_create_evthandler added for VListBox and VScrolledWindow - Added OnDrawSeparator and OnDrawBackground for VListBox - added GradientFillConcentric & DrawLabel for wxDC 0.98 Wed Aug 18 20:31:30 CEST 2010 - wxWidgets 2.9.1 compatibility. - die() when wxWidgets initialization fails. 0.9702_01 Tue Jul 6 21:38:17 CEST 2010 - Can now run using the standard perl interpreter on Mac OS X (suggested by Kyle McKay). - Added wxSpinCtrlDouble (2.9). - Added wxDataViewListCtrl (2.9). - Added wxDataViewVirtualListModel (2.9). - Added wxInfoBar (2.9). - Added wxHeaderCtrlSimple (2.9). 0.9702 Thu May 6 01:53:50 CEST 2010 - Released 0.9701_02 as 0.9702. 0.9701_02 Mon Apr 26 21:56:09 CEST 2010 - Wrapped wxRichTextPrinting 0.9701_01 Tue Mar 30 22:46:33 CEST 2010 - 64 Bit build fixes. - Wrapped wxMenuBar::MacSetCommonMenuBar, MacInstallMenuBar - Wrapped wxGCDC::GetGraphicsContext 0.9701 Thu Feb 11 16:03:42 CET 2010 - Bump the required version of ExtUtils::XSpp and ExtUtils::ParseXS. 0.97 Tue Feb 9 22:57:14 CET 2010 - Added wxOverlay and wxDCOverlay (2.8) (thanks to Mark Dootson). - Added Wx::Loader - allows PPM distributions and packagers to override wx dll loading (see Wx::Loader pod) - Loading plugins - local override of dl_load_file now uses Wx::_load_plugin during XSLoader::load 0.96 Sat Jan 9 10:40:00 CET 2010 - Fixed Windows MSVC 6 build. 0.95 Fri Dec 25 18:24:44 CET 2009 - Only preload wxWidgets' DLL under Windows. - Some Windows build fixes. 0.94 Sun Nov 8 14:10:32 CET 2009 - Remove the last use of the xspp command line script. - Compilation fix for Strawberry Perl 5.10 (probably needed for all Perl 5.10 builds on Windows). - wxWidgets 2.9.0 compatibility. 0.93 Gio 24 Set 2009 21:34:10 CEST - Use ExtUtils::XSpp::Cmd instead of the xspp command line script. 0.92 Thu Aug 6 21:04:59 CEST 2009 - Compilation fix for ActivePerl. - First public release to use ExtUtils::XSpp. 0.91_01 Thu Jun 25 00:30:17 CEST 2009 - xspp is no longer part of Wx (See ExtUtils::XSpp) 0.91 Sun May 17 18:55:45 CEST 2009 - Threading fixes for 25 classes. - Fixed Windows build (patch by Ahmad Zawawi). 0.90 Sun May 10 09:24:25 CEST 2009 - Miscellaneous build/compilation fixes. 0.89 Sat Dec 6 11:39:54 CET 2008 - Fix crash when using AUI and threads. 0.88 Sun Nov 9 18:03:25 CET 2008 - Skip author tests unless $ENV{AUTHOR_TESTS} is set. 0.87 Fri Nov 7 20:31:09 CET 2008 - Fix segmentation fault when building under Mac in ANSI mode. 0.86 Wed Sep 3 22:57:17 CEST 2008 - Allow binding a method to an event, not just a sub reference. - Add Wx::SetAlwaysUTF8() to always return character strings from wxWidgets methods, even in ANSI mode (does nothing if wxWidgets is compiled with Unicode enabled). - Warn if INC/LIB are passed to Makefile.PL, since this might cause the build to fail. 0.85 Sun Aug 24 11:26:38 CEST 2008 - Compilation fixes for wxMotif (patch by Marek Rouchal). - On Mac OS X warn the user if it is not running the program using wxPerl. 0.84 Sun Jun 29 21:43:31 CEST 2008 - Workaround for crash on exit on DEBUGGING Perls (mostly affects Fedora users) 0.83 Mon May 19 22:37:36 CEST 2008 - Avoid 'deep recursion' errors and eating all available memory when loading wxPerl fails. - Handle INSTALL_BASE under Mac OS X. 0.82 Thu Mar 27 00:45:59 CET 2008 - Fixed running Makefile.PL in absence of Alien::wxWidgets. - Renamed wx_xspp.pl and wx_overload.pl to wxperl_xspp and wxperl_overload, to comply with Debian policy. 0.81 Sat Jan 19 17:36:33 CET 2008 - Almost completed the interface of wxStyledTextCtrl. - Added wxBitmapToggleButton and wxSVGFileDC (2.9). - Added wxWrapSizer (2.9). - Added wxNotificationMessage (2.9). - Added wxMirrorDC and wxDCClipper. - Partially completed interface to wxDataViewCtrl (2.9). 0.80 Tue Nov 6 23:12:53 CET 2007 - Build fixes for Windows (both dmake and nmake). - Prototype implementation of wxVariant and wxDataViewCtrl (2.9). 0.79 Thu Oct 18 00:52:35 CEST 2007 - Windows compilation fixes (thanks to John Kizlyk for the report). - Try to handle gracefully the absence of Alien::wxWidgets under Mac OS X. - Added Alien::wxWidgets to configure_requires. 0.78 Mon Oct 15 23:54:13 CEST 2007 - Added wxRichTextBuffer and wxRichTextFileHandler, wxRichTextHTMLHandler, wxRichTextXMLHandler (2.7). - Added wxSymbolPickerDialog (2.7). - Added wxDisplay, wxGenericDirCtrl. - Added wxFileCtrl (2.9). - Added wxStandardPaths (2.6). - Wrapped the remaining wxGraphics* classes (2.7). 0.77 Thu Aug 23 21:59:25 CEST 2007 - Added wxGraphicsContext (2.7) and some related classes (patch by Klaas Hartmann). - Added wxCollapsiblePane (2.7). - Added wxBitmapComboBox (2.7). - Added wxAnimation and wxAnimationCtrl (2.7). - Added wxPropertySheetDialog (2.6). - Added wxPasswordEntryDialog (2.6). - Added wxCommand and wxCommandProcessor. - Added wxHScrolledWindow and wxHVScrolledWindow and made wx[HV]ScrolledWindow subclassable from Perl. 0.76 Thu Aug 16 00:21:00 CEST 2007 - Added wxEditableListBox (2.9). - Added wxSearchCtrl (2.8). - Added wxComboCtrl and wxOwnerDrawnComboBox (2.7). - Added EVT_HTML_XXX event handlers. 0.75 Sun Jul 8 22:43:41 CEST 2007 - wxWidgets 2.9.x compatibility. - Changed wxInputStream::READLINE to always return bytes. 0.74 Sun Apr 29 00:53:23 CEST 2007 - Minor compilation and runtime fixes. 0.73 Tue Apr 17 22:49:32 CEST 2007 - wxWidgets 2.9.x compatibility. 0.72 Sun Apr 1 00:33:54 CEST 2007 - Compilation fixes for GCC 3.4. - Compilation fixes for wxMotif/wxWidgets 2.6.3. 0.71 Thu Mar 29 21:53:11 CEST 2007 - Fix all remaining known thread issues. 0.70 Thu Mar 22 00:08:20 CET 2007 - wxWidgets 2.9.x compatibility. - Improved creation of wxDocument/wxView subclasses in Wx::DocTemplate. 0.69 Fri Mar 16 20:54:50 CET 2007 - Fix crash caused by Wx::PlThreadEvent. - Some documentation of using wxPerl with threads. 0.68 Sat Mar 10 21:45:26 CET 2007 - Added wxSystemOptions (thanks to Mark Dootson). - Fix a thread-related crash. 0.67 Sat Dec 16 19:36:37 CET 2006 - Try to handle gracefully the case when Alien::wxWidgets is missing, restoring the 0.49_05 behaviour. 0.66 Fri Dec 15 22:47:54 CET 2006 - wxWidgets 2.8.0 compatibility. 0.65 Sun Dec 3 16:49:02 CET 2006 - Windows compilation fixes. 0.64 Sun Nov 26 18:32:03 CET 2006 - Removed support for wxWidgets 2.7.0 and 2.7.1. - Added Wx::GridCellAutoWrapStringRenderer, Wx::GridCellAutoWrapStringEditor, Wx::GridCellEnumRenderer, Wx::GridCellEnumEditor, Wx::GridCellDateTimeRenderer (thanks to Mark Dootson). - Added wxRichTextFormattingDialog. 0.63 Wed Nov 15 21:40:28 CET 2006 - Fix failing tests under Mac. 0.62 Mon Nov 13 23:16:41 CET 2006 - Fix Windows compilation. - Fix Mac OS X build. 0.61 Sun Nov 12 18:33:41 CET 2006 - Added Advanced User Interface (AUI) (2.7). - Wrapped more wxRichTextCtrl support classes (2.7). 0.60 Sat Nov 11 16:48:57 CET 2006 - Added wxRichTextCtrl and some related classes (2.7). - Removed support for wxWidgets 2.4. Supports 2.5.3 and above. - Added wxSimpleHtmlListBox, wxColourPickerCtrl, wxFontPickerCtrl, wxFilePickerCtrl, wxDirPickerCtrl, wxAboutDialog (2.7). - Resolved memory leak with classes derived from Wx::PlEvent and Wx::PlCommandEvent. 0.59 Fri Oct 20 22:05:45 CEST 2006 - Fix packaging error in 0.58. 0.58 Thu Oct 19 21:54:04 CEST 2006 - Added wxVScrolledWindow, wxVListBox, wxHtmlListBox. - Support wxWidgets RTL API (2.7). - Fix various bugs in wxStreams <=> Perl filehandles interoperability. 0.57 Sun Aug 27 17:25:18 CEST 2006 - Added wxHtmlDCRenderer (thanks to Mark Dootson). - Made the XS++ and overload preprocessors installable, to be used by extensions. - Removed the demo and some samples, replaced by Wx::Demo (a separate CPAN distribution). 0.56 Fri Aug 11 22:29:33 CEST 2006 - Many thread-safety fixes. - wxMotif compatibility. - Build again under Windows. 0.55 Sun Aug 6 19:48:31 CEST 2006 - Mac OS X 10.4 with latest Xcode compilation fixes. - Added wxTreebook, wxChoicebook, wxHyperlinkCtrl, wxPowerEvent. (2.7) - Added Wx::SimpleApp. - Make the example in the SYNOPSIS actually show a window. 0.54 Sun Jul 16 14:26:52 CEST 2006 - Compatibility with GCC 4.0 and 4.1. - Minor compatibility fixes for various wxWidgets releases. 0.53 Sun Jul 9 12:42:59 CEST 2006 - wxWidgets 2.4 and wxMac compilation fixes. 0.52 Fri Jul 7 22:29:57 CEST 2006 - Compilation fixes when wxMediaCtrl is disabled in wxWidgets. 0.51 Wed Jul 5 20:41:48 CEST 2006 - Added Wx::Sound. - Compilation fixes for MSVC8 (thanks to John Ralls). - Bumped Alien::wxWidgets requirement to 0.15. 0.50 Fri Jun 23 11:51:17 CEST 2006 - Fixed pod tests to work with older Test::Pod releases. 0.49_07 Sun Jun 18 18:06:05 CEST 2006 - Compilation fixes for wxWidgets 2.5.3. - More additions for wxWidgets 2.7.x. 0.49_06 Sun May 21 22:34:21 CEST 2006 - Compatibility with wxWidgets CVS HEAD. - Added various missing functions for wxWidgets 2.6.x and 2.7.x. 0.49_05 Mon May 1 18:27:14 CEST 2006 - When Alien::wxWidgets is missing try to retrigger rebuilding of the Makefile using a dummy dependency. 0.49_04 Sat Apr 22 23:36:15 CEST 2006 - Fixed reference counting/ownership for Wx::PlDataObject. 0.49_03 Thu Apr 20 22:40:37 CEST 2006 - Handle Alien::wxWidgets prerequisite correctly. 0.49_02 Sun Apr 16 20:45:39 CEST 2006 - Added missing files to MANIFEST. 0.49_01 Sun Apr 16 17:01:25 CEST 2006 - Added Wx::MediaCtrl. - Refactored build system, now based upon Alien::wxWidgets. 0.27 Sun Jan 1 21:13:27 CET 2006 - Restored compatibility with wxWidgets 2.5.3. - Build a proper application bundle under Mac OS X. 0.26 Tue Nov 22 20:16:34 CET 2005 - Fixed various Wx::GridBagSizer problems. - Fixed Original Object Return for Wx::PlGridCellEditor and Wx::PlGridCellRenderer. - Removed the requirement of deriving from Wx::App. - Expanded Wx::PlWindow. - Added Wx::Perl::TextValidator (thanks to Johan Vromans). - Changed the interface for Wx::PlDataObjectSimple::GetDataHere. - Added Wx::BufferedDC and Wx::BufferedPaintDC. - Added wxStdButtonSizer. - Build out of the box on FreeBSD. 0.25 Sun Jul 10 20:39:30 CEST 2005 - Added back Wx::NotebookSizer (removed by accident). - Fixed off-by-one error in Wx::Log::SetTimestamp. - Fixed crash with eval + use in event handler. - Fixed test suite for wxWidgets 2.4.x. 0.24 Tue Jul 5 21:42:28 CEST 2005 - Fix using wxPerl with PAR on Linux. 0.23 Sun Jun 26 20:33:17 CEST 2005 - Added wxArtProvider and Wx::PlArtProvider (thanks to Matthew "Cheetah" Gabeler-Lee). - Compatibility with wxWidgets 2.5.4, 2.6.0 and 2.6.1. - Added Wx::PlPreviewFrame, Wx::PlPreviewControlBar, Wx::PrintFactory. - Added Wx::PopupWindow and Wx::PopupTransientWindow. - Added Wx::DatePickerCtrl. (2.5/2.6) - Added Wx::MimeTypesManager. 0.22 Tue Jan 4 23:07:56 CET 2005 - Alpha channel support for Wx::Image (2.5). - Wrapped wxChoicebook (2.5). - Various new APIs for wxWidgets 2.5.x. 0.21 Sat Dec 11 18:01:25 CET 2004 - Fixed installation of 'wxPerl' command on Mac OS X. - Fixed running in the embedded case (still requires the application to call ExitMainLoop at the right places). - Wrapped wxNavigationKeyEvent. - Using die() in an event handler should not crash anymore (it might leak). - Added Wx::PlWindow, to be used for custom controls. - New (Windows-only) --mslu flag for Makefile.PL. - Wx::NotebookSizer is now no longer needed and deprecated. 0.20 Sun Jun 20 10:52:40 CEST 2004 - wxWidgets 2.5.2 compilation fixes. - Fixed wxHtmlWindow behaviour on non-Win32 platforms. 0.19 Sat Apr 24 12:32:36 CEST 2004 - Started wxHtmlParser/wxHtmlTag/custom tag handlers wrapping. - Mac OS X build now installs the 'wxPerl' binary in perl bin directory. - wxDatagramSocket and wxSockAddress. - wxNumberEntryDialog. (2.5) - wxGridBagSizer. (2.5) - wxListbook. (2.5) 0.18 Sun Nov 23 14:42:39 CET 2003 - Corrected handling of UTF-8 encoded strings in ANSI builds. - Added wxGridTableMessage. - Fixed build problems with GTK 2 and/or Unicode on Unix hosts. 0.17 Tue Sep 9 22:45:40 CEST 2003 - Bugfix release. - Completed wxWindows 2.5 compatibility. 0.16 Mon Aug 25 00:26:44 CEST 2003 - Added Wx::PlGridCellEditor and Wx::PlGridCellRenderer for custom Wx::Grid cell editing/displaying. - Added Wx::PlGridTable for custom Wx::Grid storage. - Fixed Wx::SocketServer::Accept. - Added Wx::PlXmlResourceHandler, for inserting custom controls in XRC resources. - wxWindows 2.5 compatibility. 0.15 Mon May 19 15:39:05 CEST 2003 - Removed support for wxWindows 2.2.x and 2.3.x. - Removed support for Perl 5.004. - Started documentation for the extension api (see Wx/Api.pod). - Added wxFrame/wxDialog::SetShape. 0.14 Fri Apr 25 23:04:42 CEST 2003 - Added Wx::CalendarCtrl. - Added Wx::DateTime (not the full interface). - Restored compatibility with perl 5.005. - Internal changes: objects returned by various constructors will not have an additional _WXTHIS key anymore. 0.13 Tue Mar 11 19:27:04 CET 2003 - New build system, allows building wxPerl extension written using XS outside the wxPerl tree. - Added Wx::Wave - Added Wx::MemoryFSHandler - Added Wx::Perl::Carp (thanks to podmaster). - Mac OS X support (requires wxWindows 2.4.0 or newer). - Added Wx::Socket* (thanks to Graciliano M. P.) 0.12 Mon Dec 02 17:50:43 CET 2002 - new DEPRECATIONS section in README.txt, please read it - it is now possibile to get the native handle of a Wx::Window - implemented wxWizard and related classes - Document/View framework (thanks to Simon Flack) - Mostly completed wxStyledTextCtrl interface (thanks to Graciliano M. P. and Simon Flack) - implemented wxFontEnumerator and wxFontMapper - implemented wxLogChain and wxLogPassThrough (2.3) - Wx::PlLog, Wx::PlLogPassThrough, for custom logging 0.11 Thu Aug 01 15:59:59 CEST 2002 - wxTextAttr (2.3) - wxStyledTextControl, based on Scintilla (thanks to Marcus Friedlaender) - Wx::Perl::SplashFast, for faster splash screens (thanks to Graciliano M. P.) - wxToolBarTool - Wx::PlFileSystemHandler, for custom file system handlers - compatibility with Perl 5.7.3 and later - updated build instructions, using suggestions from Graciliano M. P. and Marcus Friedlaender - allow compilation of a single big Wx.so/dll; this allows building against a static wxWindows library - wxThread::IsMain(), some testing with threads for Perl 5.7.3 (works with some caveats) - wxPlEvent and wxPlCommandEvent 0.10 Sun Mar 03 19:33:55 2002 - Fix a silly typo that broke wxTaskBar 0.09 Fri Mar 01 20:59:59 2002 - wxTaskBarIcon (MS Windows only) - wxGrid, wxGridCellAttr - wxGridCellRenderer, wxGridCellEditor - wxProcess and wxExecute - wxConfig 0.08 Sat Dec 01 10:23:44 2001 - wxToggleButton (2.3) - wxSingleInstanceChecker (2.3) - wxListView, virtual wxListCtrl (2.3) - build system reorganization, hope this one is the last one... - XRC (Xml ResourCes) wrapper (2.3) - wxClipboard & wxDataObject - Drag-and-Drop support - MDI architecture - wxBestHelpController (2.3) - startup tips (wxShowTip, etc) - wxFindReplaceDialog (2.3) - wxPerl demo (like the wxPython one) - wxSplashScreen 0.07 Thu Jul 19 13:46:58 2001 - wxFileSystem & related classes wrappers - wxHtmlEasyPrinting, wxPageSetupDialog - Unicode support for Perl 5.6 - Printing Framework 0.06 Tue Apr 10 17:28:56 2001 - changelog started - new, modular build system - Wx object module now exports functions (using __declspec on Win32, an auxiliary structure containig pointer to functions on other platforms) to related extension modules - infrastructure for other modules exporting constants from Wx - wxStream wrappers - wxHtmlWindow, wxHtmlHelpController wrappers - wx*HelpController* wrappers - added ppmdist target for Win32 0.05 Sun Mar 04 15:01:03 2001 - Wx::AcceleratorTable/Entry - most common dialogs - Wx::PlSizer (user defined sizer) - Wx::ListCtrl - Wx::TreeCtrl - Wx::Log classes - Wx::Timer - Wx::SystemSettings - some other minor classes (search for PACKAGE= in the sources) 0.04 Sat Jan 20 15:02:04 2001 - Better overloaded method support - Perl 5.004_04 compatibility - MinGW compilation (with ActivePerl and Perl built from sources) - wxMotif support (alpha) 0.03 Mon Dec 04 15:00:01 2000 - First public release 0.02 Thu Nov 30 xx:xx:xx 2000 0.01 Tue Nov 28 xx:xx:xx 2000 Wx-0.9923/Constant.xs000664000000000000 37226012306612226 12700 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: Constant.xs // Purpose: defines the constant() and SetConstants() functions // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: Constant.xs 3470 2013-04-13 08:38:19Z mdootson $ // Copyright: (c) 2000-2011 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #undef bool #define PERL_NO_GET_CONTEXT #define WXINTL_NO_GETTEXT_MACRO 1 #ifdef __WXWINCE__ #include // must see struct tm early #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(__WXMSW__) || defined(wxHAS_TASK_BAR_ICON) #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "cpp/wxapi.h" #include "cpp/setup.h" #if WXPERL_W_VERSION_GE( 2, 5, 1 ) #include #include #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) #include #include #endif #if WXPERL_W_VERSION_GE( 2, 5, 4 ) #include #endif #if WXPERL_W_VERSION_GE( 2, 6, 0 ) #include #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) #include #include #include #include #ifdef __WXGTK20__ #define __WXGTK20__DEFINED #undef __WXGTK20__ #endif #include #ifdef __WXGTK20__DEFINED #define __WXGTK20__ #endif #include #include #include #include #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) #include #include #include #include #endif #if WXPERL_W_VERSION_GE( 2, 8, 3 ) #include #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) #include #include #include #endif #if WXPERL_W_VERSION_GE( 2, 9, 3 ) #include #include #include #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) && !WXWIN_COMPATIBILITY_2_6 #define wxCHB_DEFAULT wxBK_DEFAULT #define wxCHB_TOP wxBK_TOP #define wxCHB_BOTTOM wxBK_BOTTOM #define wxCHB_LEFT wxBK_LEFT #define wxCHB_RIGHT wxBK_RIGHT #define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK #define wxLB_DEFAULT wxBK_DEFAULT #define wxLB_TOP wxBK_TOP #define wxLB_BOTTOM wxBK_BOTTOM #define wxLB_LEFT wxBK_LEFT #define wxLB_RIGHT wxBK_RIGHT #define wxLB_ALIGN_MASK wxBK_ALIGN_MASK #define wxNB_DEFAULT wxBK_DEFAULT #define wxNB_TOP wxBK_TOP #define wxNB_BOTTOM wxBK_BOTTOM #define wxNB_LEFT wxBK_LEFT #define wxNB_RIGHT wxBK_RIGHT #define wxNB_HITTEST_NOWHERE wxBK_HITTEST_NOWHERE #define wxNB_HITTEST_ONICON wxBK_HITTEST_ONICON #define wxNB_HITTEST_ONLABEL wxBK_HITTEST_ONLABEL #define wxNB_HITTEST_ONITEM wxBK_HITTEST_ONITEM #endif #if WXPERL_W_VERSION_LT( 2, 7, 0 ) #define wxFD_OPEN wxOPEN #define wxFD_SAVE wxSAVE #define wxFD_OVERWRITE_PROMPT wxOVERWRITE_PROMPT #define wxFD_FILE_MUST_EXIST wxFILE_MUST_EXIST #define wxFD_MULTIPLE wxMULTIPLE #define wxFD_CHANGE_DIR wxCHANGE_DIR #endif #if WXPERL_W_VERSION_LT( 2, 6, 0 ) #define wxDEFAULT_CONTROL_BORDER wxBORDER_SUNKEN #endif #if WXPERL_W_VERSION_LT( 2, 9, 0 ) #define wxBORDER_THEME wxBORDER_DEFAULT #define wxBRUSHSTYLE_INVALID -1 #define wxBRUSHSTYLE_SOLID wxSOLID #define wxBRUSHSTYLE_TRANSPARENT wxTRANSPARENT #define wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE wxSTIPPLE_MASK_OPAQUE #define wxBRUSHSTYLE_STIPPLE_MASK wxSTIPPLE_MASK #define wxBRUSHSTYLE_STIPPLE wxSTIPPLE #define wxBRUSHSTYLE_BDIAGONAL_HATCH wxBDIAGONAL_HATCH #define wxBRUSHSTYLE_CROSSDIAG_HATCH wxCROSSDIAG_HATCH #define wxBRUSHSTYLE_FDIAGONAL_HATCH wxFDIAGONAL_HATCH #define wxBRUSHSTYLE_CROSS_HATCH wxCROSS_HATCH #define wxBRUSHSTYLE_HORIZONTAL_HATCH wxHORIZONTAL_HATCH #define wxBRUSHSTYLE_VERTICAL_HATCH wxVERTICAL_HATCH #define wxBRUSHSTYLE_FIRST_HATCH wxFIRST_HATCH #define wxBRUSHSTYLE_LAST_HATCH wxLAST_HATCH #define wxPENSTYLE_INVALID -1 #define wxPENSTYLE_SOLID wxSOLID #define wxPENSTYLE_DOT wxDOT #define wxPENSTYLE_LONG_DASH wxLONG_DASH #define wxPENSTYLE_SHORT_DASH wxSHORT_DASH #define wxPENSTYLE_DOT_DASH wxDOT_DASH #define wxPENSTYLE_USER_DASH wxUSER_DASH #define wxPENSTYLE_TRANSPARENT wxTRANSPARENT #define wxPENSTYLE_STIPPLE_MASK_OPAQUE wxSTIPPLE_MASK_OPAQUE #define wxPENSTYLE_STIPPLE_MASK wxSTIPPLE_MASK #define wxPENSTYLE_STIPPLE wxSTIPPLE #define wxPENSTYLE_BDIAGONAL_HATCH wxBDIAGONAL_HATCH #define wxPENSTYLE_CROSSDIAG_HATCH wxCROSSDIAG_HATCH #define wxPENSTYLE_FDIAGONAL_HATCH wxFDIAGONAL_HATCH #define wxPENSTYLE_CROSS_HATCH wxCROSS_HATCH #define wxPENSTYLE_HORIZONTAL_HATCH wxHORIZONTAL_HATCH #define wxPENSTYLE_VERTICAL_HATCH wxVERTICAL_HATCH #define wxPENSTYLE_FIRST_HATCH wxFIRST_HATCH #define wxPENSTYLE_LAST_HATCH wxLAST_HATCH #endif #define wxNavigateBackward wxNavigationKeyEvent::IsBackward #define wxNavigateForward wxNavigationKeyEvent::IsForward #define wxNavigateWinChange wxNavigationKeyEvent::WinChange #define wxNavigateFromTab wxNavigationKeyEvent::FromTab ////////////////////////////////////////////////////////////////////////////// // implementation for wxPlConstantsModule OnInit/OnExit ////////////////////////////////////////////////////////////////////////////// #include "cpp/constants.h" #include WX_DECLARE_LIST( PL_CONST_FUNC, wxPlConstantFunctions ); WX_DEFINE_LIST( wxPlConstantFunctions ); static wxPlConstantFunctions& s_functions() { static wxPlConstantFunctions* var = new wxPlConstantFunctions; return *var; } void wxPli_add_constant_function( double (**f)( const char*, int ) ) { s_functions().Append( f ); } void wxPli_remove_constant_function( double (**f)( const char*, int ) ) { s_functions().DeleteObject( f ); } ////////////////////////////////////////////////////////////////////////////// // descriptor for all event macros ////////////////////////////////////////////////////////////////////////////// // event macros #define SEVT( NAME, ARGS ) wxPli_StdEvent( NAME, ARGS ) #define EVT( NAME, ARGS, ID ) wxPli_Event( NAME, ARGS, ID ) #define DEVT( NAME ) wxPli_Event( NAME, 0, 0 ) // !package: Wx::Event // !tag: // !parser: sub { $_[0] =~ m<^\s*S?EVT\(\s*(\w+)\s*\,> } static wxPliEventDescription evts[] = { EVT( EVT_COMMAND, 4, -1 ) SEVT( EVT_TIMER, 3 ) SEVT( EVT_WIZARD_PAGE_CHANGED, 3 ) SEVT( EVT_WIZARD_PAGE_CHANGING, 3 ) SEVT( EVT_WIZARD_CANCEL, 3 ) SEVT( EVT_WIZARD_HELP, 3 ) SEVT( EVT_CHILD_FOCUS, 2 ) SEVT( EVT_WIZARD_FINISHED, 3 ) SEVT( EVT_ICONIZE, 2 ) SEVT( EVT_MAXIMIZE, 2 ) #if WXPERL_W_VERSION_GE( 2, 6, 0 ) SEVT( EVT_MOUSE_CAPTURE_CHANGED, 2 ) #endif SEVT( EVT_CREATE, 3 ) SEVT( EVT_DESTROY, 3 ) EVT( EVT_WINDOW_CREATE, 3, wxEVT_CREATE ) EVT( EVT_WINDOW_DESTROY, 3, wxEVT_DESTROY ) #if WXPERL_W_VERSION_GE( 2, 7, 0 ) SEVT( EVT_MOUSE_CAPTURE_LOST, 2 ) SEVT( EVT_SET_CURSOR, 2 ) EVT( EVT_COLOURPICKER_CHANGED, 3, wxEVT_COMMAND_COLOURPICKER_CHANGED ) EVT( EVT_FILEPICKER_CHANGED, 3, wxEVT_COMMAND_FILEPICKER_CHANGED ) EVT( EVT_DIRPICKER_CHANGED, 3, wxEVT_COMMAND_DIRPICKER_CHANGED ) EVT( EVT_FONTPICKER_CHANGED, 3, wxEVT_COMMAND_FONTPICKER_CHANGED ) #endif EVT( EVT_MENU_HIGHLIGHT_ALL, 2, wxEVT_MENU_HIGHLIGHT ) #if defined(__WXMSW__) && WXPERL_W_VERSION_GE( 2, 8, 0 ) EVT( EVT_TREE_STATE_IMAGE_CLICK, 3, wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK ) EVT( EVT_TREE_ITEM_GETTOOLTIP, 3, wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP ) #endif SEVT( EVT_TASKBAR_MOVE, 2 ) SEVT( EVT_TASKBAR_LEFT_DOWN, 2 ) SEVT( EVT_TASKBAR_LEFT_UP, 2 ) SEVT( EVT_TASKBAR_RIGHT_DOWN, 2 ) SEVT( EVT_TASKBAR_RIGHT_UP, 2 ) SEVT( EVT_TASKBAR_LEFT_DCLICK, 2 ) SEVT( EVT_TASKBAR_RIGHT_DCLICK, 2 ) #if WXPERL_W_VERSION_GE( 2, 8, 3 ) SEVT( EVT_TASKBAR_CLICK, 2 ) #endif SEVT( EVT_LEFT_DOWN, 2 ) SEVT( EVT_LEFT_UP, 2 ) SEVT( EVT_LEFT_DCLICK, 2 ) SEVT( EVT_MIDDLE_DOWN, 2 ) SEVT( EVT_MIDDLE_UP, 2 ) SEVT( EVT_MIDDLE_DCLICK, 2 ) SEVT( EVT_RIGHT_DOWN, 2 ) SEVT( EVT_RIGHT_UP, 2 ) SEVT( EVT_RIGHT_DCLICK, 2 ) #if WXPERL_W_VERSION_GE( 2, 9, 0 ) SEVT( EVT_MOVE_START, 2 ) SEVT( EVT_MOVE_END, 2 ) SEVT( EVT_AUX1_DOWN, 2 ) SEVT( EVT_AUX1_UP, 2 ) SEVT( EVT_AUX1_DCLICK, 2 ) SEVT( EVT_AUX2_DOWN, 2 ) SEVT( EVT_AUX2_UP, 2 ) SEVT( EVT_AUX2_DCLICK, 2 ) #else DEVT( EVT_AUX1_DOWN ) DEVT( EVT_AUX1_UP ) DEVT( EVT_AUX1_DCLICK ) DEVT( EVT_AUX2_DOWN ) DEVT( EVT_AUX2_UP ) DEVT( EVT_AUX2_DCLICK ) #endif #if WXPERL_W_VERSION_GE( 2, 8, 3 ) EVT( EVT_SEARCHCTRL_CANCEL_BTN, 3, wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN ) EVT( EVT_SEARCHCTRL_SEARCH_BTN, 3, wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN ) #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) EVT( EVT_COLLAPSIBLEPANE_CHANGED, 3, wxEVT_COMMAND_COLLPANE_CHANGED ) EVT( EVT_HYPERLINK, 3, wxEVT_COMMAND_HYPERLINK ) #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) SEVT( EVT_FILECTRL_FILEACTIVATED, 3 ) SEVT( EVT_FILECTRL_SELECTIONCHANGED, 3 ) SEVT( EVT_FILECTRL_FOLDERCHANGED, 3 ) #endif { 0, 0, 0 } }; ////////////////////////////////////////////////////////////////////////////// // the inheritance tree ////////////////////////////////////////////////////////////////////////////// struct wxPlINH { const char* klass; const char* base; }; #define I( class, base ) \ { "Wx::" #class, "Wx::" #base }, static wxPlINH inherit[] = { I( EvtHandler, Object ) I( Window, EvtHandler ) I( PopupWindow, Window ) I( PopupTransientWindow, PopupWindow ) I( PlPopupTransientWindow, PopupTransientWindow ) I( Menu, EvtHandler ) I( PlWindow, Window ) I( PlControl, Control ) I( MenuBar, Window ) I( TopLevelWindow, Window ) I( _App, EvtHandler ) I( Panel, Window ) I( Control, Window ) I( Button, Control ) I( BitmapButton, Button ) I( TextCtrlBase, Control ) I( TextCtrl, TextCtrlBase ) I( StaticText, Control ) I( CheckBox, Control ) I( CheckListBox, ListBox ) I( ControlWithItems,Control ) I( Choice, ControlWithItems ) I( EditableListBox, Panel ) I( ListBox, ControlWithItems ) I( VListBox, VScrolledWindow ) I( PlVListBox, VListBox ) #if WXPERL_W_VERSION_GE( 2, 5, 1 ) I( BookCtrl, Control ) I( Notebook, BookCtrl ) I( Listbook, BookCtrl ) I( Choicebook, BookCtrl ) I( Treebook, BookCtrl ) I( Toolbook, BookCtrl ) #else I( Notebook, Control ) #endif I( NumberEntryDialog, Dialog ) I( ToolBarBase, Control ) I( ToolBarSimple, Control ) I( StaticBitmap, Control ) I( Gauge, Control ) I( Gauge95, Gauge ) I( Slider, Control ) I( SpinCtrl, Control ) I( GenericDirCtrl, Control ) #if WXPERL_W_VERSION_GE( 2, 9, 0 ) I( FileCtrl, Control ) #endif I( SpinButton, Control ) #if WXPERL_W_VERSION_GE( 2, 9, 2 ) && !defined(__WXMAC__) I( SearchCtrl, Control ) #else I( SearchCtrl, TextCtrl ) #endif I( RadioBox, Control ) I( RadioButton, Control ) I( StaticLine, Control ) I( StaticBox, Control ) I( ScrollBar, Control ) I( StatusBarGeneric,Window ) I( GenericScrolledWindow, Panel ) #if WXPERL_W_VERSION_GE( 2, 7, 0 ) I( GenericTreeCtrl, Control ) #else I( GenericTreeCtrl, ScrolledWindow ) #endif I( MiniFrame, Frame ) I( SplitterWindow, Window ) I( SplashScreen, Frame ) I( ListCtrl, Control ) I( ListView, ListCtrl ) I( SashWindow, Window ) #if WXPERL_W_VERSION_GE( 2, 9, 2 ) I( ToggleButton, Control ) I( BitmapToggleButton, ToggleButton ) #else I( ToggleButton, Control ) I( BitmapToggleButton, Control ) #endif I( Wizard, Dialog ) I( WizardPage, Panel ) I( WizardPageSimple, WizardPage ) #if defined(__WXGTK__) && WXPERL_W_VERSION_GE( 2, 9, 0 ) I( GenericHyperlinkCtrl, Control ) I( HyperlinkCtrl, GenericHyperlinkCtrl ) #else I( HyperlinkCtrl, Control ) #endif I( NotificationMessage, EvtHandler ) I( ColourDialog, Dialog ) I( GenericColourDialog, ColourDialog ) I( FindReplaceDialog, Dialog ) I( FontDialog, Dialog ) I( GenericFontDialog, FontDialog ) #if defined(__WXGTK__) && WXPERL_W_VERSION_GE( 2, 7, 0 ) I( GenericDirDialog, Dialog ) I( DirDialog, GenericDirDialog ) #else I( DirDialog, Dialog ) #endif #if defined(__WXGTK__) I( GenericFileDialog, Dialog ) I( FileDialog, GenericFileDialog ) #else I( FileDialog, Dialog ) #endif I( TextEntryDialog, Dialog ) I( PasswordEntryDialog, TextEntryDialog ) I( MessageDialog, Dialog ) I( GenericMessageDialog, MessageDialog ) I( ProgressDialog, Dialog ) I( SingleChoiceDialog, Dialog ) I( MultiChoiceDialog, Dialog ) I( PropertySheetDialog, Dialog ) I( AnimationCtrl, Control ) I( Validator, EvtHandler ) I( PlValidator, Validator ) #if WXPERL_W_VERSION_GE( 2, 7, 2 ) I( Animation, GDIObject ) #endif I( Font, GDIObject ) I( Region, GDIObject ) I( RegionIterator, Object ) I( Bitmap, GDIObject ) I( Pen, GDIObject ) I( Palette, GDIObject ) I( WindowDC, DC ) I( ClientDC, WindowDC ) I( BufferedDC, MemoryDC ) I( BufferedPaintDC, BufferedDC ) I( SVGFileDC, DC ) I( MirrorDC, DC ) I( GCDC, DC ) #ifdef __WXMSW__ I( EnhMetaFileDC, DC ) #endif I( PlFontEnumerator, FontEnumerator ) I( BMPHandler, ImageHandler ) I( PNGHandler, ImageHandler ) I( JPEGHandler, ImageHandler ) I( GIFHandler, ImageHandler ) I( PCXHandler, ImageHandler ) I( PNMHandler, ImageHandler ) I( TIFFHandler, ImageHandler ) I( XPMHandler, ImageHandler ) I( IFFHandler, ImageHandler ) I( ICOHandler, BMPHandler ) I( CURHandler, ICOHandler ) I( ANIHandler, CURHandler ) I( TGAHandler, ImageHandler ) I( GraphicsContext, GraphicsObject ) I( GraphicsRenderer, Object ) I( GraphicsObject, Object ) I( GraphicsPath, GraphicsObject ) I( GraphicsMatrix, GraphicsObject ) I( GraphicsPen, GraphicsObject ) I( GraphicsBrush, GraphicsObject ) I( GraphicsFont, GraphicsObject ) #ifdef __WXMSW__ I( GDIPlusContext, GraphicsContext ) I( GDIPlusRenderer, GraphicsRenderer ) #endif #ifdef __WXMAC__ I( MacCoreGraphicsContext, GraphicsContext ) I( MacCoreGraphicsRenderer, GraphicsRenderer ) #endif #ifdef __WXGTK__ I( CairoContext, GraphicsContext ) I( CairoRenderer, GraphicsRenderer ) #endif I( LogTextCtrl, Log ) I( LogWindow, Log ) I( LogGui, Log ) I( PlLog, Log ) I( LogChain, Log ) I( LogPassThrough, LogChain ) I( LogStderr, Log ) I( PlLogPassThrough, LogPassThrough ) I( BoxSizer, Sizer ) I( StaticBoxSizer, BoxSizer ) I( GridSizer, Sizer ) I( FlexGridSizer, GridSizer ) I( GridBagSizer, FlexGridSizer ) #if WXPERL_W_VERSION_GE( 2, 5, 1 ) I( NotebookSizer, BookCtrlSizer ) #else I( NotebookSizer, Sizer ) #endif I( BookCtrlSizer, Sizer ) I( PlSizer, Sizer ) I( GBSizerItem, SizerItem ) I( StdDialogButtonSizer, BoxSizer ) I( WrapSizer, BoxSizer ) I( PickerBase, Control ) I( ColourPickerCtrl,PickerBase ) I( FilePickerCtrl, PickerBase ) I( DirPickerCtrl, PickerBase ) I( FontPickerCtrl, PickerBase ) I( ComboCtrlBase, Control ) #if WXPERL_W_VERSION_GE( 2, 7, 2 ) I( PlComboPopup, ComboPopup ) #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) I( GenericComboCtrl,ComboCtrlBase ) I( ComboCtrl, GenericComboCtrl ) #else I( GenericComboControl,ComboCtrlBase ) I( ComboCtrl, GenericComboControl ) #endif I( OwnerDrawnComboBox, ComboCtrl ) I( PlOwnerDrawnComboBox, OwnerDrawnComboBox ) #if WXPERL_W_VERSION_GE( 2, 9, 0 ) \ && ( defined( __WXGTK__ ) || defined( __WXMSW__ ) ) I( BitmapComboBox, ComboBox ) #else I( BitmapComboBox, OwnerDrawnComboBox ) #endif I( GenericCollapsiblePane, Control ) I( CollapsiblePane, GenericCollapsiblePane ) I( TaskBarIcon, EvtHandler ) I( Process, EvtHandler ) { "Wx::Stream", "Tie::Handle" }, I( InputStream, Stream ) I( OutputStream, Stream ) /////////////////////////////////////////// // Conditional part /////////////////////////////////////////// #define HAS_TLW !defined(__WXMOTIF__) || WXPERL_W_VERSION_GE( 2, 5, 1 ) #if HAS_TLW I( Frame, TopLevelWindow ) #else I( Frame, Window ) #endif #if HAS_TLW I( Dialog, TopLevelWindow ) #else I( Dialog, Panel ) #endif #if defined(__WXMSW__) I( MemoryDC, DC ) #elif defined(__WXMAC__) I( MemoryDC, PaintDC ) #else I( MemoryDC, WindowDC ) #endif #if defined(__WXMSW__) || defined(__WXGTK__) \ || ( defined(__WXMAC__) && WXPERL_W_VERSION_GE( 2, 9, 0 ) ) I( PaintDC, ClientDC ) #else I( PaintDC, WindowDC ) #endif #if defined(__WXGTK__) I( ScreenDC, PaintDC ) #else I( ScreenDC, WindowDC ) #endif #if defined(__WXMSW__) I( TreeCtrl, Control ) #else I( TreeCtrl, GenericTreeCtrl ) #endif #if ( defined( __WXGTK__ ) && WXPERL_W_VERSION_LT( 2, 9, 0 ) ) || \ ( defined( __WXMAC__ ) && WXPERL_W_VERSION_GE( 2, 5, 1 ) ) I( ComboBox, Control ) #else I( ComboBox, Choice ) #endif I( ScrolledWindow, GenericScrolledWindow ) I( VScrolledWindow, Panel ) #if WXPERL_W_VERSION_GE( 2, 9, 0 ) I( HScrolledWindow, Panel ) I( HVScrolledWindow,Panel ) #endif I( PlVScrolledWindow, VScrolledWindow ) #if WXPERL_W_VERSION_GE( 2, 9, 0 ) I( PlHScrolledWindow, HScrolledWindow ) I( PlHVScrolledWindow, HVScrolledWindow ) #endif #if defined(__WXGTK__) I( StatusBar, StatusBarGeneric ) #else I( StatusBar, Window ) #endif #if defined(__WXMOTIF__) && WXPERL_W_VERSION_GE( 2, 5, 1 ) // wxCursor inherits from wxObject #elif defined(__WXMOTIF__) || defined(__WXMAC__) I( Cursor, Bitmap ) #elif !defined(__WXGTK__) || WXPERL_W_VERSION_GE( 2, 9, 0 ) I( Cursor, GDIObject ) #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) I( IconBundle, GDIObject ) #endif #if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) I( Icon, Bitmap ) #else I( Icon, GDIObject ) #endif #if defined(__WXGTK__) I( Colour, GDIObject ) #endif #if defined(__WXUNIVERSAL__) I( ToolBar, ToolBarSimple ) #else I( ToolBar, ToolBarBase ) #endif /////////////////////////////////////////// // Events /////////////////////////////////////////// I( PlEvent, Event ) I( PlThreadEvent, Event ) I( PlCommandEvent, CommandEvent ) I( ActivateEvent, Event ) I( CommandEvent, Event ) I( ContextMenuEvent, CommandEvent ) I( CloseEvent, Event ) I( ChildFocusEvent, CommandEvent ) I( EraseEvent, Event ) I( FindDialogEvent, CommandEvent ) I( FocusEvent, Event ) I( KeyEvent, Event ) I( HelpEvent, CommandEvent ) I( MaximizeEvent, Event ) I( IconizeEvent, Event ) I( IdleEvent, Event ) I( InitDialogEvent, Event ) I( JoystickEvent, Event ) I( ListEvent, NotifyEvent ) I( MenuEvent, Event ) I( WindowCreateEvent, CommandEvent ) I( WindowDestroyEvent, CommandEvent ) I( MouseEvent, Event ) I( MoveEvent, Event ) #if WXPERL_W_VERSION_GE( 2, 5, 1 ) I( BookCtrlEvent, NotifyEvent ) I( NotebookEvent, BookCtrlEvent ) I( ListbookEvent, BookCtrlEvent ) I( ChoicebookEvent, BookCtrlEvent ) I( ToolbookEvent, BookCtrlEvent ) I( TreebookEvent, BookCtrlEvent ) #else I( NotebookEvent, NotifyEvent ) #endif I( NotifyEvent, CommandEvent ) I( FileCtrlEvent, CommandEvent ) I( PaintEvent, Event ) I( NcPaintEvent, Event ) I( ProcessEvent, Event ) I( QueryLayoutInfoEvent, Event ) I( SashEvent, CommandEvent ) I( ScrollEvent, CommandEvent ) I( SizeEvent, Event ) I( ScrollWinEvent, Event ) #if defined(__WXMAC__) && WXPERL_W_VERSION_LE( 2, 9, 1 ) I( SpinEvent, ScrollEvent ) #else I( SpinEvent, NotifyEvent ) #endif I( SysColourChangedEvent, Event ) I( TextUrlEvent, CommandEvent ) I( TimerEvent, Event ) I( Timer, EvtHandler ) I( TaskBarIconEvent, Event ) I( TreeEvent, NotifyEvent ) I( UpdateUIEvent, CommandEvent ) I( WizardEvent, NotifyEvent ) I( SplitterEvent, NotifyEvent ) I( NavigationKeyEvent, Event ) I( ClipboardTextEvent, CommandEvent ) I( HyperlinkEvent, CommandEvent ) I( PowerEvent, Event ) I( MouseCaptureChangedEvent, Event ) I( MouseCaptureLostEvent, Event ) I( ColourPickerEvent, CommandEvent ) I( FileDirPickerEvent, CommandEvent ) I( FontPickerEvent, CommandEvent ) I( SetCursorEvent, Event ) I( CollapsiblePaneEvent, CommandEvent ) { 0, 0 } }; void SetInheritance() { dTHX; for( size_t i = 0; inherit[i].klass; ++i ) { char buffer[1024]; strcpy( buffer, inherit[i].klass ); strcat( buffer, "::ISA" ); AV* isa = get_av( buffer, 1 ); av_store( isa, 0, newSVpv( CHAR_P inherit[i].base, 0 ) ); } } ////////////////////////////////////////////////////////////////////////////// // the constant() function ////////////////////////////////////////////////////////////////////////////// // !package: Wx // !tag: static double constant( const char* name, int arg ) { WX_PL_CONSTANT_INIT(); // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } #define r( n ) \ if( strEQ( name, #n ) ) \ return n; switch( fl ) { case 'A': #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxAPPLY ); // dialog #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) r( wxALPHA_OPAQUE ); // color colour r( wxALPHA_TRANSPARENT ); // color colour #endif r( wxALIGN_LEFT ); // sizer grid statictext r( wxALIGN_CENTRE ); // sizer grid statictext r( wxALIGN_CENTER ); // sizer grid statictext r( wxALIGN_RIGHT ); // sizer grid statictext r( wxALIGN_TOP ); // sizer grid r( wxALIGN_BOTTOM ); // sizer grid r( wxALIGN_CENTER_VERTICAL ); // sizer r( wxALIGN_CENTER_HORIZONTAL ); // sizer r( wxALIGN_CENTRE_VERTICAL ); // sizer r( wxALIGN_CENTRE_HORIZONTAL ); // sizer r( wxALL ); // sizer r( wxACCEL_ALT ); r( wxACCEL_CTRL ); r( wxACCEL_NORMAL ); r( wxACCEL_SHIFT ); r( wxAND ); // dc r( wxAND_INVERT ); // dc r( wxAND_REVERSE ); // dc #if WXPERL_W_VERSION_LT( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_6 r( wxADJUST_MINSIZE ); // layout sizer #endif r( wxAbove ); // layout constraints r( wxAbsolute ); // layout constraints r( wxAsIs ); // layout constraints r( wxALWAYS_SHOW_SB ); // window #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxANIMATION_TYPE_ANI ); // animation r( wxANIMATION_TYPE_ANY ); // animation r( wxANIMATION_TYPE_GIF ); // animation r( wxANIMATION_TYPE_INVALID ); // animation r( wxAC_DEFAULT_STYLE ); // animationctrl r( wxAC_NO_AUTORESIZE ); // animationctrl #endif break; case 'B': #if WXPERL_W_VERSION_GE( 2, 7, 0 ) r( wxBATTERY_NORMAL_STATE ); // power r( wxBATTERY_LOW_STATE ); // power r( wxBATTERY_CRITICAL_STATE ); // power r( wxBATTERY_SHUTDOWN_STATE ); // power r( wxBATTERY_UNKNOWN_STATE ); // power #endif r( wxBITMAP_TYPE_BMP ); // bitmap icon image r( wxBITMAP_TYPE_BMP_RESOURCE ); // bitmap icon image r( wxBITMAP_TYPE_CUR ); // bitmap icon image r( wxBITMAP_TYPE_CUR_RESOURCE ); // bitmap icon image r( wxBITMAP_TYPE_ICO ); // bitmap icon image r( wxBITMAP_TYPE_ICO_RESOURCE ); // bitmap icon image r( wxBITMAP_TYPE_GIF ); // bitmap icon image r( wxBITMAP_TYPE_XBM ); // bitmap icon image r( wxBITMAP_TYPE_XPM ); // bitmap icon image r( wxBITMAP_TYPE_JPEG ); // bitmap icon image r( wxBITMAP_TYPE_PNG ); // bitmap icon image r( wxBITMAP_TYPE_PNM ); // bitmap icon image r( wxBITMAP_TYPE_PCX ); // bitmap icon image r( wxBITMAP_TYPE_ANY ); // bitmap icon image r( wxBITMAP_TYPE_TIF ); // bitmap icon image r( wxBITMAP_TYPE_ANI ); // bitmap icon image r( wxBITMAP_TYPE_GIF_RESOURCE ); // bitmap icon image r( wxBITMAP_TYPE_ICON ); // bitmap icon image r( wxBITMAP_TYPE_ICON_RESOURCE ); // bitmap icon image r( wxBITMAP_TYPE_IFF ); // bitmap icon image r( wxBITMAP_TYPE_INVALID ); // bitmap icon image r( wxBITMAP_TYPE_JPEG_RESOURCE ); // bitmap icon image r( wxBITMAP_TYPE_MACCURSOR ); // bitmap icon image r( wxBITMAP_TYPE_MACCURSOR_RESOURCE ); // bitmap icon image r( wxBITMAP_TYPE_PCX_RESOURCE ); // bitmap icon image r( wxBITMAP_TYPE_PICT ); // bitmap icon image r( wxBITMAP_TYPE_PICT_RESOURCE ); // bitmap icon image r( wxBITMAP_TYPE_PNG_RESOURCE ); // bitmap icon image r( wxBITMAP_TYPE_PNM_RESOURCE ); // bitmap icon image r( wxBITMAP_TYPE_RESOURCE ); // bitmap icon image #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxBITMAP_TYPE_TGA ); // bitmap icon image #endif r( wxBITMAP_TYPE_TIF_RESOURCE ); // bitmap icon image r( wxBITMAP_TYPE_XBM_DATA ); // bitmap icon image r( wxBITMAP_TYPE_XPM_DATA ); // bitmap icon image r( wxBI_EXPAND ); r( wxBOLD ); // font r( wxBOTH ); // window dialog frame r( wxBOTTOM ); // sizer r( wxBU_TOP ); // button r( wxBU_LEFT ); // button r( wxBU_BOTTOM ); // button r( wxBU_AUTODRAW ); // button r( wxBU_RIGHT ); // button r( wxBU_NOAUTODRAW ); // button r( wxBU_EXACTFIT ); // button r( wxBDIAGONAL_HATCH ); // brush pen r( wxBottom ); // layout constraints r( wxBelow ); // layout constraints #if WXPERL_W_VERSION_GE( 2, 7, 0 ) r( wxBROWSER_NEW_WINDOW ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxBROWSER_NOBUSYCURSOR ); #endif #if WXPERL_W_VERSION_GE( 2, 5, 5 ) r( wxBUFFER_VIRTUAL_AREA ); // dc r( wxBUFFER_CLIENT_AREA ); // dc #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) r( wxBG_STYLE_SYSTEM ); // window r( wxBG_STYLE_COLOUR ); // window r( wxBG_STYLE_CUSTOM ); // window #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) r( wxBK_DEFAULT ); // bookctrl r( wxBK_TOP ); // bookctrl r( wxBK_BOTTOM ); // bookctrl r( wxBK_LEFT ); // bookctrl r( wxBK_RIGHT ); // bookctrl #if WXPERL_W_VERSION_LT( 2, 9, 0 ) r( wxBK_BUTTONBAR ); // toolbook #endif r( wxBK_HITTEST_NOWHERE ); // bookctrl r( wxBK_HITTEST_ONICON ); // bookctrl r( wxBK_HITTEST_ONLABEL ); // bookctrl r( wxBK_HITTEST_ONITEM ); // bookctrl r( wxBK_HITTEST_ONPAGE ); // bookctrl #endif r( wxBORDER_DEFAULT ); // window r( wxBORDER_DOUBLE ); // window r( wxBORDER_MASK ); // window r( wxBORDER_RAISED ); // window r( wxBORDER_SIMPLE ); // window r( wxBORDER_STATIC ); // window r( wxBORDER_SUNKEN ); // window r( wxBORDER_THEME ); // window r( wxBORDER_NONE ); // window r( wxBACKWARD ); // sizer #if WXPERL_W_VERSION_LT( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 r( wxBLIT_00220326 ); // dc r( wxBLIT_007700E6 ); // dc r( wxBLIT_00990066 ); // dc r( wxBLIT_00AA0029 ); // dc r( wxBLIT_00DD0228 ); // dc r( wxBLIT_BLACKNESS ); // dc r( wxBLIT_DSTINVERT ); // dc r( wxBLIT_MERGEPAINT ); // dc r( wxBLIT_NOTSCRCOPY ); // dc r( wxBLIT_NOTSRCERASE ); // dc r( wxBLIT_SRCAND ); // dc r( wxBLIT_SRCCOPY ); // dc r( wxBLIT_SRCERASE ); // dc r( wxBLIT_SRCINVERT ); // dc r( wxBLIT_SRCPAINT ); // dc r( wxBLIT_WHITENESS ); // dc #endif r( wxBRUSHSTYLE_BDIAGONAL_HATCH ); // brush r( wxBRUSHSTYLE_CROSSDIAG_HATCH ); // brush r( wxBRUSHSTYLE_CROSS_HATCH ); // brush r( wxBRUSHSTYLE_FDIAGONAL_HATCH ); // brush #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxBRUSHSTYLE_FIRST_HATCH ); // brush #endif r( wxBRUSHSTYLE_HORIZONTAL_HATCH ); // brush r( wxBRUSHSTYLE_INVALID ); // brush #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxBRUSHSTYLE_LAST_HATCH ); // brush #endif r( wxBRUSHSTYLE_SOLID ); // brush r( wxBRUSHSTYLE_STIPPLE ); // brush r( wxBRUSHSTYLE_STIPPLE_MASK ); // brush r( wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE ); // brush r( wxBRUSHSTYLE_TRANSPARENT ); // brush r( wxBRUSHSTYLE_VERTICAL_HATCH ); // brush break; case 'C': r( wxCANCEL ); // dialog r( wxCAPTION ); // frame dialog r( wxCAP_ROUND ); // pen r( wxCAP_PROJECTING ); // pen r( wxCAP_BUTT ); // pen r( wxCB_SIMPLE ); // combobox r( wxCB_DROPDOWN ); // combobox r( wxCB_READONLY ); // combobox comboctrl r( wxCB_SORT ); // combobox comboctrl #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxCC_SPECIAL_DCLICK ); // comboctrl r( wxCC_STD_BUTTON ); // comboctrl r( wxCP_DEFAULT_STYLE ); // collapsiblepane r( wxCP_NO_TLW_RESIZE ); // collapsiblepane #endif r( wxCENTER ); // dialog sizer r( wxCENTRE ); // dialog sizer r( wxCENTER_ON_SCREEN ); // window r( wxCENTRE_ON_SCREEN ); // window r( wxCLIP_CHILDREN ); // window r( wxCHOICEDLG_STYLE ); #if WXPERL_W_VERSION_LT( 2, 7, 0 ) || WXWIN_COMPATIBILITY_2_6 r( wxCHANGE_DIR ); // filedialog #endif r( wxCLIP_SIBLINGS ); // window #if WXPERL_W_VERSION_GE( 2, 5, 1 ) r( wxCHK_2STATE ); // checkbox r( wxCHK_3STATE ); // checkbox r( wxCHK_ALLOW_3RD_STATE_FOR_USER );// checkbox r( wxCHK_UNCHECKED ); // checkbox r( wxCHK_CHECKED ); // checkbox r( wxCHK_UNDETERMINED ); // checkbox #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) r( wxCHB_BOTTOM ); // choicebook r( wxCHB_TOP ); // choicebook r( wxCHB_ALIGN_MASK ); // choicebook r( wxCHB_DEFAULT ); // choicebook r( wxCHB_LEFT ); // choicebook r( wxCHB_RIGHT ); // choicebook #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) r( wxCLRP_SHOW_LABEL ); r( wxCLRP_USE_TEXTCTRL ); r( wxCLRP_DEFAULT_STYLE ); #endif r( wxCLEAR ); // dc r( wxCOPY ); // dc #if WXPERL_W_VERSION_GE( 2, 8, 2 ) r( wxCONFIG_USE_SUBDIR ); // config #endif r( wxCONFIG_USE_LOCAL_FILE ); // config r( wxCONFIG_USE_GLOBAL_FILE ); // config r( wxCONFIG_USE_RELATIVE_PATH ); // config r( wxCURSOR_ARROW ); // cursor r( wxCURSOR_ARROWWAIT ); // cursor r( wxCURSOR_RIGHT_ARROW ); // cursor r( wxCURSOR_BULLSEYE ); // cursor r( wxCURSOR_CHAR ); // cursor r( wxCURSOR_CROSS ); // cursor r( wxCURSOR_HAND ); // cursor r( wxCURSOR_IBEAM ); // cursor r( wxCURSOR_LEFT_BUTTON ); // cursor r( wxCURSOR_MAGNIFIER ); // cursor r( wxCURSOR_MIDDLE_BUTTON ); // cursor r( wxCURSOR_NO_ENTRY ); // cursor r( wxCURSOR_PAINT_BRUSH ); // cursor r( wxCURSOR_PENCIL ); // cursor r( wxCURSOR_POINT_LEFT ); // cursor r( wxCURSOR_POINT_RIGHT ); // cursor r( wxCURSOR_QUESTION_ARROW ); // cursor r( wxCURSOR_RIGHT_BUTTON ); // cursor r( wxCURSOR_SIZENESW ); // cursor r( wxCURSOR_SIZENS ); // cursor r( wxCURSOR_SIZENWSE ); // cursor r( wxCURSOR_SIZEWE ); // cursor r( wxCURSOR_SIZING ); // cursor r( wxCURSOR_SPRAYCAN ); // cursor r( wxCURSOR_WAIT ); // cursor r( wxCURSOR_WATCH ); // cursor r( wxCURSOR_BLANK ); // cursor r( wxCURSOR_DEFAULT ); // cursor #if WXPERL_W_VERSION_GE( 2, 9, 0 ) #ifdef __WXMAC__ r( wxCURSOR_COPY_ARROW ); // cursor #endif #ifdef __X__ r( wxCURSOR_BASED_ARROW_DOWN ); // cursor r( wxCURSOR_BASED_ARROW_UP ); // cursor r( wxCURSOR_CROSS_REVERSE ); // cursor r( wxCURSOR_DOUBLE_ARROW ); // cursor #endif #endif r( wxCROSSDIAG_HATCH ); // brush pen r( wxCROSS_HATCH ); // brush pen #define wxCenterX wxCentreX #define wxCenterY wxCentreY #if WXPERL_W_VERSION_LT( 2, 5, 1 ) #define wxCLOSE_BOX 0 #endif r( wxCLOSE_BOX ); // frame #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxCLOSE ); // dialog #endif r( wxCentreX ); // layout constraints r( wxCentreY ); // layout constraints r( wxCenterX ); // layout constraints r( wxCenterY ); // layout constraints #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxC2S_NAME ); // color colour r( wxC2S_CSS_SYNTAX ); // color colour r( wxC2S_HTML_SYNTAX ); // color colour #endif break; case 'D': r( wxDECORATIVE ); // font r( wxDEFAULT ); // font r( wxDEFAULT_DIALOG_STYLE ); // dialog r( wxDEFAULT_FRAME_STYLE ); // frame r( wxDEFAULT_CONTROL_BORDER ); // control #if WXPERL_W_VERSION_LT( 2, 7, 0 ) r( wxDIALOG_MODAL ); // dialog #endif #if WXPERL_W_VERSION_GE( 2, 6, 2 ) r( wxDIALOG_EX_METAL ); // dialog #endif r( wxDOUBLE_BORDER ); // window r( wxDIALOG_NO_PARENT ); // dialog r( wxDIALOG_EX_CONTEXTHELP ); // dialog r( wxDD_NEW_DIR_BUTTON ); // dirdialog #if WXPERL_W_VERSION_GE( 2, 5, 3 ) r( wxDD_DEFAULT_STYLE ); // dirdialog #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) r( wxDD_CHANGE_DIR ); // dirdialog r( wxDD_DIR_MUST_EXIST ); // dirdialog #endif r( wxDOT ); // pen r( wxDOT_DASH ); // pen r( wxDIR ); #if WXPERL_W_VERSION_GE( 2, 7, 0 ) r( wxDIRP_DIR_MUST_EXIST ); r( wxDIRP_CHANGE_DIR ); r( wxDIRP_USE_TEXTCTRL ); r( wxDIRP_DEFAULT_STYLE ); #endif r( wxDOWN ); r( wxDIRCTRL_DIR_ONLY ); // dirctrl r( wxDIRCTRL_SELECT_FIRST ); // dirctrl #if WXPERL_W_VERSION_LT( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 r( wxDIRCTRL_SHOW_FILTERS ); // dirctrl #endif r( wxDIRCTRL_3D_INTERNAL ); // dirctrl r( wxDIRCTRL_EDIT_LABELS ); // dirctrl break; case 'E': r( wxEQUIV ); // dc #if WXPERL_W_VERSION_GE( 2, 5, 3 ) r( wxEVENT_PROPAGATE_NONE ); r( wxEVENT_PROPAGATE_MAX ); #endif #if WXPERL_W_VERSION_GE( 2, 5, 1 ) r( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED ); r( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING ); #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) r( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED ); r( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) r( wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED ); r( wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING ); r( wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED ); r( wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING ); r( wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED ); r( wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED ); r( wxEVT_COMMAND_HYPERLINK ); #endif r( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED ); r( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING ); r( wxEVT_COMMAND_BUTTON_CLICKED ); r( wxEVT_COMMAND_CHECKBOX_CLICKED ); r( wxEVT_COMMAND_CHOICE_SELECTED ); r( wxEVT_COMMAND_LISTBOX_SELECTED ); r( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED ); r( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED ); r( wxEVT_COMMAND_TEXT_UPDATED ); r( wxEVT_COMMAND_TEXT_ENTER ); r( wxEVT_COMMAND_MENU_SELECTED ); r( wxEVT_COMMAND_TOOL_CLICKED ); r( wxEVT_COMMAND_SLIDER_UPDATED ); r( wxEVT_COMMAND_RADIOBOX_SELECTED ); r( wxEVT_COMMAND_RADIOBUTTON_SELECTED ); r( wxEVT_COMMAND_SCROLLBAR_UPDATED ); r( wxEVT_COMMAND_VLBOX_SELECTED ); r( wxEVT_COMMAND_COMBOBOX_SELECTED ); #if wxPERL_USE_TOGGLEBTN r( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED ); #endif r( wxEVT_COMMAND_TEXT_MAXLEN ); r( wxEVT_COMMAND_TEXT_URL ); #if WXPERL_W_VERSION_GE( 2, 7, 0 ) r( wxEVT_COMMAND_TEXT_COPY ); r( wxEVT_COMMAND_TEXT_CUT ); r( wxEVT_COMMAND_TEXT_PASTE ); #endif r( wxEVT_COMMAND_TOOL_RCLICKED ); r( wxEVT_COMMAND_TOOL_ENTER ); r( wxEVT_COMMAND_SPINCTRL_UPDATED ); r( wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING ); r( wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED ); r( wxEVT_COMMAND_SPLITTER_UNSPLIT ); r( wxEVT_COMMAND_SPLITTER_DOUBLECLICKED ); r( wxEVT_TIMER ); #if defined(__WXMSW__) || defined(wxHAS_TASK_BAR_ICON) r( wxEVT_TASKBAR_MOVE ); r( wxEVT_TASKBAR_LEFT_DOWN ); r( wxEVT_TASKBAR_LEFT_UP ); r( wxEVT_TASKBAR_RIGHT_DOWN ); r( wxEVT_TASKBAR_RIGHT_UP ); r( wxEVT_TASKBAR_LEFT_DCLICK ); r( wxEVT_TASKBAR_RIGHT_DCLICK ); #endif r( wxEVT_COMMAND_FIND ); r( wxEVT_COMMAND_FIND_NEXT ); r( wxEVT_COMMAND_FIND_REPLACE ); r( wxEVT_COMMAND_FIND_REPLACE_ALL ); r( wxEVT_COMMAND_FIND_CLOSE ); r( wxEVT_MOUSEWHEEL ) r( wxEVT_LEFT_DOWN ); r( wxEVT_LEFT_UP ); r( wxEVT_LEFT_DCLICK ); r( wxEVT_MIDDLE_DOWN ); r( wxEVT_MIDDLE_UP ); r( wxEVT_MIDDLE_DCLICK ); r( wxEVT_RIGHT_DOWN ); r( wxEVT_RIGHT_UP ); r( wxEVT_RIGHT_DCLICK ); r( wxEVT_MOTION ); r( wxEVT_ENTER_WINDOW ); r( wxEVT_LEAVE_WINDOW ); r( wxEVT_SET_FOCUS ); r( wxEVT_KILL_FOCUS ); r( wxEVT_SASH_DRAGGED ); #if WXPERL_W_VERSION_LT( 2, 9, 0 ) r( wxEVT_NC_LEFT_DOWN ); r( wxEVT_NC_LEFT_UP ); r( wxEVT_NC_MIDDLE_DOWN ); r( wxEVT_NC_MIDDLE_UP ); r( wxEVT_NC_RIGHT_DOWN ); r( wxEVT_NC_RIGHT_UP ); r( wxEVT_NC_MOTION ); r( wxEVT_NC_ENTER_WINDOW ); r( wxEVT_NC_LEAVE_WINDOW ); r( wxEVT_NC_LEFT_DCLICK ); r( wxEVT_NC_MIDDLE_DCLICK ); r( wxEVT_NC_RIGHT_DCLICK ); #endif r( wxEVT_CHAR ); r( wxEVT_CHAR_HOOK ); r( wxEVT_CHILD_FOCUS ); r( wxEVT_NAVIGATION_KEY ); r( wxEVT_KEY_DOWN ); r( wxEVT_KEY_UP ); r( wxEVT_SET_CURSOR ); r( wxEVT_SCROLL_TOP ); r( wxEVT_SCROLL_BOTTOM ); r( wxEVT_SCROLL_LINEUP ); r( wxEVT_SCROLL_LINEDOWN ); r( wxEVT_SCROLL_PAGEUP ); r( wxEVT_SCROLL_PAGEDOWN ); r( wxEVT_SCROLL_THUMBTRACK ); r( wxEVT_SCROLL_THUMBRELEASE ); r( wxEVT_SCROLLWIN_TOP ); r( wxEVT_SCROLLWIN_BOTTOM ); r( wxEVT_SCROLLWIN_LINEUP ); r( wxEVT_SCROLLWIN_LINEDOWN ); r( wxEVT_SCROLLWIN_PAGEUP ); r( wxEVT_SCROLLWIN_PAGEDOWN ); r( wxEVT_SCROLLWIN_THUMBTRACK ); r( wxEVT_SCROLLWIN_THUMBRELEASE ); r( wxEVT_SIZE ); r( wxEVT_MOVE ); r( wxEVT_CLOSE_WINDOW ); r( wxEVT_END_SESSION ); r( wxEVT_QUERY_END_SESSION ); r( wxEVT_ACTIVATE_APP ); #if WXPERL_W_VERSION_GE( 2, 7, 0 ) #if defined(wxHAS_POWER_EVENTS) r( wxEVT_POWER_SUSPENDING ); r( wxEVT_POWER_SUSPENDED ); r( wxEVT_POWER_SUSPEND_CANCEL ); r( wxEVT_POWER_RESUME ); #endif #else r( wxEVT_POWER ); #endif r( wxEVT_ACTIVATE ); r( wxEVT_CREATE ); r( wxEVT_DESTROY ); r( wxEVT_SHOW ); r( wxEVT_ICONIZE ); r( wxEVT_MAXIMIZE ); r( wxEVT_PAINT ); r( wxEVT_ERASE_BACKGROUND ); r( wxEVT_NC_PAINT ); // r( wxEVT_PAINT_ICON ); // r( wxEVT_MENU_CHAR ); // r( wxEVT_MENU_INIT ); r( wxEVT_MENU_HIGHLIGHT ); r( wxEVT_MENU_OPEN ); r( wxEVT_MENU_CLOSE ); // r( wxEVT_POPUP_MENU_INIT ); r( wxEVT_CONTEXT_MENU ); r( wxEVT_SYS_COLOUR_CHANGED ); // r( wxEVT_SETTING_CHANGED ); r( wxEVT_QUERY_NEW_PALETTE ); r( wxEVT_PALETTE_CHANGED ); r( wxEVT_JOY_BUTTON_DOWN ); r( wxEVT_JOY_BUTTON_UP ); r( wxEVT_JOY_MOVE ); r( wxEVT_JOY_ZMOVE ); r( wxEVT_DROP_FILES ); // r( wxEVT_DRAW_ITEM ); // r( wxEVT_MEASURE_ITEM ); // r( wxEVT_COMPARE_ITEM ); r( wxEVT_INIT_DIALOG ); r( wxEVT_IDLE ); r( wxEVT_UPDATE_UI ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) r( wxEVT_MOVING ); r( wxEVT_SIZING ); #endif r( wxEVT_END_PROCESS ); //r( wxEVT_DIALUP_CONNECTED ); //r( wxEVT_DIALUP_DISCONNECTED ); r( wxEVT_COMMAND_LEFT_CLICK ); r( wxEVT_COMMAND_LEFT_DCLICK ); r( wxEVT_COMMAND_RIGHT_CLICK ); r( wxEVT_COMMAND_RIGHT_DCLICK ); r( wxEVT_COMMAND_SET_FOCUS ); r( wxEVT_COMMAND_KILL_FOCUS ); r( wxEVT_COMMAND_ENTER ); r( wxEVT_HELP ); r( wxEVT_DETAILED_HELP ); r( wxEXPAND ); // sizer r( wxEXEC_SYNC ); // execute r( wxEXEC_ASYNC ); // execute r( wxEXEC_NOHIDE ); // execute #if WXPERL_W_VERSION_GE( 2, 5, 4 ) r( wxEXEC_NODISABLE ); // execute #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxEXEC_BLOCK ); // execute r( wxEXEC_NOEVENTS ); // execute #endif r( wxEXEC_MAKE_GROUP_LEADER ); // execute r( wxEAST ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxEL_ALLOW_NEW ); // editablelistbox r( wxEL_ALLOW_EDIT ); // editablelistbox r( wxEL_ALLOW_DELETE ); // editablelistbox r( wxEL_NO_REORDER ); // editablelistbox r( wxEL_DEFAULT_STYLE ); // editablelistbox #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxEXTEND_LAST_ON_EACH_LINE ); // sizer #endif break; case 'F': r( wxFromStart ); r( wxFromCurrent ); r( wxFromEnd ); r( wxFDIAGONAL_HATCH ); // brush pen r( wxFD_OPEN ); // filedialog r( wxFD_SAVE ); // filedialog r( wxFD_OVERWRITE_PROMPT ); // filedialog r( wxFD_FILE_MUST_EXIST ); // filedialog r( wxFD_MULTIPLE ); // filedialog r( wxFD_CHANGE_DIR ); // filedialog #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxFD_DEFAULT_STYLE ); // filedialog r( wxFD_PREVIEW ); // filedialog #endif #if WXPERL_W_VERSION_LT( 2, 7, 0 ) || WXWIN_COMPATIBILITY_2_6 r( wxFILE_MUST_EXIST ); #endif r( wxFLOOD_SURFACE ); // dc r( wxFLOOD_BORDER ); // dc #if WXPERL_W_VERSION_GE( 2, 5, 1 ) r( wxFIXED_MINSIZE ); // sizer r( wxFLEX_GROWMODE_NONE ); // sizer r( wxFLEX_GROWMODE_SPECIFIED ); // sizer r( wxFLEX_GROWMODE_ALL ); // sizer #endif r( wxFRAME_FLOAT_ON_PARENT ); // frame r( wxFRAME_NO_WINDOW_MENU ); // frame r( wxFRAME_NO_TASKBAR ); // frame r( wxFRAME_TOOL_WINDOW ); // frame r( wxFRAME_EX_CONTEXTHELP ); // frame #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxFRAME_EX_METAL ); // frame #endif #if WXPERL_W_VERSION_GE( 2, 4, 1 ) r( wxFRAME_SHAPED ); // frame #endif r( wxFILE ); r( wxFR_DOWN ); // findreplace r( wxFR_WHOLEWORD ); // findreplace r( wxFR_MATCHCASE ); // findreplace r( wxFR_REPLACEDIALOG ); // findreplace r( wxFR_NOUPDOWN ); // findreplace r( wxFR_NOMATCHCASE ); // findreplace r( wxFR_NOWHOLEWORD ); // findreplace #if WXPERL_W_VERSION_GE( 2, 5, 3 ) r( wxFONTFAMILY_DEFAULT ); // font r( wxFONTFAMILY_DECORATIVE ); // font r( wxFONTFAMILY_ROMAN ); // font r( wxFONTFAMILY_SCRIPT ); // font r( wxFONTFAMILY_SWISS ); // font r( wxFONTFAMILY_MODERN ); // font r( wxFONTFAMILY_TELETYPE ); // font r( wxFONTFAMILY_MAX ); // font r( wxFONTFAMILY_UNKNOWN ); // font r( wxFONTSTYLE_NORMAL ); // font r( wxFONTSTYLE_ITALIC ); // font r( wxFONTSTYLE_SLANT ); // font r( wxFONTSTYLE_MAX ); // font r( wxFONTWEIGHT_NORMAL ); // font r( wxFONTWEIGHT_LIGHT ); // font r( wxFONTWEIGHT_BOLD ); // font r( wxFONTWEIGHT_MAX ); // font r( wxFONTFLAG_DEFAULT ); // font r( wxFONTFLAG_ITALIC ); // font r( wxFONTFLAG_SLANT ); // font r( wxFONTFLAG_LIGHT ); // font r( wxFONTFLAG_BOLD ); // font r( wxFONTFLAG_ANTIALIASED ); // font r( wxFONTFLAG_NOT_ANTIALIASED ); // font r( wxFONTFLAG_UNDERLINED ); // font r( wxFONTFLAG_STRIKETHROUGH ); // font r( wxFONTFLAG_MASK ); // font #endif r( wxFONTENCODING_DEFAULT ); // font r( wxFONTENCODING_SYSTEM ); // font r( wxFONTENCODING_ISO8859_1 ); // font r( wxFONTENCODING_ISO8859_2 ); // font r( wxFONTENCODING_ISO8859_3 ); // font r( wxFONTENCODING_ISO8859_4 ); // font r( wxFONTENCODING_ISO8859_5 ); // font r( wxFONTENCODING_ISO8859_6 ); // font r( wxFONTENCODING_ISO8859_7 ); // font r( wxFONTENCODING_ISO8859_8 ); // font r( wxFONTENCODING_ISO8859_9 ); // font r( wxFONTENCODING_ISO8859_10 ); // font r( wxFONTENCODING_ISO8859_11 ); // font r( wxFONTENCODING_ISO8859_12 ); // font r( wxFONTENCODING_ISO8859_13 ); // font r( wxFONTENCODING_ISO8859_14 ); // font r( wxFONTENCODING_ISO8859_15 ); // font r( wxFONTENCODING_KOI8 ); // font r( wxFONTENCODING_ALTERNATIVE ); // font r( wxFONTENCODING_BULGARIAN ); // font r( wxFONTENCODING_CP437 ); // font r( wxFONTENCODING_CP850 ); // font r( wxFONTENCODING_CP852 ); // font r( wxFONTENCODING_CP855 ); // font r( wxFONTENCODING_CP866 ); // font r( wxFONTENCODING_CP874 ); // font r( wxFONTENCODING_CP1250 ); // font r( wxFONTENCODING_CP1251 ); // font r( wxFONTENCODING_CP1252 ); // font r( wxFONTENCODING_CP1253 ); // font r( wxFONTENCODING_CP1254 ); // font r( wxFONTENCODING_CP1255 ); // font r( wxFONTENCODING_CP1256 ); // font r( wxFONTENCODING_CP1257 ); // font r( wxFONTENCODING_UTF7 ); // font r( wxFONTENCODING_UTF8 ); // font r( wxFONTENCODING_UNICODE ); // font r( wxFONTENCODING_BIG5 ); // font r( wxFONTENCODING_CP12_MAX ); // font r( wxFONTENCODING_CP932 ); // font r( wxFONTENCODING_CP936 ); // font r( wxFONTENCODING_CP949 ); // font r( wxFONTENCODING_CP950 ); // font r( wxFONTENCODING_EUC_JP ); // font r( wxFONTENCODING_GB2312 ); // font #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxFONTENCODING_ISO2022_JP ); // font #endif r( wxFONTENCODING_ISO8859_MAX ); // font r( wxFONTENCODING_KOI8_U ); // font r( wxFONTENCODING_MACARABIC ); // font r( wxFONTENCODING_MACARABICEXT ); // font r( wxFONTENCODING_MACARMENIAN ); // font r( wxFONTENCODING_MACBENGALI ); // font r( wxFONTENCODING_MACBURMESE ); // font r( wxFONTENCODING_MACCELTIC ); // font r( wxFONTENCODING_MACCENTRALEUR ); // font r( wxFONTENCODING_MACCHINESESIMP ); // font r( wxFONTENCODING_MACCHINESETRAD ); // font r( wxFONTENCODING_MACCROATIAN ); // font r( wxFONTENCODING_MACCYRILLIC ); // font r( wxFONTENCODING_MACDEVANAGARI ); // font r( wxFONTENCODING_MACDINGBATS ); // font r( wxFONTENCODING_MACETHIOPIC ); // font r( wxFONTENCODING_MACGAELIC ); // font r( wxFONTENCODING_MACGEORGIAN ); // font r( wxFONTENCODING_MACGREEK ); // font r( wxFONTENCODING_MACGUJARATI ); // font r( wxFONTENCODING_MACGURMUKHI ); // font r( wxFONTENCODING_MACHEBREW ); // font r( wxFONTENCODING_MACICELANDIC ); // font r( wxFONTENCODING_MACJAPANESE ); // font r( wxFONTENCODING_MACKANNADA ); // font r( wxFONTENCODING_MACKEYBOARD ); // font r( wxFONTENCODING_MACKHMER ); // font r( wxFONTENCODING_MACKOREAN ); // font r( wxFONTENCODING_MACLAOTIAN ); // font r( wxFONTENCODING_MACMALAJALAM ); // font r( wxFONTENCODING_MACMAX ); // font r( wxFONTENCODING_MACMIN ); // font r( wxFONTENCODING_MACMONGOLIAN ); // font r( wxFONTENCODING_MACORIYA ); // font r( wxFONTENCODING_MACROMAN ); // font r( wxFONTENCODING_MACROMANIAN ); // font r( wxFONTENCODING_MACSINHALESE ); // font r( wxFONTENCODING_MACSYMBOL ); // font r( wxFONTENCODING_MACTAMIL ); // font r( wxFONTENCODING_MACTELUGU ); // font r( wxFONTENCODING_MACTHAI ); // font r( wxFONTENCODING_MACTIBETAN ); // font r( wxFONTENCODING_MACTURKISH ); // font r( wxFONTENCODING_MACVIATNAMESE ); // font r( wxFONTENCODING_MAX ); // font r( wxFONTENCODING_SHIFT_JIS ); // font r( wxFONTENCODING_UTF16 ); // font r( wxFONTENCODING_UTF16BE ); // font r( wxFONTENCODING_UTF16LE ); // font r( wxFONTENCODING_UTF32 ); // font r( wxFONTENCODING_UTF32BE ); // font r( wxFONTENCODING_UTF32LE ); // font r( wxFULLSCREEN_NOMENUBAR ); // frame dialog r( wxFULLSCREEN_NOTOOLBAR ); // frame dialog r( wxFULLSCREEN_NOSTATUSBAR ); // frame dialog r( wxFULLSCREEN_NOBORDER ); // frame dialog r( wxFULLSCREEN_NOCAPTION ); // frame dialog r( wxFULLSCREEN_ALL ); // frame dialog #if WXPERL_W_VERSION_LE( 2, 5, 0 ) #define wxFULL_REPAINT_ON_RESIZE 0 #endif r( wxFULL_REPAINT_ON_RESIZE ); // window #if WXPERL_W_VERSION_GE( 2, 7, 0 ) r( wxFLP_OPEN ); r( wxFLP_SAVE ); r( wxFLP_OVERWRITE_PROMPT ); r( wxFLP_FILE_MUST_EXIST ); r( wxFLP_CHANGE_DIR ); r( wxFLP_DEFAULT_STYLE ); r( wxFLP_USE_TEXTCTRL ); r( wxFNTP_USE_TEXTCTRL ); r( wxFNTP_DEFAULT_STYLE ); r( wxFNTP_FONTDESC_AS_LABEL ); r( wxFNTP_USEFONT_FOR_LABEL ); r( wxFNTP_MAXPOINT_SIZE ); #endif r( wxFORWARD ); // sizer #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxFC_OPEN ); // filectrl r( wxFC_SAVE ); // filectrl r( wxFC_MULTIPLE ); // filectrl r( wxFC_NOSHOWHIDDEN ); // filectrl #endif r( wxFILTER_ALPHA ); r( wxFILTER_ALPHANUMERIC ); r( wxFILTER_ASCII ); r( wxFILTER_EXCLUDE_CHAR_LIST ); r( wxFILTER_EXCLUDE_LIST ); r( wxFILTER_INCLUDE_CHAR_LIST ); r( wxFILTER_INCLUDE_LIST ); r( wxFILTER_NONE ); r( wxFILTER_NUMERIC ); break; case 'G': r( wxGA_HORIZONTAL ); // gauge r( wxGA_VERTICAL ); // gauge #if WXPERL_W_VERSION_LT( 2, 7, 0 ) r( wxGA_PROGRESSBAR ); // gauge #endif r( wxGA_SMOOTH ); // gauge r( wxGROW ); // sizer break; case 'H': r( wxHELP ); // dialog #if !defined(__WXMAC__) && !defined(__WXGTK__) && !defined(__WXMOTIF__) \ && WXPERL_W_VERSION_LE( 2, 5, 2 ) r( wxHIDE_READONLY ); // filedialog #endif r( wxHORIZONTAL ); // toolbar sizer r( wxHORIZONTAL_HATCH ); // dc r( wxHSCROLL ); // window textctrl r( wxHeight ); // layout constraints #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxHLB_DEFAULT_STYLE ); // htmllistbox r( wxHLB_MULTIPLE ); // htmllistbox #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxHL_CONTEXTMENU ); // hyperlink r( wxHL_ALIGN_LEFT ); // hyperlink r( wxHL_ALIGN_RIGHT ); // hyperlink r( wxHL_ALIGN_CENTRE ); // hyperlink r( wxHL_DEFAULT_STYLE ); // hyperlink #endif break; case 'I': r( wxICONIZE ); // frame r( wxICON_EXCLAMATION ); // icon r( wxICON_HAND ); // icon r( wxICON_QUESTION ); // icon r( wxICON_INFORMATION ); // icon r( wxICON_WARNING ); // icon r( wxICON_ERROR ); // icon r( wxID_ANY ); // id r( wxID_OPEN ); // id r( wxID_CLOSE ); // id r( wxID_NEW ); // id r( wxID_SAVE ); // id r( wxID_SAVEAS ); // id r( wxID_REVERT ); // id r( wxID_EXIT ); // id r( wxID_UNDO ); // id r( wxID_REDO ); // id r( wxID_PRINT ); // id r( wxID_PRINT_SETUP ); // id r( wxID_PREVIEW ); // id r( wxID_ABOUT ); // id r( wxID_HELP_CONTENTS ); // id r( wxID_HELP_COMMANDS ); // id r( wxID_HELP_PROCEDURES ); // id r( wxID_HELP_CONTEXT ); // id #if WXPERL_W_VERSION_GE( 2, 7, 0 ) r( wxID_HELP_SEARCH ); // id r( wxID_HELP_INDEX ); // id #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) r( wxID_PAGE_SETUP ); // id #endif r( wxID_HELP ); // id r( wxID_HIGHEST ); // id r( wxID_LOWEST ); // id r( wxID_CUT ); // id r( wxID_COPY ); // id r( wxID_PASTE ); // id r( wxID_CLEAR ); // id r( wxID_FIND ); // id r( wxID_DUPLICATE ); // id r( wxID_SELECTALL ); // id r( wxID_FILE1 ); // id r( wxID_FILE2 ); // id r( wxID_FILE3 ); // id r( wxID_FILE4 ); // id r( wxID_FILE5 ); // id r( wxID_FILE6 ); // id r( wxID_FILE7 ); // id r( wxID_FILE8 ); // id r( wxID_FILE9 ); // id r( wxID_OK ); // id r( wxID_CANCEL ); // id r( wxID_APPLY ); // id r( wxID_YES ); // id r( wxID_NO ); // id r( wxID_STATIC ); // id r( wxID_CONTEXT_HELP ); // id r( wxID_YESTOALL ); // id r( wxID_NOTOALL ); // id r( wxID_ABORT ); // id r( wxID_RETRY ); // id r( wxID_IGNORE ); // id #if WXPERL_W_VERSION_GE( 2, 5, 3 ) r( wxID_ADD ); // id r( wxID_BOLD ); // id r( wxID_BACKWARD ); // id r( wxID_DOWN ); // id r( wxID_UP ); // id r( wxID_FORWARD ); // id r( wxID_HOME ); // id r( wxID_INDENT ); // id r( wxID_INDEX ); // id r( wxID_ITALIC ); // id r( wxID_JUSTIFY_CENTER ); // id r( wxID_JUSTIFY_LEFT ); // id r( wxID_JUSTIFY_FILL ); // id r( wxID_JUSTIFY_RIGHT ); // id r( wxID_PREFERENCES ); // id r( wxID_PROPERTIES ); // id r( wxID_REFRESH ); // id r( wxID_REMOVE ); // id r( wxID_REVERT_TO_SAVED ); // id r( wxID_STOP ); // id r( wxID_SYSTEM_MENU ); // id r( wxID_UNDELETE ); // id r( wxID_UNDERLINE ); // id r( wxID_UNINDENT ); // id r( wxID_ZOOM_100 ); // id r( wxID_ZOOM_FIT ); // id r( wxID_ZOOM_IN ); // id r( wxID_ZOOM_OUT ); // id #endif r( wxID_CLOSE_ALL ); // id r( wxID_CLOSE_FRAME ); // id r( wxID_DEFAULT ); // id r( wxID_DELETE ); // id #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxID_EDIT ); // id r( wxID_FILE ); // id #endif r( wxID_FILEDLGG ); // id r( wxID_ICONIZE_FRAME ); // id r( wxID_MAXIMIZE_FRAME ); // id r( wxID_MORE ); // id r( wxID_MOVE_FRAME ); // id r( wxID_REPLACE ); // id r( wxID_REPLACE_ALL ); // id r( wxID_RESET ); // id r( wxID_RESIZE_FRAME ); // id r( wxID_RESTORE_FRAME ); // id r( wxID_SETUP ); // id r( wxID_VIEW_DETAILS ); // id r( wxID_VIEW_LARGEICONS ); // id r( wxID_VIEW_LIST ); // id r( wxID_VIEW_SMALLICONS ); // id r( wxID_VIEW_SORTDATE ); // id r( wxID_VIEW_SORTNAME ); // id r( wxID_VIEW_SORTSIZE ); // id r( wxID_VIEW_SORTTYPE ); // id r( wxID_SEPARATOR ); // id r( wxIMAGELIST_DRAW_NORMAL ); // imagelist r( wxIMAGELIST_DRAW_TRANSPARENT ); // imagelist r( wxIMAGELIST_DRAW_SELECTED ); // imagelist r( wxIMAGELIST_DRAW_FOCUSED ); // imagelist #if WXPERL_W_VERSION_GE( 2, 5, 4 ) r( wxIMAGE_RESOLUTION_INCHES ); // image r( wxIMAGE_RESOLUTION_CM ); // image #endif #if WXPERL_W_VERSION_GE( 2, 8, 0 ) r( wxIMAGE_QUALITY_NORMAL ); // image r( wxIMAGE_QUALITY_HIGH ); // image #endif r( wxIDLE_PROCESS_ALL ); r( wxIDLE_PROCESS_SPECIFIED ); r( wxINVERT ); // dc r( wxITALIC ); // font r( wxInRegion ); // region r( wxITEM_SEPARATOR ); // menu toolbar r( wxITEM_NORMAL ); // menu toolbar r( wxITEM_CHECK ); // menu toolbar r( wxITEM_RADIO ); // menu toolbar #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxITEM_DROPDOWN ); // toolbar #endif break; case 'J': r( wxJOIN_BEVEL ); // pen r( wxJOIN_ROUND ); // pen r( wxJOIN_MITER ); // pen r( wxJOYSTICK1 ); // joystick r( wxJOYSTICK2 ); // joystick r( wxJOY_BUTTON1 ); // joystick r( wxJOY_BUTTON2 ); // joystick r( wxJOY_BUTTON3 ); // joystick r( wxJOY_BUTTON4 ); // joystick r( wxJOY_BUTTON_ANY ); // joystick break; case 'K': if( strnEQ( name, "WXK_", 4 ) ) { r( WXK_BACK ); // keycode r( WXK_TAB ); // keycode r( WXK_RETURN ); // keycode r( WXK_ESCAPE ); // keycode r( WXK_SPACE ); // keycode r( WXK_DELETE ); // keycode r( WXK_START ); // keycode r( WXK_LBUTTON ); // keycode r( WXK_RBUTTON ); // keycode r( WXK_CANCEL ); // keycode r( WXK_MBUTTON ); // keycode r( WXK_CLEAR ); // keycode r( WXK_SHIFT ); // keycode r( WXK_ALT ); // keycode r( WXK_CONTROL ); // keycode r( WXK_MENU ); // keycode r( WXK_PAUSE ); // keycode r( WXK_CAPITAL ); // keycode #if WXPERL_W_VERSION_LT( 2, 7, 0 ) r( WXK_PRIOR ); // keycode r( WXK_NEXT ); // keycode #endif r( WXK_END ); // keycode r( WXK_HOME ); // keycode r( WXK_LEFT ); // keycode r( WXK_UP ); // keycode r( WXK_RIGHT ); // keycode r( WXK_DOWN ); // keycode r( WXK_SELECT ); // keycode r( WXK_PRINT ); // keycode r( WXK_EXECUTE ); // keycode r( WXK_SNAPSHOT ); // keycode r( WXK_INSERT ); // keycode r( WXK_HELP ); // keycode r( WXK_NUMPAD0 ); // keycode r( WXK_NUMPAD1 ); // keycode r( WXK_NUMPAD2 ); // keycode r( WXK_NUMPAD3 ); // keycode r( WXK_NUMPAD4 ); // keycode r( WXK_NUMPAD5 ); // keycode r( WXK_NUMPAD6 ); // keycode r( WXK_NUMPAD7 ); // keycode r( WXK_NUMPAD8 ); // keycode r( WXK_NUMPAD9 ); // keycode r( WXK_MULTIPLY ); // keycode r( WXK_ADD ); // keycode r( WXK_SEPARATOR ); // keycode r( WXK_SUBTRACT ); // keycode r( WXK_DECIMAL ); // keycode r( WXK_DIVIDE ); // keycode r( WXK_F1 ); // keycode r( WXK_F2 ); // keycode r( WXK_F3 ); // keycode r( WXK_F4 ); // keycode r( WXK_F5 ); // keycode r( WXK_F6 ); // keycode r( WXK_F7 ); // keycode r( WXK_F8 ); // keycode r( WXK_F9 ); // keycode r( WXK_F10 ); // keycode r( WXK_F11 ); // keycode r( WXK_F12 ); // keycode r( WXK_F13 ); // keycode r( WXK_F14 ); // keycode r( WXK_F15 ); // keycode r( WXK_F16 ); // keycode r( WXK_F17 ); // keycode r( WXK_F18 ); // keycode r( WXK_F19 ); // keycode r( WXK_F20 ); // keycode r( WXK_F21 ); // keycode r( WXK_F22 ); // keycode r( WXK_F23 ); // keycode r( WXK_F24 ); // keycode r( WXK_NUMLOCK ); // keycode r( WXK_SCROLL ); // keycode #if WXPERL_W_VERSION_GE( 2, 6, 3 ) r( WXK_NUMPAD_SPACE ); // keycode r( WXK_NUMPAD_TAB ); // keycode r( WXK_NUMPAD_ENTER ); // keycode r( WXK_NUMPAD_F1 ); // keycode r( WXK_NUMPAD_F2 ); // keycode r( WXK_NUMPAD_F3 ); // keycode r( WXK_NUMPAD_F4 ); // keycode r( WXK_NUMPAD_HOME ); // keycode r( WXK_NUMPAD_LEFT ); // keycode r( WXK_NUMPAD_UP ); // keycode r( WXK_NUMPAD_RIGHT ); // keycode r( WXK_NUMPAD_DOWN ); // keycode r( WXK_NUMPAD_PAGEUP ); // keycode r( WXK_NUMPAD_PAGEDOWN ); // keycode r( WXK_NUMPAD_END ); // keycode r( WXK_NUMPAD_BEGIN ); // keycode r( WXK_NUMPAD_INSERT ); // keycode r( WXK_NUMPAD_DELETE ); // keycode r( WXK_NUMPAD_EQUAL ); // keycode r( WXK_NUMPAD_MULTIPLY ); // keycode r( WXK_NUMPAD_ADD ); // keycode r( WXK_NUMPAD_SEPARATOR ); // keycode r( WXK_NUMPAD_SUBTRACT ); // keycode r( WXK_NUMPAD_DECIMAL ); // keycode r( WXK_NUMPAD_DIVIDE ); // keycode #if defined(__WXMSW__) r( WXK_WINDOWS_LEFT ); // keycode r( WXK_WINDOWS_RIGHT ); // keycode r( WXK_WINDOWS_MENU ); // keycode r( WXK_COMMAND ); // keycode #endif r( WXK_SPECIAL1 ); // keycode r( WXK_SPECIAL2 ); // keycode r( WXK_SPECIAL3 ); // keycode r( WXK_SPECIAL4 ); // keycode r( WXK_SPECIAL5 ); // keycode r( WXK_SPECIAL6 ); // keycode r( WXK_SPECIAL7 ); // keycode r( WXK_SPECIAL8 ); // keycode r( WXK_SPECIAL9 ); // keycode r( WXK_SPECIAL10 ); // keycode r( WXK_SPECIAL11 ); // keycode r( WXK_SPECIAL12 ); // keycode r( WXK_SPECIAL13 ); // keycode r( WXK_SPECIAL14 ); // keycode r( WXK_SPECIAL15 ); // keycode r( WXK_SPECIAL16 ); // keycode r( WXK_SPECIAL17 ); // keycode r( WXK_SPECIAL18 ); // keycode r( WXK_SPECIAL19 ); // keycode r( WXK_SPECIAL20 ); // keycode #endif #if WXPERL_W_VERSION_GE( 2, 8, 0 ) r( WXK_PAGEUP ); // keycode r( WXK_PAGEDOWN ); // keycode #if WXWIN_COMPATIBILITY_2_6 r( WXK_PRIOR ); // keycode r( WXK_NEXT ); // keycode r( WXK_NUMPAD_PRIOR ); // keycode r( WXK_NUMPAD_NEXT ); // keycode #endif #endif } r( wxKILL_OK ); // process r( wxKILL_BAD_SIGNAL ); // process r( wxKILL_ACCESS_DENIED ); // process r( wxKILL_NO_PROCESS ); // process r( wxKILL_ERROR ); // process #if WXPERL_W_VERSION_GE( 2, 5, 4 ) r( wxKILL_NOCHILDREN ); // process r( wxKILL_CHILDREN ); // process #endif break; case 'L': r( wxLB_SINGLE ); // listbox r( wxLB_MULTIPLE ); // listbox r( wxLB_EXTENDED ); // listbox r( wxLB_HSCROLL ); // listbox r( wxLB_ALWAYS_SB ); // listbox r( wxLB_NEEDED_SB ); // listbox r( wxLB_OWNERDRAW ); // listbox r( wxLB_SORT ); // listbox r( wxLB_INT_HEIGHT ); // listbox #if WXPERL_W_VERSION_GE( 2, 5, 1 ) r( wxLB_DEFAULT ); // listbook r( wxLB_TOP ); // listbook r( wxLB_BOTTOM ); // listbook r( wxLB_LEFT ); // listbook r( wxLB_RIGHT ); // listbook r( wxLB_ALIGN_MASK ); // listbook #endif r( wxLEFT ); // sizer layout constraints r( wxLIGHT ); // font r( wxLI_HORIZONTAL ); // staticline r( wxLI_VERTICAL ); // staticline r( wxLONG_DASH ); // pen r( wxLeft ); // layout constraints r( wxLeftOf ); // layout constraints r( wxLOCALE_LOAD_DEFAULT ); // locale r( wxLOCALE_CONV_ENCODING ); // locale #if WXPERL_W_VERSION_GE( 2, 7, 1 ) r( wxLayout_Default ); r( wxLayout_LeftToRight ); r( wxLayout_RightToLeft ); #endif if( strnEQ( name, "wxLANGUAGE_", 11 ) ) { // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> && return ( "wxLANGUAGE_" . $1, $2 ) } #define rr( n ) \ if( strEQ( nm, #n ) ) \ return wxLANGUAGE_##n; const char* nm = name + 11; rr( DEFAULT ); // locale rr( UNKNOWN ); // locale rr( ABKHAZIAN ); // locale rr( AFAR ); // locale rr( AFRIKAANS ); // locale rr( ALBANIAN ); // locale rr( AMHARIC ); // locale rr( ARABIC ); // locale rr( ARABIC_ALGERIA ); // locale rr( ARABIC_BAHRAIN ); // locale rr( ARABIC_EGYPT ); // locale rr( ARABIC_IRAQ ); // locale rr( ARABIC_JORDAN ); // locale rr( ARABIC_KUWAIT ); // locale rr( ARABIC_LEBANON ); // locale rr( ARABIC_LIBYA ); // locale rr( ARABIC_MOROCCO ); // locale rr( ARABIC_OMAN ); // locale rr( ARABIC_QATAR ); // locale rr( ARABIC_SAUDI_ARABIA ); // locale rr( ARABIC_SUDAN ); // locale rr( ARABIC_SYRIA ); // locale rr( ARABIC_TUNISIA ); // locale rr( ARABIC_UAE ); // locale rr( ARABIC_YEMEN ); // locale rr( ARMENIAN ); // locale rr( ASSAMESE ); // locale rr( AYMARA ); // locale rr( AZERI ); // locale rr( AZERI_CYRILLIC ); // locale rr( AZERI_LATIN ); // locale rr( BASHKIR ); // locale rr( BASQUE ); // locale rr( BELARUSIAN ); // locale rr( BENGALI ); // locale rr( BHUTANI ); // locale rr( BIHARI ); // locale rr( BISLAMA ); // locale rr( BRETON ); // locale rr( BULGARIAN ); // locale rr( BURMESE ); // locale rr( CAMBODIAN ); // locale rr( CATALAN ); // locale rr( CHINESE ); // locale rr( CHINESE_SIMPLIFIED ); // locale rr( CHINESE_TRADITIONAL ); // locale rr( CHINESE_HONGKONG ); // locale rr( CHINESE_MACAU ); // locale rr( CHINESE_SINGAPORE ); // locale rr( CHINESE_TAIWAN ); // locale rr( CORSICAN ); // locale rr( CROATIAN ); // locale rr( CZECH ); // locale rr( DANISH ); // locale rr( DUTCH ); // locale rr( DUTCH_BELGIAN ); // locale rr( ENGLISH ); // locale rr( ENGLISH_UK ); // locale rr( ENGLISH_US ); // locale rr( ENGLISH_AUSTRALIA ); // locale rr( ENGLISH_BELIZE ); // locale rr( ENGLISH_BOTSWANA ); // locale rr( ENGLISH_CANADA ); // locale rr( ENGLISH_CARIBBEAN ); // locale rr( ENGLISH_DENMARK ); // locale rr( ENGLISH_EIRE ); // locale rr( ENGLISH_JAMAICA ); // locale rr( ENGLISH_NEW_ZEALAND ); // locale rr( ENGLISH_PHILIPPINES ); // locale rr( ENGLISH_SOUTH_AFRICA ); // locale rr( ENGLISH_TRINIDAD ); // locale rr( ENGLISH_ZIMBABWE ); // locale rr( ESPERANTO ); // locale rr( ESTONIAN ); // locale rr( FAEROESE ); // locale rr( FARSI ); // locale rr( FIJI ); // locale rr( FINNISH ); // locale rr( FRENCH ); // locale rr( FRENCH_BELGIAN ); // locale rr( FRENCH_CANADIAN ); // locale rr( FRENCH_LUXEMBOURG ); // locale rr( FRENCH_MONACO ); // locale rr( FRENCH_SWISS ); // locale rr( FRISIAN ); // locale rr( GALICIAN ); // locale rr( GEORGIAN ); // locale rr( GERMAN ); // locale rr( GERMAN_AUSTRIAN ); // locale rr( GERMAN_BELGIUM ); // locale rr( GERMAN_LIECHTENSTEIN ); // locale rr( GERMAN_LUXEMBOURG ); // locale rr( GERMAN_SWISS ); // locale rr( GREEK ); // locale rr( GREENLANDIC ); // locale rr( GUARANI ); // locale rr( GUJARATI ); // locale rr( HAUSA ); // locale rr( HEBREW ); // locale rr( HINDI ); // locale rr( HUNGARIAN ); // locale rr( ICELANDIC ); // locale rr( INDONESIAN ); // locale rr( INTERLINGUA ); // locale rr( INTERLINGUE ); // locale rr( INUKTITUT ); // locale rr( INUPIAK ); // locale rr( IRISH ); // locale rr( ITALIAN ); // locale rr( ITALIAN_SWISS ); // locale rr( JAPANESE ); // locale rr( JAVANESE ); // locale rr( KANNADA ); // locale rr( KASHMIRI ); // locale rr( KASHMIRI_INDIA ); // locale rr( KAZAKH ); // locale rr( KERNEWEK ); // locale rr( KINYARWANDA ); // locale rr( KIRGHIZ ); // locale rr( KIRUNDI ); // locale rr( KONKANI ); // locale rr( KOREAN ); // locale rr( KURDISH ); // locale rr( LAOTHIAN ); // locale rr( LATIN ); // locale rr( LATVIAN ); // locale rr( LINGALA ); // locale rr( LITHUANIAN ); // locale rr( MACEDONIAN ); // locale rr( MALAGASY ); // locale rr( MALAY ); // locale rr( MALAYALAM ); // locale rr( MALAY_BRUNEI_DARUSSALAM ); // locale rr( MALAY_MALAYSIA ); // locale rr( MALTESE ); // locale rr( MANIPURI ); // locale rr( MAORI ); // locale rr( MARATHI ); // locale rr( MOLDAVIAN ); // locale rr( MONGOLIAN ); // locale rr( NAURU ); // locale rr( NEPALI ); // locale rr( NEPALI_INDIA ); // locale rr( NORWEGIAN_BOKMAL ); // locale rr( NORWEGIAN_NYNORSK ); // locale rr( OCCITAN ); // locale rr( ORIYA ); // locale rr( OROMO ); // locale rr( PASHTO ); // locale rr( POLISH ); // locale rr( PORTUGUESE ); // locale rr( PORTUGUESE_BRAZILIAN ); // locale rr( PUNJABI ); // locale rr( QUECHUA ); // locale rr( RHAETO_ROMANCE ); // locale rr( ROMANIAN ); // locale rr( RUSSIAN ); // locale rr( RUSSIAN_UKRAINE ); // locale #if WXPERL_W_VERSION_GE( 2, 9, 0 ) rr( SAMI ); // locale #endif rr( SAMOAN ); // locale rr( SANGHO ); // locale rr( SANSKRIT ); // locale rr( SCOTS_GAELIC ); // locale rr( SERBIAN ); // locale rr( SERBIAN_CYRILLIC ); // locale rr( SERBIAN_LATIN ); // locale rr( SERBO_CROATIAN ); // locale rr( SESOTHO ); // locale rr( SETSWANA ); // locale rr( SHONA ); // locale rr( SINDHI ); // locale rr( SINHALESE ); // locale rr( SISWATI ); // locale rr( SLOVAK ); // locale rr( SLOVENIAN ); // locale rr( SOMALI ); // locale rr( SPANISH ); // locale rr( SPANISH_ARGENTINA ); // locale rr( SPANISH_BOLIVIA ); // locale rr( SPANISH_CHILE ); // locale rr( SPANISH_COLOMBIA ); // locale rr( SPANISH_COSTA_RICA ); // locale rr( SPANISH_DOMINICAN_REPUBLIC ); // locale rr( SPANISH_ECUADOR ); // locale rr( SPANISH_EL_SALVADOR ); // locale rr( SPANISH_GUATEMALA ); // locale rr( SPANISH_HONDURAS ); // locale rr( SPANISH_MEXICAN ); // locale rr( SPANISH_MODERN ); // locale rr( SPANISH_NICARAGUA ); // locale rr( SPANISH_PANAMA ); // locale rr( SPANISH_PARAGUAY ); // locale rr( SPANISH_PERU ); // locale rr( SPANISH_PUERTO_RICO ); // locale rr( SPANISH_URUGUAY ); // locale rr( SPANISH_US ); // locale rr( SPANISH_VENEZUELA ); // locale rr( SUNDANESE ); // locale rr( SWAHILI ); // locale rr( SWEDISH ); // locale rr( SWEDISH_FINLAND ); // locale rr( TAGALOG ); // locale rr( TAJIK ); // locale rr( TAMIL ); // locale rr( TATAR ); // locale rr( TELUGU ); // locale rr( THAI ); // locale rr( TIBETAN ); // locale rr( TIGRINYA ); // locale rr( TONGA ); // locale rr( TSONGA ); // locale rr( TURKISH ); // locale rr( TURKMEN ); // locale rr( TWI ); // locale rr( UIGHUR ); // locale rr( UKRAINIAN ); // locale rr( URDU ); // locale rr( URDU_INDIA ); // locale rr( URDU_PAKISTAN ); // locale rr( UZBEK ); // locale rr( UZBEK_CYRILLIC ); // locale rr( UZBEK_LATIN ); // locale #if WXPERL_W_VERSION_GE( 2, 9, 0 ) rr( VALENCIAN ); // locale #endif rr( VIETNAMESE ); // locale rr( VOLAPUK ); // locale rr( WELSH ); // locale rr( WOLOF ); // locale rr( XHOSA ); // locale rr( YIDDISH ); // locale rr( YORUBA ); // locale rr( ZHUANG ); // locale rr( ZULU ); // locale rr( USER_DEFINED ); // locale //prefix // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } #undef rr } break; case 'M': r( wxMAXIMIZE ); // frame r( wxMAXIMIZE_BOX ); // frame r( wxMENU_TEAROFF ); // menu r( wxMINIMIZE ); // frame r( wxMINIMIZE_BOX ); // frame r( wxMODERN ); // font #if WXPERL_W_VERSION_LT( 2, 7, 0 ) || WXWIN_COMPATIBILITY_2_6 r( wxMULTIPLE ); // filedialog #endif r( wxMAJOR_VERSION ); r( wxMINOR_VERSION ); r( wxMM_TWIPS ); // dc r( wxMM_POINTS ); // dc r( wxMM_METRIC ); // dc r( wxMM_LOMETRIC ); // dc r( wxMM_TEXT ); // dc r( wxMORE ); // sizer r( wxMB_DOCKABLE ); // menu r( wxMOUSE_BTN_ANY ); r( wxMOUSE_BTN_NONE ); r( wxMOUSE_BTN_LEFT ); r( wxMOUSE_BTN_MIDDLE ); r( wxMOUSE_BTN_RIGHT ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxMOUSE_BTN_AUX1 ); r( wxMOUSE_BTN_AUX2 ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxMOD_NONE ); r( wxMOD_ALT ); r( wxMOD_CONTROL ); r( wxMOD_SHIFT ); r( wxMOD_WIN ); #endif #if WXPERL_W_VERSION_GE( 2, 8, 0 ) r( wxMOD_ALTGR ); r( wxMOD_META ); r( wxMOD_CMD ); r( wxMOD_ALL ); #endif break; case 'N': r( wxNB_FIXEDWIDTH ); // notebook r( wxNB_LEFT ); // notebook r( wxNB_RIGHT ); // notebook r( wxNB_BOTTOM ); // notebook r( wxNB_TOP ); // notebook r( wxNB_MULTILINE ); // notebook #if WXPERL_W_VERSION_GE( 2, 5, 0 ) r( wxNB_HITTEST_NOWHERE ); // notebook r( wxNB_HITTEST_ONICON ); // notebook r( wxNB_HITTEST_ONLABEL ); // notebook r( wxNB_HITTEST_ONITEM ); // notebook #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxNB_HITTEST_ONPAGE ); // notebook #endif r( wxNB_DEFAULT ); // notebook #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxNB_FLAT ); // notebook r( wxNB_NOPAGETHEME ); // notebook #endif r( wxNO ); // dialog r( wxNO_BORDER ); // frame toolbar #if WXPERL_W_VERSION_LT( 2, 7, 0 ) r( wxNO_3D ); // dialog window #endif r( wxNO_FULL_REPAINT_ON_RESIZE ); // window r( wxNORMAL ); // font r( wxNOT_FOUND ); r( wxNO_DEFAULT ); // dialog r( wxNAND ); // dc r( wxNOR ); // dc r( wxNO_OP ); // dc r( wxNORTH ); r( wxNavigateBackward ); r( wxNavigateForward ); r( wxNavigateWinChange ); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxNavigateFromTab ); #endif break; case 'O': r( wxOK ); // dialog #if WXPERL_W_VERSION_LT( 2, 7, 0 ) || WXWIN_COMPATIBILITY_2_6 r( wxOPEN ); // filedialog r( wxOVERWRITE_PROMPT ); // filedialog #endif r( wxODDEVEN_RULE ); // dc r( wxOR ); // dc r( wxOR_INVERT ); // dc r( wxOR_REVERSE ); // dc r( wxOutRegion ); // region #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxODCB_DCLICK_CYCLES ); // ownerdrawncombobox r( wxODCB_STD_CONTROL_PAINT ); // ownerdrawncombobox r( wxODCB_PAINTING_CONTROL ); // ownerdrawncombobox r( wxODCB_PAINTING_SELECTED ); // ownerdrawncombobox #endif break; case 'P': #if WXPERL_W_VERSION_LT( 2, 7, 0 ) r( wxPROCESS_ENTER ); #endif r( wxPD_APP_MODAL ); // progressdialog r( wxPD_AUTO_HIDE ); // progressdialog r( wxPD_CAN_ABORT ); // progressdialog r( wxPD_ELAPSED_TIME ); // progressdialog r( wxPD_ESTIMATED_TIME ); // progressdialog r( wxPD_REMAINING_TIME ); // progressdialog #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxPD_SMOOTH ); // progressdialog r( wxPD_CAN_SKIP ); // progressdialog #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) r( wxPOWER_SOCKET ); // power r( wxPOWER_BATTERY ); // power r( wxPOWER_UNKNOWN ); // power r( wxPB_USE_TEXTCTRL ); #endif r( wxPercentOf ); // layout constraints r( wxPartRegion ); // layout constraints #if wxUSE_EXTENDED_RTTI r( wxPROP_DEPRECATED ); r( wxPROP_OBJECT_GRAPH ); r( wxPROP_ENUM_STORE_LONG ); r( wxPROP_DONT_STREAM ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxPROPSHEET_DEFAULT ); // propertysheet r( wxPROPSHEET_NOTEBOOK ); // propertysheet r( wxPROPSHEET_TOOLBOOK ); // propertysheet r( wxPROPSHEET_CHOICEBOOK ); // propertysheet r( wxPROPSHEET_LISTBOOK ); // propertysheet r( wxPROPSHEET_BUTTONTOOLBOOK ); // propertysheet r( wxPROPSHEET_TREEBOOK ); // propertysheet r( wxPROPSHEET_SHRINKTOFIT ); // propertysheet #endif r( wxPENSTYLE_BDIAGONAL_HATCH ); // pen r( wxPENSTYLE_CROSSDIAG_HATCH ); // pen r( wxPENSTYLE_CROSS_HATCH ); // pen r( wxPENSTYLE_DOT ); // pen r( wxPENSTYLE_DOT_DASH ); // pen r( wxPENSTYLE_FDIAGONAL_HATCH ); // pen #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxPENSTYLE_FIRST_HATCH ); // pen #endif r( wxPENSTYLE_HORIZONTAL_HATCH ); // pen r( wxPENSTYLE_INVALID ); // pen #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxPENSTYLE_LAST_HATCH ); // pen #endif r( wxPENSTYLE_LONG_DASH ); // pen r( wxPENSTYLE_SHORT_DASH ); // pen r( wxPENSTYLE_SOLID ); // pen r( wxPENSTYLE_STIPPLE ); // pen r( wxPENSTYLE_STIPPLE_MASK ); // pen r( wxPENSTYLE_STIPPLE_MASK_OPAQUE );// pen r( wxPENSTYLE_TRANSPARENT ); // pen r( wxPENSTYLE_USER_DASH ); // pen r( wxPENSTYLE_VERTICAL_HATCH ); // pen break; case 'R': r( wxRAISED_BORDER ); // window r( wxRA_SPECIFY_ROWS ); // radiobox r( wxRA_SPECIFY_COLS ); // radiobox r( wxRA_HORIZONTAL ); // radiobox r( wxRA_LEFTTORIGHT ); // radiobox r( wxRA_TOPTOBOTTOM ); // radiobox #if WXPERL_W_VERSION_LE( 2, 9, 3 ) r( wxRA_USE_CHECKBOX ); // radiobox #endif r( wxRA_VERTICAL ); // radiobox r( wxRB_GROUP ); // radiobutton r( wxRB_SINGLE ); // radiobutton #if WXPERL_W_VERSION_LE( 2, 9, 3 ) r( wxRB_USE_CHECKBOX ); // radiobutton #endif r( wxRESIZE_BORDER ); // dialog frame r( wxRETAINED ); // scrolledwindow r( wxRIGHT ); // sizer layout constraints r( wxROMAN ); // font r( wxRight ); // layout constraints r( wxRightOf ); // layout constraints r( wxRESET ); // sizer #if WXPERL_W_VERSION_LT( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 r( wxROP_BLACK ); // dc r( wxROP_COPYPEN ); // dc r( wxROP_MASKNOTPEN ); // dc r( wxROP_MASKPEN ); // dc r( wxROP_MASKPENNOT ); // dc r( wxROP_MERGENOTPEN ); // dc r( wxROP_MERGEPEN ); // dc r( wxROP_MERGEPENNOT ); // dc r( wxROP_NOP ); // dc r( wxROP_NOT ); // dc r( wxROP_NOTCOPYPEN ); // dc r( wxROP_NOTMASKPEN ); // dc r( wxROP_NOTMERGEPEN ); // dc r( wxROP_NOTXORPEN ); // dc r( wxROP_WHITE ); // dc r( wxROP_XORPEN ); // dc #endif break; case 'S': #define wxSPLASH_CENTER_ON_PARENT wxSPLASH_CENTRE_ON_PARENT #define wxSPLASH_CENTER_ON_SCREEN wxSPLASH_CENTRE_ON_SCREEN #define wxSPLASH_NO_CENTER wxSPLASH_NO_CENTRE r( wxSPLASH_CENTRE_ON_PARENT ); // splashscreen r( wxSPLASH_CENTRE_ON_SCREEN ); // splashscreen r( wxSPLASH_NO_CENTRE ); // splashscreen r( wxSPLASH_CENTER_ON_PARENT ); // splashscreen r( wxSPLASH_CENTER_ON_SCREEN ); // splashscreen r( wxSPLASH_NO_CENTER ); // splashscreen r( wxSPLASH_TIMEOUT ); // splashscreen r( wxSPLASH_NO_TIMEOUT ); // splashscreen #if WXPERL_W_VERSION_LT( 2, 7, 0 ) || WXWIN_COMPATIBILITY_2_6 r( wxSAVE ); // filedialog #endif // r( wxSB_SIZEGRIP ); r( wxSB_HORIZONTAL ); // scrollbar r( wxSB_VERTICAL ); // scrollbar #if WXPERL_W_VERSION_GE( 2, 5, 3 ) r( wxSB_NORMAL ); // statusbar r( wxSB_FLAT ); // statusbar r( wxSB_RAISED ); // statusbar #endif r( wxSCRIPT ); // font r( wxSIMPLE_BORDER ); // window r( wxSLANT ); // font r( wxSTATIC_BORDER ); // window r( wxSTAY_ON_TOP ); // frame dialog r( wxST_NO_AUTORESIZE ); // statictext #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxST_ELLIPSIZE_START ); // statictext r( wxST_ELLIPSIZE_MIDDLE ); // statictext r( wxST_ELLIPSIZE_END ); // statictext #if WXPERL_W_VERSION_LE( 2, 9, 1 ) r( wxST_MARKUP ); // statictext #endif #endif r( wxST_SIZEGRIP ); // statusbar r( wxSUNKEN_BORDER ); // window r( wxSYSTEM_MENU ); // frame dialog r( wxSWISS ); // font r( wxSL_HORIZONTAL ); // slider r( wxSL_VERTICAL ); // slider r( wxSL_AUTOTICKS ); // slider r( wxSL_LABELS ); // slider r( wxSL_LEFT ); // slider r( wxSL_RIGHT ); // slider r( wxSL_TOP ); // slider r( wxSL_SELRANGE ); // slider r( wxSL_BOTH ); // slider r( wxSL_BOTTOM ); // slider r( wxSL_TICKS ); // slider #if WXPERL_W_VERSION_GE( 2, 5, 4 ) r( wxSL_INVERSE ); // slider #endif r( wxSIZE_AUTO_WIDTH ); // window r( wxSIZE_AUTO_HEIGHT ); // window r( wxSIZE_AUTO ); // window r( wxSIZE_USE_EXISTING ); // window r( wxSIZE_ALLOW_MINUS_ONE ); // window #if WXPERL_W_VERSION_GE( 2, 6, 2 ) r( wxSIZE_FORCE ); // window #endif r( wxSIGNONE ); // process r( wxSIGHUP ); // process r( wxSIGINT ); // process r( wxSIGQUIT ); // process r( wxSIGILL ); // process r( wxSIGTRAP ); // process r( wxSIGABRT ); // process r( wxSIGEMT ); // process r( wxSIGFPE ); // process r( wxSIGKILL ); // process r( wxSIGBUS ); // process r( wxSIGSEGV ); // process r( wxSIGSYS ); // process r( wxSIGPIPE ); // process r( wxSIGALRM ); // process r( wxSIGTERM ); // process r( wxSP_HORIZONTAL ); // spinbutton r( wxSP_VERTICAL ); // spinbutton r( wxSP_ARROW_KEYS ); // spinbutton spinctrl r( wxSP_WRAP ); // spinbutton spinctrl r( wxSP_3D ); // splitterwindow r( wxSP_3DSASH ); // splitterwindow r( wxSP_3DBORDER ); // splitterwindow #if WXPERL_W_VERSION_LT( 2, 7, 0 ) r( wxSP_FULLSASH ); // splitterwindow #endif r( wxSP_BORDER ); // splitterwindow r( wxSP_NOBORDER ); // splitterwindow r( wxSP_PERMIT_UNSPLIT ); // splitterwindow r( wxSP_LIVE_UPDATE ); // splitterwindow r( wxSP_NOSASH ); // splitterwindow r( wxSP_NO_XP_THEME ); // splitterwindow r( wxSPLIT_HORIZONTAL ); // splitterwindow r( wxSPLIT_VERTICAL ); // splitterwindow r( wxSHAPED ); // sizer r( wxSHORT_DASH ); // pen r( wxSTIPPLE ); // brush pen r( wxSTIPPLE_MASK_OPAQUE ); // brush pen r( wxSET ); // dc r( wxSRC_INVERT ); // dc r( wxSOLID ); // dc brush pen r( wxSASH_STATUS_OK ); // sashwindow r( wxSASH_STATUS_OUT_OF_RANGE ); // sashwindow r( wxSASH_TOP ); // sashwindow r( wxSASH_RIGHT ); // sashwindow r( wxSASH_BOTTOM ); // sashwindow r( wxSASH_LEFT ); // sashwindow r( wxSASH_NONE ); // sashwindow r( wxSW_3D ); // sashwindow r( wxSW_3DSASH ); // sashwindow r( wxSW_3DBORDER ); // sashwindow r( wxSW_BORDER ); // sashwindow #if WXPERL_W_VERSION_GE( 2, 5 ,1 ) r( wxSOUND_SYNC ); // sound r( wxSOUND_ASYNC ); // sound r( wxSOUND_LOOP ); // sound #endif r( wxSameAs ); // layout constraints // fonts r( wxSYS_OEM_FIXED_FONT ); // systemsettings r( wxSYS_ANSI_FIXED_FONT ); // systemsettings r( wxSYS_ANSI_VAR_FONT ); // systemsettings r( wxSYS_SYSTEM_FONT ); // systemsettings r( wxSYS_DEVICE_DEFAULT_FONT ); // systemsettings r( wxSYS_DEFAULT_GUI_FONT ); // systemsettings r( wxSYS_ICONTITLE_FONT ); // systemsettings r( wxSYS_SYSTEM_FIXED_FONT ); // systemsettings // colours r( wxSYS_COLOUR_SCROLLBAR ); // systemsettings r( wxSYS_COLOUR_BACKGROUND ); // systemsettings r( wxSYS_COLOUR_ACTIVECAPTION ); // systemsettings r( wxSYS_COLOUR_INACTIVECAPTION ); // systemsettings r( wxSYS_COLOUR_MENU ); // systemsettings r( wxSYS_COLOUR_WINDOW ); // systemsettings r( wxSYS_COLOUR_WINDOWFRAME ); // systemsettings r( wxSYS_COLOUR_MENUTEXT ); // systemsettings r( wxSYS_COLOUR_WINDOWTEXT ); // systemsettings r( wxSYS_COLOUR_CAPTIONTEXT ); // systemsettings r( wxSYS_COLOUR_ACTIVEBORDER ); // systemsettings r( wxSYS_COLOUR_INACTIVEBORDER ); // systemsettings r( wxSYS_COLOUR_APPWORKSPACE ); // systemsettings r( wxSYS_COLOUR_HIGHLIGHT ); // systemsettings r( wxSYS_COLOUR_HIGHLIGHTTEXT ); // systemsettings r( wxSYS_COLOUR_BTNFACE ); // systemsettings r( wxSYS_COLOUR_BTNSHADOW ); // systemsettings r( wxSYS_COLOUR_GRAYTEXT ); // systemsettings r( wxSYS_COLOUR_BTNTEXT ); // systemsettings r( wxSYS_COLOUR_INACTIVECAPTIONTEXT ); // systemsettings r( wxSYS_COLOUR_BTNHIGHLIGHT ); // systemsettings r( wxSYS_COLOUR_3DDKSHADOW ); // systemsettings r( wxSYS_COLOUR_3DLIGHT ); // systemsettings r( wxSYS_COLOUR_INFOTEXT ); // systemsettings r( wxSYS_COLOUR_INFOBK ); // systemsettings r( wxSYS_COLOUR_LISTBOX ); // systemsettings r( wxSYS_COLOUR_DESKTOP ); // systemsettings r( wxSYS_COLOUR_3DFACE ); // systemsettings r( wxSYS_COLOUR_3DSHADOW ); // systemsettings r( wxSYS_COLOUR_3DHIGHLIGHT ); // systemsettings r( wxSYS_COLOUR_3DHILIGHT ); // systemsettings r( wxSYS_COLOUR_BTNHILIGHT ); // systemsettings r( wxSYS_COLOUR_MAX ); // systemsettings // metrics r( wxSYS_MOUSE_BUTTONS ); // systemsettings r( wxSYS_BORDER_X ); // systemsettings r( wxSYS_BORDER_Y ); // systemsettings r( wxSYS_CURSOR_X ); // systemsettings r( wxSYS_CURSOR_Y ); // systemsettings r( wxSYS_DCLICK_X ); // systemsettings r( wxSYS_DCLICK_Y ); // systemsettings r( wxSYS_DRAG_X ); // systemsettings r( wxSYS_DRAG_Y ); // systemsettings r( wxSYS_EDGE_X ); // systemsettings r( wxSYS_EDGE_Y ); // systemsettings r( wxSYS_HSCROLL_ARROW_X ); // systemsettings r( wxSYS_HSCROLL_ARROW_Y ); // systemsettings r( wxSYS_HTHUMB_X ); // systemsettings r( wxSYS_ICON_X ); // systemsettings r( wxSYS_ICON_Y ); // systemsettings r( wxSYS_ICONSPACING_X ); // systemsettings r( wxSYS_ICONSPACING_Y ); // systemsettings r( wxSYS_WINDOWMIN_X ); // systemsettings r( wxSYS_WINDOWMIN_Y ); // systemsettings r( wxSYS_SCREEN_X ); // systemsettings r( wxSYS_SCREEN_Y ); // systemsettings r( wxSYS_FRAMESIZE_X ); // systemsettings r( wxSYS_FRAMESIZE_Y ); // systemsettings r( wxSYS_SMALLICON_X ); // systemsettings r( wxSYS_SMALLICON_Y ); // systemsettings r( wxSYS_HSCROLL_Y ); // systemsettings r( wxSYS_VSCROLL_X ); // systemsettings r( wxSYS_VSCROLL_ARROW_X ); // systemsettings r( wxSYS_VSCROLL_ARROW_Y ); // systemsettings r( wxSYS_VTHUMB_Y ); // systemsettings r( wxSYS_CAPTION_Y ); // systemsettings r( wxSYS_MENU_Y ); // systemsettings r( wxSYS_NETWORK_PRESENT ); // systemsettings r( wxSYS_PENWINDOWS_PRESENT ); // systemsettings r( wxSYS_SHOW_SOUNDS ); // systemsettings r( wxSYS_SWAP_BUTTONS ); // systemsettings r( wxSYS_SCREEN_NONE ); // systemsettings r( wxSYS_SCREEN_TINY ); // systemsettings r( wxSYS_SCREEN_PDA ); // systemsettings r( wxSYS_SCREEN_SMALL ); // systemsettings r( wxSYS_SCREEN_DESKTOP ); // systemsettings #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSYS_DCLICK_MSEC ); // systemsettings #endif r( wxSYS_DEFAULT_PALETTE ); // systemsettings #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSYS_TABLET_PRESENT ); // systemsettings #endif // capabilities r( wxSYS_CAN_DRAW_FRAME_DECORATIONS ); r( wxSYS_CAN_ICONIZE_FRAME ); #if WXPERL_W_VERSION_GE( 2, 6, 2 ) r( wxSYS_COLOUR_HOTLIGHT ); // systemsettings r( wxSYS_COLOUR_GRADIENTACTIVECAPTION ); // systemsettings r( wxSYS_COLOUR_GRADIENTINACTIVECAPTION ); // systemsettings r( wxSYS_COLOUR_MENUHILIGHT ); // systemsettings r( wxSYS_COLOUR_MENUBAR ); // systemsettings #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) r( wxSTOCK_NOFLAGS ); r( wxSTOCK_WITH_MNEMONIC ); r( wxSTOCK_WITH_ACCELERATOR ); r( wxSTOCK_MENU ); #endif r( wxSOUTH ); r( wxSETUP ); // sizer break; case 'T': r( wxTAB_TRAVERSAL ); // panel r( wxTB_FLAT ); // toolbar r( wxTB_DOCKABLE ); // toolbar r( wxTB_HORIZONTAL ); // toolbar r( wxTB_VERTICAL ); // toolbar r( wxTB_3DBUTTONS ); // toolbar r( wxTB_TEXT ); // toolbar r( wxTB_NOICONS ); // toolbar #if WXPERL_W_VERSION_GE( 2, 5, 1 ) r( wxTB_HORZ_LAYOUT ); // toolbar r( wxTB_HORZ_TEXT ); // toolbar #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) r( wxTB_NO_TOOLTIPS ); // toolbar #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxTB_RIGHT ); // toolbar r( wxTB_BOTTOM ); // toolbar r( wxTB_LEFT ); // toolbar r( wxTB_TOP ); // toolbar #endif r( wxTB_NOALIGN ); // toolbar r( wxTB_NODIVIDER ); // toolbar r( wxTOOL_STYLE_BUTTON ); // toolbar r( wxTOOL_STYLE_CONTROL ); // toolbar r( wxTOOL_STYLE_SEPARATOR ); // toolbar r( wxTELETYPE ); // font r( wxTE_PROCESS_ENTER ); // textctrl combobox comboctrl r( wxTE_PROCESS_TAB ); // textctrl r( wxTE_MULTILINE ); // textctrl r( wxTE_NOHIDESEL ); // textctrl r( wxTE_NO_VSCROLL ); // textctrl r( wxTE_PASSWORD ); // textctrl r( wxTE_READONLY ); // textctrl r( wxTE_RICH ); // textctrl r( wxTE_RICH2 ); // textctrl r( wxTE_LEFT ); // textctrl r( wxTE_RIGHT ); // textctrl r( wxTE_CENTRE ); // textctrl r( wxTE_CENTER ); // textctrl r( wxTE_AUTO_URL ); // textctrl #if WXPERL_W_VERSION_GE( 2, 5, 4 ) r( wxTE_DONTWRAP ); // textctrl r( wxTE_WORDWRAP ); // textctrl r( wxTE_CHARWRAP ); // textctrl r( wxTE_BESTWRAP ); // textctrl #endif #if WXPERL_W_VERSION_GE( 2, 5, 1 ) r( wxTE_HT_UNKNOWN ); // textctrl r( wxTE_HT_BEFORE ); // textctrl r( wxTE_HT_ON_TEXT ); // textctrl r( wxTE_HT_BELOW ); // textctrl r( wxTE_HT_BEYOND ); // textctrl #endif #if WXPERL_W_VERSION_LT( 2, 9, 0 ) r( wxTE_AUTO_SCROLL ); // textctrl #endif #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxTE_CAPITALIZE ); // textctrl #endif #if WXPERL_W_VERSION_LT( 2, 7, 0 ) r( wxTHICK_FRAME ); // frame dialog #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) r( wxTEXT_ALIGNMENT_DEFAULT ); // textctrl r( wxTEXT_ALIGNMENT_LEFT ); // textctrl r( wxTEXT_ALIGNMENT_CENTRE ); // textctrl r( wxTEXT_ALIGNMENT_CENTER ); // textctrl r( wxTEXT_ALIGNMENT_RIGHT ); // textctrl r( wxTEXT_ALIGNMENT_JUSTIFIED ); // textctrl r( wxTEXT_ATTR_TEXT_COLOUR ); // textctrl r( wxTEXT_ATTR_BACKGROUND_COLOUR ); // textctrl r( wxTEXT_ATTR_FONT_FACE ); // textctrl r( wxTEXT_ATTR_FONT_SIZE ); // textctrl r( wxTEXT_ATTR_FONT_WEIGHT ); // textctrl r( wxTEXT_ATTR_FONT_ITALIC ); // textctrl r( wxTEXT_ATTR_FONT_UNDERLINE ); // textctrl r( wxTEXT_ATTR_FONT ); // textctrl r( wxTEXT_ATTR_ALIGNMENT ); // textctrl r( wxTEXT_ATTR_LEFT_INDENT ); // textctrl r( wxTEXT_ATTR_RIGHT_INDENT ); // textctrl r( wxTEXT_ATTR_TABS ); // textctrl #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxTEXT_ATTR_EFFECT_NONE ); // textctrl r( wxTEXT_ATTR_EFFECT_CAPITALS ); // textctrl r( wxTEXT_ATTR_EFFECT_SMALL_CAPITALS ); // textctrl r( wxTEXT_ATTR_EFFECT_STRIKETHROUGH ); // textctrl r( wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH ); // textctrl r( wxTEXT_ATTR_EFFECT_SHADOW ); // textctrl r( wxTEXT_ATTR_EFFECT_EMBOSS ); // textctrl r( wxTEXT_ATTR_EFFECT_OUTLINE ); // textctrl r( wxTEXT_ATTR_EFFECT_ENGRAVE ); // textctrl r( wxTEXT_ATTR_EFFECT_SUPERSCRIPT );// textctrl r( wxTEXT_ATTR_EFFECT_SUBSCRIPT ); // textctrl r( wxTEXT_ATTR_EFFECTS ); // textctrl r( wxTEXT_ATTR_FONT_ENCODING ); // textctrl r( wxTEXT_ATTR_OUTLINE_LEVEL ); // textctrl #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxTEXT_TYPE_ANY ); // textctrl #endif r( wxTINY_CAPTION_HORIZ ); // miniframe r( wxTINY_CAPTION_VERT ); // miniframe r( wxTIMER_CONTINUOUS ); // timer r( wxTIMER_ONE_SHOT ); // timer r( wxTOP ); // sizer layout constraints r( wxTRANSPARENT_WINDOW ); // window r( wxTRANSPARENT ); // dc brush pen r( wxTop ); // layout constraints #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxTBK_HORZ_LAYOUT ); // toolbook r( wxTBK_BUTTONBAR ); // toolbook #endif // !export: Type_Boolean // !export: Type_Float // !export: Type_Integer // !export: Type_String // !export: Type_Unknown if( strEQ( name, "Type_Boolean" ) ) return wxConfigBase::Type_Boolean; if( strEQ( name, "Type_Float" ) ) return wxConfigBase::Type_Float; if( strEQ( name, "Type_Integer" ) ) return wxConfigBase::Type_Integer; if( strEQ( name, "Type_Unknown" ) ) return wxConfigBase::Type_Unknown; if( strEQ( name, "Type_String" ) ) return wxConfigBase::Type_String; #if wxUSE_EXTENDED_RTTI r( wxT_VOID ); r( wxT_BOOL ); r( wxT_CHAR ); r( wxT_UCHAR ); r( wxT_INT ); r( wxT_UINT ); r( wxT_LONG ); r( wxT_ULONG ); r( wxT_FLOAT ); r( wxT_DOUBLE ); r( wxT_STRING ); r( wxT_SET ); r( wxT_ENUM ); r( wxT_CUSTOM ); r( wxT_LAST_SIMPLE_TYPE_KIND ); r( wxT_OBJECT_PTR ); r( wxT_OBJECT ); r( wxT_COLLECTION ); r( wxT_DELEGATE ); #endif break; case 'U': r( wxUnconstrained ); // layout constraints r( wxUSER_DASH ); // pen #if WXPERL_W_VERSION_GE( 2, 5, 3 ) r( wxUSER_ATTENTION_INFO ); // toplevelwindow r( wxUSER_ATTENTION_ERROR ); // toplevelwindow #endif #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxUPDATE_UI_NONE ); // window r( wxUPDATE_UI_RECURSE ); // window r( wxUPDATE_UI_FROMIDLE ); // window #endif r( wxUPDATE_UI_PROCESS_ALL ); r( wxUPDATE_UI_PROCESS_SPECIFIED ); r( wxUP ); break; case 'V': r( wxVERTICAL ); // window dialog frame sizer r( wxVERTICAL_HATCH ); // brush pen r( wxVSCROLL ); // window break; case 'W': r( wxWANTS_CHARS ); // window r( wxWINDING_RULE ); // dc r( wxWidth ); // layout constraints r( wxWIZARD_EX_HELPBUTTON ); // wizard #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxWIZARD_HALIGN_CENTRE ); // wizard r( wxWIZARD_HALIGN_LEFT ); // wizard r( wxWIZARD_HALIGN_RIGHT ); // wizard r( wxWIZARD_TILE ); // wizard r( wxWIZARD_VALIGN_BOTTOM ); // wizard r( wxWIZARD_VALIGN_CENTRE ); // wizard r( wxWIZARD_VALIGN_TOP ); // wizard #endif r( wxWS_EX_VALIDATE_RECURSIVELY ); // window r( wxWS_EX_BLOCK_EVENTS ); // window r( wxWS_EX_TRANSIENT ); // window #if WXPERL_W_VERSION_GE( 2, 5, 1 ) r( wxWS_EX_PROCESS_IDLE ); // window r( wxWS_EX_PROCESS_UI_UPDATES ); // window #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) r( wxWS_EX_CONTEXTHELP ); // window #endif r( wxWEST ); r( wxWINDOW_VARIANT_NORMAL ); // window r( wxWINDOW_VARIANT_SMALL ); // window r( wxWINDOW_VARIANT_MINI ); // window r( wxWINDOW_VARIANT_LARGE ); // window break; case 'X': r( wxXOR ); // dc break; case 'Y': r( wxYES ); // dialog r( wxYES_NO ); // dialog r( wxYES_DEFAULT ); // dialog break; default: break; } #undef r // now search for modules... { wxPlConstantFunctions::compatibility_iterator node; PL_CONST_FUNC* func; double ret; for( node = s_functions().GetFirst(); node; node = node->GetNext() ) { func = node->GetData(); ret = (*func)( name, arg ); if( !errno ) return ret; } } WX_PL_CONSTANT_CLEANUP(); } // XXX hacky static void my_sv_setref_pv( pTHX_ SV* mysv, const char* pack, void* ptr ) { if( SvROK( mysv ) ) { HV* stash = gv_stashpv( CHAR_P pack, 1 ); sv_setiv( SvRV( mysv ), PTR2IV( ptr ) ); sv_bless( mysv, stash ); } else { sv_setref_pv( mysv, CHAR_P pack, ptr ); } } static void wxPli_make_const( const char* name ) { dTHX; char buffer[256]; HV* stash = gv_stashpv( CHAR_P "Wx", 1 ); strcpy( buffer, "Wx::" ); strcpy( buffer + 4, name ); SV* sv = get_sv( buffer, 1 ); newCONSTSUB( stash, (char*)name, sv ); } #if wxUSE_UNICODE static void wxPli_make_const_str( const char* name, const wxChar* value ) { dTHX; char buffer[256]; SV* tmp; wxPli_make_const( name ); strcpy( buffer, "Wx::" ); strcpy( buffer + 4, name ); tmp = get_sv( buffer, 0 ); wxPli_wxChar_2_sv( aTHX_ value, tmp ); } #endif static void wxPli_make_const_str( const char* name, const char* value ) { dTHX; char buffer[256]; SV* tmp; wxPli_make_const( name ); strcpy( buffer, "Wx::" ); strcpy( buffer + 4, name ); tmp = get_sv( buffer, 0 ); sv_setpv( tmp, value ); } static void wxPli_make_const_str( const char* name, const wxString& value ) { wxPli_make_const_str( name, (const wxChar*)value.c_str() ); } #define wxPli_make_const_string( v ) \ wxPli_make_const_str( #v, v ) static void wxPli_set_const( const char* name, const char* klass, void* ptr ) { dTHX; char buffer[256]; strcpy( buffer, "Wx::" ); strcpy( buffer + 4, name ); SV* sv = get_sv( buffer, 1 ); my_sv_setref_pv( aTHX_ sv, klass, ptr ); } #undef sv_setref_pv #define sv_setref_pv( s, p, pt ) my_sv_setref_pv( aTHX_ s, p, pt ) // !parser: sub { $_[0] =~ m<^\s*wxPli_\w+\(\s*\"?(wx\w+)\"?\s*\);\s*(?://(.*))?$> } // !package: Wx void SetConstantsOnce() { dTHX; wxPli_make_const_string( wxVERSION_STRING ); #if WXPERL_W_VERSION_GE( 2, 5, 3 ) && wxUSE_MEDIACTRL wxPli_make_const_string( wxMEDIABACKEND_DIRECTSHOW ); // media wxPli_make_const_string( wxMEDIABACKEND_QUICKTIME ); // media wxPli_make_const_string( wxMEDIABACKEND_MCI ); // media wxPli_make_const_string( wxMEDIABACKEND_GSTREAMER ); // media wxPli_make_const_string( wxMEDIABACKEND_REALPLAYER ); //media wxPli_make_const_string( wxMEDIABACKEND_WMP10 ); // media #endif // PropertyGrid string constants #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_PROPGRID /* cached values - not constants wxPli_make_const_string( wxPG_ATTR_UNITS ); wxPli_make_const_string( wxPG_ATTR_HINT ); wxPli_make_const_string( wxPG_ATTR_INLINE_HELP ); wxPli_make_const_string( wxPG_ATTR_DEFAULT_VALUE ); wxPli_make_const_string( wxPG_ATTR_MIN ); wxPli_make_const_string( wxPG_ATTR_MAX ); */ wxPli_make_const_string( wxPG_ATTR_AUTOCOMPLETE ); wxPli_make_const_string( wxPG_BOOL_USE_CHECKBOX ); wxPli_make_const_string( wxPG_BOOL_USE_DOUBLE_CLICK_CYCLING ); wxPli_make_const_string( wxPG_FLOAT_PRECISION ); wxPli_make_const_string( wxPG_STRING_PASSWORD ); wxPli_make_const_string( wxPG_UINT_BASE ); wxPli_make_const_string( wxPG_UINT_PREFIX ); wxPli_make_const_string( wxPG_FILE_WILDCARD ); wxPli_make_const_string( wxPG_FILE_SHOW_FULL_PATH ); wxPli_make_const_string( wxPG_FILE_SHOW_RELATIVE_PATH ); wxPli_make_const_string( wxPG_FILE_INITIAL_PATH ); wxPli_make_const_string( wxPG_FILE_DIALOG_TITLE ); wxPli_make_const_string( wxPG_DIR_DIALOG_MESSAGE ); wxPli_make_const_string( wxPG_ARRAY_DELIMITER ); wxPli_make_const_string( wxPG_DATE_FORMAT ); wxPli_make_const_string( wxPG_DATE_PICKER_STYLE ); wxPli_make_const_string( wxPG_ATTR_SPINCTRL_STEP ); wxPli_make_const_string( wxPG_ATTR_SPINCTRL_WRAP ); wxPli_make_const_string( wxPG_ATTR_MULTICHOICE_USERSTRINGMODE ); wxPli_make_const_string( wxPG_COLOUR_ALLOW_CUSTOM ); wxPli_make_const_string( wxPG_COLOUR_HAS_ALPHA ); #endif wxPli_make_const( "wxTheClipboard" ); // clipboard wxPli_make_const( "wxDefaultValidator" ); // misc wxPli_make_const( "wxFormatInvalid" ); // dnd wxPli_make_const( "wxDefaultPosition" ); // misc wxPli_make_const( "wxDefaultSize" ); // misc wxPli_make_const( "wxThePrintPaperDatabase" ); // print #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxPli_make_const( "wxNullAnimation" ); // animation #endif wxPli_make_const( "wxNullBitmap" ); // bitmap wxPli_make_const( "wxNullIcon" ); // icon wxPli_make_const( "wxNullColour" ); // color colour wxPli_make_const( "wxNullCursor" ); // cursor wxPli_make_const( "wxNullFont" ); // font wxPli_make_const( "wxNullPen" ); // pen wxPli_make_const( "wxNullBrush" ); // brush wxPli_make_const( "wxNullPalette" ); // palette wxPli_make_const( "wxNullAcceleratorTable" ); wxPli_make_const( "wxRED" ); // color colour wxPli_make_const( "wxGREEN" ); // color colour wxPli_make_const( "wxBLUE" ); // color colour wxPli_make_const( "wxBLACK" ); // color colour wxPli_make_const( "wxWHITE" ); // color colour wxPli_make_const( "wxCYAN" ); // color colour wxPli_make_const( "wxLIGHT_GREY" ); // color colour wxPli_make_const( "wxSTANDARD_CURSOR" ); // cursor wxPli_make_const( "wxHOURGLASS_CURSOR" ); // cursor wxPli_make_const( "wxCROSS_CURSOR" ); // cursor wxPli_make_const( "wxNORMAL_FONT" ); // font wxPli_make_const( "wxSMALL_FONT" ); // font wxPli_make_const( "wxITALIC_FONT" ); // font wxPli_make_const( "wxSWISS_FONT" ); // font wxPli_make_const( "wxRED_PEN" ); // pen wxPli_make_const( "wxGREEN_PEN" ); // pen wxPli_make_const( "wxCYAN_PEN" ); // pen wxPli_make_const( "wxBLACK_PEN" ); // pen wxPli_make_const( "wxWHITE_PEN" ); // pen wxPli_make_const( "wxTRANSPARENT_PEN" ); // pen wxPli_make_const( "wxBLACK_DASHED_PEN" ); // pen wxPli_make_const( "wxGREY_PEN" ); // pen wxPli_make_const( "wxMEDIUM_GREY_PEN" ); // pen wxPli_make_const( "wxLIGHT_GREY_PEN" ); // pen wxPli_make_const( "wxBLUE_BRUSH" ); // brush wxPli_make_const( "wxGREEN_BRUSH" ); // brush wxPli_make_const( "wxWHITE_BRUSH" ); // brush wxPli_make_const( "wxBLACK_BRUSH" ); // brush wxPli_make_const( "wxGREY_BRUSH" ); // brush wxPli_make_const( "wxMEDIUM_GREY_BRUSH" ); // brush wxPli_make_const( "wxLIGHT_GREY_BRUSH" ); // brush wxPli_make_const( "wxTRANSPARENT_BRUSH" ); // brush wxPli_make_const( "wxCYAN_BRUSH" ); // brush wxPli_make_const( "wxRED_BRUSH" ); // brush wxPli_make_const_string( wxIMAGE_OPTION_BMP_FORMAT ); // image wxPli_make_const_string( wxIMAGE_OPTION_CUR_HOTSPOT_X ); // image wxPli_make_const_string( wxIMAGE_OPTION_CUR_HOTSPOT_Y ); // image wxPli_make_const_string( wxIMAGE_OPTION_FILENAME ); // image #if WXPERL_W_VERSION_GE( 2, 5, 4 ) wxPli_make_const_string( wxIMAGE_OPTION_QUALITY ); // image wxPli_make_const_string( wxIMAGE_OPTION_RESOLUTION ); // image wxPli_make_const_string( wxIMAGE_OPTION_RESOLUTIONX ); // image wxPli_make_const_string( wxIMAGE_OPTION_RESOLUTIONY ); // image wxPli_make_const_string( wxIMAGE_OPTION_RESOLUTIONUNIT ); // image #endif #if WXPERL_W_VERSION_GE( 2, 6, 0 ) wxPli_make_const_string( wxIMAGE_OPTION_BITSPERSAMPLE ); // image wxPli_make_const_string( wxIMAGE_OPTION_COMPRESSION ); // image wxPli_make_const_string( wxIMAGE_OPTION_IMAGEDESCRIPTOR ); // image wxPli_make_const_string( wxIMAGE_OPTION_PNG_BITDEPTH ); // image wxPli_make_const_string( wxIMAGE_OPTION_PNG_FORMAT ); // image wxPli_make_const_string( wxIMAGE_OPTION_SAMPLESPERPIXEL ); // image #endif wxPli_make_const_string( wxFileSelectorDefaultWildcardStr ); // filedialog // these are correctly cloned SV* tmp; int universal; int xstatic; int unicode; int debugging; int threads; #if defined(__WXUNIVERSAL__) universal = 1; #else universal = 0; #endif #if defined(WXPL_STATIC) xstatic = 1; #else xstatic = 0; #endif #if wxUSE_UNICODE unicode = 1; #else unicode = 0; #endif #ifdef __WXDEBUG__ debugging = 1; #else debugging = 0; #endif #if wxPERL_USE_THREADS threads = 1; #else threads = 0; #endif tmp = get_sv( "Wx::_universal", 1 ); sv_setiv( tmp, universal ); tmp = get_sv( "Wx::_static", 1 ); sv_setiv( tmp, xstatic ); tmp = get_sv( "Wx::_unicode", 1 ); sv_setiv( tmp, unicode ); tmp = get_sv( "Wx::wxUNICODE", 1 ); sv_setiv( tmp, unicode ); tmp = get_sv( "Wx::wxDEBUG", 1 ); sv_setiv( tmp, debugging ); tmp = get_sv( "Wx::wxTHREADS", 1 ); sv_setiv( tmp, threads ); // constant functions wxPli_make_const( "wxUNICODE" /* don't export */ ); wxPli_make_const( "wxVERSION" /* don't export */ ); wxPli_make_const( "wxDEBUG" /* don't export */ ); wxPli_make_const( "wxTHREADS" /* don't export */ ); } // !parser: void SetConstants() { dTHX; SV* tmp; wxPli_set_const( "wxDefaultPosition", "Wx::Point", new wxPoint( wxDefaultPosition ) ); wxPli_set_const( "wxDefaultSize", "Wx::Size", new wxSize( wxDefaultSize ) ); tmp = get_sv( "Wx::wxDefaultValidator", 1 ); sv_setref_pv( tmp, "Wx::Validator", (wxValidator*)&wxDefaultValidator ); // // Null GDI objects // #define DEFINE_NULL( name ) \ wxPli_set_const( "wxNull" #name, "Wx::" #name, \ new wx##name( wxNull##name ) ) #if WXPERL_W_VERSION_GE( 2, 7, 2 ) DEFINE_NULL( Animation ); #endif DEFINE_NULL( Bitmap ); DEFINE_NULL( Icon ); DEFINE_NULL( Colour ); DEFINE_NULL( Cursor ); DEFINE_NULL( Font ); DEFINE_NULL( Pen ); DEFINE_NULL( Brush ); DEFINE_NULL( Palette ); DEFINE_NULL( AcceleratorTable ); #undef DEFINE_NULL // // Predefined colours // wxPli_set_const( "wxRED", "Wx::Colour", new wxColour( *wxRED ) ); wxPli_set_const( "wxGREEN", "Wx::Colour", new wxColour( *wxGREEN ) ); wxPli_set_const( "wxBLUE", "Wx::Colour", new wxColour( *wxBLUE ) ); wxPli_set_const( "wxBLACK", "Wx::Colour", new wxColour( *wxBLACK ) ); wxPli_set_const( "wxWHITE", "Wx::Colour", new wxColour( *wxWHITE ) ); wxPli_set_const( "wxCYAN", "Wx::Colour", new wxColour( *wxCYAN ) ); wxPli_set_const( "wxLIGHT_GREY", "Wx::Colour", new wxColour( *wxLIGHT_GREY ) ); // // predefined cursors // wxPli_set_const( "wxSTANDARD_CURSOR", "Wx::Cursor", new wxCursor( *wxSTANDARD_CURSOR ) ); wxPli_set_const( "wxHOURGLASS_CURSOR", "Wx::Cursor", new wxCursor( *wxHOURGLASS_CURSOR ) ); wxPli_set_const( "wxCROSS_CURSOR", "Wx::Cursor", new wxCursor( *wxCROSS_CURSOR ) ); // // predefined fonts // wxPli_set_const( "wxNORMAL_FONT", "Wx::Font", new wxFont( *wxNORMAL_FONT ) ); wxPli_set_const( "wxSMALL_FONT", "Wx::Font", new wxFont( *wxSMALL_FONT ) ); wxPli_set_const( "wxITALIC_FONT", "Wx::Font", new wxFont( *wxITALIC_FONT ) ); wxPli_set_const( "wxSWISS_FONT", "Wx::Font", new wxFont( *wxSWISS_FONT ) ); // // predefined pens // #define DEFINE_PEN( pen ) \ wxPli_set_const( #pen, "Wx::Pen", new wxPen( *pen ) ) DEFINE_PEN( wxRED_PEN ); DEFINE_PEN( wxGREEN_PEN ); DEFINE_PEN( wxCYAN_PEN ); DEFINE_PEN( wxBLACK_PEN ); DEFINE_PEN( wxWHITE_PEN ); DEFINE_PEN( wxTRANSPARENT_PEN ); DEFINE_PEN( wxBLACK_DASHED_PEN ); DEFINE_PEN( wxGREY_PEN ); DEFINE_PEN( wxMEDIUM_GREY_PEN ); DEFINE_PEN( wxLIGHT_GREY_PEN ); #undef DEFINE_PEN // // Predefined brushes // #define DEFINE_BRUSH( brush ) \ wxPli_set_const( #brush, "Wx::Brush", new wxBrush( *brush ) ) DEFINE_BRUSH( wxBLUE_BRUSH ); DEFINE_BRUSH( wxGREEN_BRUSH ); DEFINE_BRUSH( wxWHITE_BRUSH ); DEFINE_BRUSH( wxBLACK_BRUSH ); DEFINE_BRUSH( wxGREY_BRUSH ); DEFINE_BRUSH( wxMEDIUM_GREY_BRUSH ); DEFINE_BRUSH( wxLIGHT_GREY_BRUSH ); DEFINE_BRUSH( wxTRANSPARENT_BRUSH ); DEFINE_BRUSH( wxCYAN_BRUSH ); DEFINE_BRUSH( wxRED_BRUSH ); #undef DEFINE_BRUSH // // Clipboard & Drag'n'Drop // wxPli_set_const( "wxFormatInvalid", "Wx::DataFormat", new wxDataFormat( wxFormatInvalid ) ); tmp = get_sv( "Wx::wxTheClipboard", 1 ); sv_setref_pv( tmp, "Wx::Clipboard", wxTheClipboard ); // // Printing // tmp = get_sv( "Wx::wxThePrintPaperDatabase", 1 ); sv_setref_pv( tmp, "Wx::PrintPaperDatabase", wxThePrintPaperDatabase ); } WXPLI_BOOT_ONCE(Wx_Const); #define boot_Wx_Const wxPli_boot_Wx_Const MODULE=Wx_Const PACKAGE=Wx ## this used to be written using a CODE: section, but it seems to tickle ## an optimizer bug with g++ 4.2, -O2, no threads, on Mac OS X double constant( name, arg, error ) const char* name int arg int error = NO_INIT PPCODE: RETVAL = constant( name, arg ); XPUSHs( sv_2mortal( newSViv( RETVAL ) ) ); sv_setiv_mg( ST(2), errno ); XSRETURN( 1 ); void UnsetConstants() CODE: SV* tmp; tmp = get_sv( "Wx::wxTheClipboard", 1 ); if( tmp && SvROK( tmp ) ) sv_setiv( SvRV( tmp ), 0 ); tmp = get_sv( "Wx::wxDefaultValidator", 1 ); if( tmp && SvROK( tmp ) ) sv_setiv( SvRV( tmp ), 0 ); tmp = get_sv( "Wx::wxThePrintPaperDatabase", 1 ); if( tmp && SvROK( tmp ) ) sv_setiv( SvRV( tmp ), 0 ); void SetEvents() CODE: wxPli_set_events( evts ); void SetInheritance() char* _get_packages() CODE: static const char packages[] = "" #if wxPERL_USE_DND && !defined(__WXMAC__) && !defined(__WXMOTIF__) "use Wx::DND;" #endif #if wxPERL_USE_DOCVIEW && !defined(__WXMAC__) "use Wx::DocView;" #endif #if wxPERL_USE_FILESYS "use Wx::FS;" #endif #if wxPERL_USE_GRID "use Wx::Grid;" #endif #if wxPERL_USE_HELP "use Wx::Help;" #endif #if wxPERL_USE_HTML "use Wx::Html;" #endif #if wxPERL_USE_MDI "use Wx::MDI;" #endif #if wxPERL_USE_PRINTING_ARCHITECTURE "use Wx::Print;" #endif #if wxPERL_USE_SOCKET "use Wx::Socket;" #endif #if wxPERL_USE_CALENDAR "use Wx::Calendar;" #endif #if wxPERL_USE_DATETIME "use Wx::DateTime;" #endif #if wxPERL_USE_DATAVIEW && wxUSE_DATAVIEWCTRL && WXPERL_W_VERSION_GE( 2, 9, 0 ) "use Wx::DataView;" #endif #if wxPERL_USE_MEDIA && wxUSE_MEDIACTRL && WXPERL_W_VERSION_GE( 2, 6, 0 ) "use Wx::Media;" #endif #if wxPERL_USE_PROPGRID && wxUSE_PROPGRID && WXPERL_W_VERSION_GE( 2, 9, 3 ) "use Wx::PropertyGrid;" #endif #if wxPERL_USE_RIBBON && wxUSE_RIBBON && WXPERL_W_VERSION_GE( 2, 9, 3 ) "use Wx::Ribbon;" #endif #if wxPERL_USE_WEBVIEW && wxUSE_WEBVIEW && WXPERL_W_VERSION_GE( 2, 9, 3 ) "use Wx::WebView;" #endif #if wxPERL_USE_RICHTEXT && WXPERL_W_VERSION_GE( 2, 7, 0 ) "use Wx::RichText;" #endif #if wxPERL_USE_AUI && WXPERL_W_VERSION_GE( 2, 7, 2 ) "use Wx::AUI;" #endif ; RETVAL = (char*)packages; OUTPUT: RETVAL Wx-0.9923/Controls.xs000664000000000000 1224512306612233 12662 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: Controls.xs // Purpose: XS for Wx::Control and derived classes // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: Controls.xs 3478 2013-04-16 10:31:53Z mdootson $ // Copyright: (c) 2000-2013 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include #include #include #include #include #include #include // re-include for client data #include "cpp/helpers.h" #define wxDefaultValidatorPtr (wxValidator*)&wxDefaultValidator #define wxBLACKPtr (wxColour*)wxBLACK #define wxNORMAL_FONTPtr (wxFont*)wxNORMAL_FONT #define wxNullBitmapPtr (wxBitmap*) &wxNullBitmap #define wxNullAnimationPtr (wxAnimation*) &wxNullAnimation #define wxNullColourPtr (wxColour*)&wxNullColour #undef THIS #include "cpp/v_cback.h" #include "cpp/controls.h" #include "cpp/controls.cpp" #include "cpp/overload.h" WXPLI_BOOT_ONCE(Wx_Ctrl); #define boot_Wx_Ctrl wxPli_boot_Wx_Ctrl MODULE=Wx_Ctrl PACKAGE=Wx::Control void wxControl::Command( event ) wxCommandEvent* event CODE: THIS->Command( *event ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxString wxControl::GetLabelText() #endif INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/ControlWithItems.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp interface/wx/bmpbuttn.h INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/AnimationCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/EditableListBox.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/BookCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/Listbook.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/Choicebook.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/Toolbook.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/Treebook.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/HyperlinkCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/VListBox.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/SearchCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/ComboPopup.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/ComboCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/OwnerDrawnComboBox.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/CollapsiblePane.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/BitmapComboBox.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/DirCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/FileCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp interface/wx/generic/spinctrg.h INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp interface/wx/infobar.h INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp interface/wx/headerctrl.h INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp interface/wx/headercol.h INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp interface/wx/button.h INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp interface/wx/commandlinkbutton.h INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp interface/wx/treelist.h INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp interface/wx/richtooltip.h INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp interface/wx/bannerwindow.h INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp interface/wx/rearrangectrl.h INCLUDE: XS/CheckBox.xs INCLUDE: XS/CheckListBox.xs INCLUDE: XS/Choice.xs INCLUDE: XS/ComboBox.xs INCLUDE: XS/Gauge.xs INCLUDE: XS/ListBox.xs INCLUDE: XS/ListCtrl.xs INCLUDE: XS/Notebook.xs INCLUDE: XS/RadioBox.xs INCLUDE: XS/RadioButton.xs INCLUDE: XS/ScrollBar.xs INCLUDE: XS/Slider.xs INCLUDE: XS/SpinButton.xs INCLUDE: XS/SpinCtrl.xs INCLUDE: XS/StaticBitmap.xs INCLUDE: XS/StaticBox.xs INCLUDE: XS/StaticLine.xs INCLUDE: XS/StaticText.xs INCLUDE: XS/ToggleButton.xs INCLUDE: XS/TreeCtrl.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/TextAttr.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/TextCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/PickerCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/ColourPickerCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/FilePickerCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/FontPickerCtrl.xsp MODULE=Wx_Ctrl PACKAGE=Wx::Control Wx-0.9923/cpp/000775000000000000 012316265011 11160 5ustar00Mark000000000000Wx-0.9923/cpp/app.h000664000000000000 1237612313567325 12234 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/app.h // Purpose: c++ wrapper for wxApp // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: app.h 3430 2013-02-05 10:18:36Z mdootson $ // 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 ///////////////////////////////////////////////////////////////////////////// #ifdef Yield #undef Yield #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) && WXPERL_W_VERSION_LT( 3, 0, 0 ) #include class wxPerlAppTraits : public wxGUIAppTraits { public: virtual void SetLocale() { } }; #endif class wxPliApp:public wxApp { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliApp ); WXPLI_DECLARE_V_CBACK(); public: wxPliApp( const char* package = "Wx::App" ); ~wxPliApp(); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) && WXPERL_W_VERSION_LT( 3, 0, 0 ) wxAppTraits* CreateTraits() { return (wxAppTraits*)new wxPerlAppTraits(); } #endif bool OnInit(); int MainLoop(); void CleanUp() { DeletePendingObjects( this ); wxApp::CleanUp(); } #if defined( __WXMSW__ ) && WXPERL_W_VERSION_LT( 2, 5, 0 ) static void SetKeepGoing(wxPliApp* app, bool value) { app->m_keepGoing = value; } #endif void DeletePendingObjects() { wxApp::DeletePendingObjects(); } static void DeletePendingObjects(wxApp* app) { ((wxPliApp*) app)->DeletePendingObjects(); } #if ( WXPERL_W_VERSION_GE( 2, 9, 1 ) && wxDEBUG_LEVEL > 0 ) || ( WXPERL_W_VERSION_LE( 2, 9, 0) && defined(__WXDEBUG__) ) void OnAssertFailure(const wxChar *file, int line, const wxChar *func, const wxChar *cond, const wxChar *msg) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnAssertFailure" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "wiwww", file, line, func, cond, msg ); } else wxApp::OnAssertFailure( file, line, func, cond, msg ); } #endif DEC_V_CBACK_INT__VOID( OnExit ); DEC_V_CBACK_BOOL__BOOL( Yield ); #if ( WXPERL_W_VERSION_GE( 2, 9, 4 ) && defined(__WXOSX_COCOA__) ) virtual void MacOpenFiles(const wxArrayString &fileNames ) { dTHX; if( wxPliFCback( aTHX_ &m_callback, "MacOpenFiles" ) ) { AV* files; files = wxPli_stringarray_2_av( aTHX_ fileNames ); wxPliCCback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "S", sv_2mortal( newRV_noinc( (SV*)files ) ) ); } else wxApp::MacOpenFiles( fileNames ); } virtual void MacOpenFile(const wxString &fileName) { dTHX; if( wxPliFCback( aTHX_ &m_callback, "MacOpenFile" ) ) { wxPliCCback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "P", &fileName ); } else wxApp::MacOpenFile( fileName ); } virtual void MacOpenURL(const wxString &url) { dTHX; if( wxPliFCback( aTHX_ &m_callback, "MacOpenURL" ) ) { wxPliCCback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "P", &url ); } else wxApp::MacOpenURL( url ); } virtual void MacPrintFile(const wxString &fileName) { dTHX; if( wxPliFCback( aTHX_ &m_callback, "MacPrintFile" ) ) { wxPliCCback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "P", &fileName ); } else wxApp::MacPrintFile( fileName ); } virtual void MacNewFile() { dTHX; if( wxPliFCback( aTHX_ &m_callback, "MacNewFile" ) ) { wxPliCCback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, NULL ); } else wxApp::MacNewFile(); } virtual void MacReopenApp() { dTHX; if( wxPliFCback( aTHX_ &m_callback, "MacReopenApp" ) ) { wxPliCCback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, NULL ); } else wxApp::MacReopenApp(); } #endif }; inline wxPliApp::wxPliApp( const char* package ) :m_callback( "Wx::App" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } wxPliApp::~wxPliApp() { #ifdef __WXMOTIF__ if (GetTopWindow()) { delete GetTopWindow(); SetTopWindow(NULL); } DeletePendingObjects(); OnExit(); #endif #if WXPERL_W_VERSION_LE( 2, 5, 1 ) wxPli_delete_argv( (void***) &argv, 1 ); argc = 0; argv = 0; #endif } inline bool wxPliApp::OnInit() { wxApp::OnInit(); return false; } inline int wxPliApp::MainLoop() { int retval = 0; DeletePendingObjects(); #if defined( __WXGTK__ ) && WXPERL_W_VERSION_LT( 2, 5, 1 ) m_initialized = wxTopLevelWindows.GetCount() != 0; #endif if( m_exitOnFrameDelete == Later ) m_exitOnFrameDelete = Yes; retval = wxApp::MainLoop(); OnExit(); return retval; } DEF_V_CBACK_INT__VOID( wxPliApp, wxApp, OnExit ); DEF_V_CBACK_BOOL__BOOL( wxPliApp, wxApp, Yield ); WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliApp, wxApp ); // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/array_helpers.h000664000000000000 675512306612226 14271 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/array_helpers.h // Purpose: some helper functions/classes for array conversion // Author: Mattia Barbon // Modified by: // Created: 27/12/2009 // RCS-ID: $Id: helpers.h 2589 2009-07-01 22:06:13Z mbarbon $ // Copyright: (c) 2009 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #ifndef __CPP_ARRAY_HELPERS_H #define __CPP_ARRAY_HELPERS_H template int wxPli_av_2_arrayany( pTHX_ SV* avref, typename C::pointer_type array, const F& convertf, const C& allocator ) { AV* av; if( !SvROK( avref ) || ( SvTYPE( (SV*) ( av = (AV*) SvRV( avref ) ) ) != SVt_PVAV ) ) { croak( "the value is not an array reference" ); return 0; } int n = av_len( av ) + 1; typename C::value_type arr = allocator.create( n ); for( int i = 0; i < n; ++i ) { SV* t = *av_fetch( av, i, 0 ); if( !convertf( aTHX_ arr[i], t ) ) { allocator.free( arr ); croak( "invalid conversion for array element" ); return 0; } } allocator.assign( array, arr ); return n; } // value conversion functions class wxPli_convert_sv { public: bool operator()( pTHX_ SV*& dest, SV* src ) const { dest = src; return true; } }; class wxPli_convert_uchar { public: bool operator()( pTHX_ unsigned char& dest, SV* src ) const { dest = (unsigned char) SvUV( src ); return true; } }; class wxPli_convert_int { public: bool operator()( pTHX_ int& dest, SV* src ) const { dest = (int) SvIV( src ); return true; } }; class wxPli_convert_wxstring { public: bool operator()( pTHX_ wxString& dest, SV* src ) const { WXSTRING_INPUT( dest, const char*, src ); return true; } }; // array adapters // C-type arrays template class wxPli_array_allocator { public: typedef CType** pointer_type; typedef CType* value_type; value_type create( size_t n ) const { return new CType[n]; } void assign( pointer_type lv, value_type rv ) const { *lv = rv; } void free( value_type rv ) const { delete[] rv; } }; // wxWidgets' array types template class wxPli_wxarray_allocator { public: typedef A* pointer_type; typedef A& value_type; wxPli_wxarray_allocator( pointer_type lv ) : m_value( lv ) { } value_type create( size_t n ) const { m_value->Alloc( n ); for( size_t i = 0; i < n; ++i ) m_value->Add( V() ); return *m_value; } void assign( pointer_type, value_type ) const { } void free( value_type ) const { } private: A* m_value; }; // adapter for wxVector and std::vector template class wxPli_vector_allocator { public: typedef A* pointer_type; typedef A& value_type; wxPli_vector_allocator( pointer_type lv ) : m_value( lv ) { } value_type create( size_t n ) const { m_value->reserve( n ); for( size_t i = 0; i < n; ++i ) m_value->push_back( V() ); return *m_value; } void assign( pointer_type, value_type ) const { } void free( value_type ) const { } private: A* m_value; }; #endif // __CPP_ARRAY_HELPERS_H Wx-0.9923/cpp/chkconfig.h000664000000000000 1155112306612225 13371 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/chkconfig.h // Purpose: checks if desired configurations for wxPerl and wxWidgets // are compatible // Author: Mattia Barbon // Modified by: // Created: 05/11/2001 // RCS-ID: $Id: chkconfig.h 2252 2007-10-17 22:55:25Z mbarbon $ // Copyright: (c) 2001-2004, 2006-2007 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include #include "cpp/setup.h" #if 0 #define wxPERL_USE_PRINTING_ARCHITECTURE 1 #define wxPERL_USE_MDI_ARCHITECTURE 1 #define wxPERL_USE_SNGLINST_CHECKER 1 // #define wxPERL_USE_DRAG_AND_DROP 1 // #define wxPERL_USE_TOGGLEBTN 1 // #define wxPERL_USE_MS_HTML_HELP // #define wxPERL_USE_HELPBEST #endif // missing // UNICODE, LOG, CMDLINE_PARSER, LOGWINDOW, LOGGUI, LOGDIALOG // WCHAR_T, STREAMS, INTL, DATETIME, TIMER, STOPWATCH, CONFIG, // CONFIG_NATIVE, DIALUP_MANAGER, FILESYSTEM, FS_ZIP, FS_INET, JOYSTICK, // FONTMAP, MIMETYPE, SYSTEM_OPTIONS, POPUPWIN, BUTTON, // BMPBUTTON, CALENDARCTRL, CHECKBOX, CHECKLISTBOX, CHOICE, // COMBOBOX, GAUGE, LISTBOX, LISTCTRL, RADIOBOX, RADIOBTN, // SCROLLBAR, SLIDER, SPINBTN, SPINCTRL, STATBOX, STATLINE, // STATTEXT, STATBMP, TEXTCTRL, TOGGLEBTN, TREECTRL // STATUSBAR, TOOLBAR, TOOLBAR_SIMPLE, NOTEBOOK, GRID, ACCEL // CARET, IMAGLIST, MENUS, SASH, SPLITTER, VALIDATORS, // BUSYINFO, CHOICEDLG, COLOURDLG, DIRDLG, FILEDLG, FINDREPLDLG // MSGDLG, PROGRESSDLG, STARTUP_TIPS, TEXTDLG, NUMBERDLG, // SPLASH, WIZARDDLG, HTML, CLIPBOARD, DATAOBJ, HELP, // WXHTML_HELP, RESOURCES, CONSTRAINTS, MOUSEWHEEL, IMAGE, // LIBPNG, LIBJPEG, GIF, PNM, PCX, XPM, PALETTE #ifdef wxPERL_USE_DRAG_AND_DROP # if wxPERL_USE_DRAG_AND_DROP && !wxUSE_DRAG_AND_DROP # error "Recompile wxWidgets with wxUSE_DRAG_AND_DROP" # endif #else # define wxPERL_USE_DRAG_AND_DROP wxUSE_DRAG_AND_DROP #endif #ifdef wxPERL_USE_FONTDLG # if wxPERL_USE_FONTDLG && !wxUSE_FONTDLG # error "Recompile wxWidgets with wxUSE_FONTDLG" # endif #else # ifndef wxUSE_FONTDLG # define wxUSE_FONTDLG 1 # endif # define wxPERL_USE_FONTDLG wxUSE_FONTDLG #endif #ifdef wxPERL_USE_IFF # if wxPERL_USE_IFF && !wxUSE_IFF # error "Recompile wxWidgets with wxUSE_IFF" # endif #else # define wxPERL_USE_IFF wxUSE_IFF #endif #ifdef wxPERL_USE_LIBTIFF # if wxPERL_USE_LIBTIFF && !wxUSE_LIBTIFF # error "Recompile wxWidgets with wxUSE_LIBTIFF" # endif #else # define wxPERL_USE_LIBTIFF wxUSE_LIBTIFF #endif #ifdef wxPERL_USE_MDI_ARCHITECTURE # if wxPERL_USE_MDI_ARCHITECTURE && !wxUSE_MDI_ARCHITECTURE # error "Recompile wxWidgets with wxUSE_MDI_ARCHITECTURE" # endif #else # define wxPERL_USE_MDI_ARCHITECTURE wxUSE_MDI_ARCHITECTURE #endif #ifdef __WXUNIVERSAL__ # define wxPERL_USE_MINIFRAME 0 #else # define wxPERL_USE_MINIFRAME 1 #endif #ifdef wxPERL_USE_MS_HTML_HELP # if wxPERL_USE_MS_HTML_HELP && !wxUSE_MS_HTML_HELP # error "Recompile wxWidgets with wxUSE_MS_HTML_HELP" # endif #else # define wxPERL_USE_MS_HTML_HELP wxUSE_MS_HTML_HELP #endif #ifdef wxPERL_USE_PRINTING_ARCHITECTURE # if wxPERL_USE_PRINTING_ARCHITECTURE && !wxUSE_PRINTING_ARCHITECTURE # error "Recompile wxWidgets with wxUSE_PRINTING_ARCHITECTURE" # endif #else # define wxPERL_USE_PRINTING_ARCHITECTURE wxUSE_PRINTING_ARCHITECTURE #endif #ifdef wxPERL_USE_TOOLTIPS # if wxPERL_USE_TOOLTIPS && !wxUSE_TOOLTIPS # error "Recompile wxWidgets with wxUSE_TOOLTIPS" # endif #else # define wxPERL_USE_TOOLTIPS wxUSE_TOOLTIPS #endif #ifdef wxPERL_USE_WAVE # if wxPERL_USE_WAVE && !wxUSE_WAVE # error "Recompile wxWidgets with wxUSE_WAVE" # endif #else # define wxPERL_USE_WAVE wxUSE_WAVE #endif #ifdef wxPERL_USE_BESTHELP # if wxPERL_USE_BESTHELP && !( wxUSE_MS_HTML_HELP && wxUSE_WXHTML_HELP ) # error "Recompile wxWidgets with wxUSE_MS_HTML_HELP and wxUSE_WXHTML_HELP" # endif #else # define wxPERL_USE_BESTHELP ( wxUSE_MS_HTML_HELP && wxUSE_WXHTML_HELP ) #endif #ifdef wxPERL_USE_ICO_CUR # if wxPERL_USE_ICO_CUR && !wxUSE_ICO_CUR # error "Recompile wxWidgets with wxUSE_ICO_CUR" # endif #else # define wxPERL_USE_ICO_CUR wxUSE_ICO_CUR #endif #ifdef wxPERL_USE_SNGLINST_CHECKER # if wxPERL_USE_SNGLINST_CHECKER && !wxUSE_SNGLINST_CHECKER # error "Recompile wxWidgets with wxUSE_SNGLINST_CHECKER" # endif #else # define wxPERL_USE_SNGLINST_CHECKER wxUSE_SNGLINST_CHECKER #endif #ifdef wxPERL_USE_TOGGLEBTN # if wxPERL_USE_TOGGLEBTN && !wxUSE_TOGGLEBTN # error "Recompile wxWidgets with wxUSE_TOGGLEBTN" # endif #else # define wxPERL_USE_TOGGLEBTN wxUSE_TOGGLEBTN #endif #if wxUSE_THREADS && defined(USE_ITHREADS) # define wxPERL_USE_THREADS 1 #else # define wxPERL_USE_THREADS 0 #endif Wx-0.9923/cpp/compat.h000664000000000000 1045512306612226 12724 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/compat.h // Purpose: some compatibility macros // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: compat.h 2532 2009-02-21 08:51:16Z mbarbon $ // Copyright: (c) 2000-2003, 2006, 2008-2009 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #if !defined( PERL_REVISION ) && !defined( PATCHLEVEL ) #include #endif // version < 5.6 does not define PERL_ #ifdef PERL_REVISION #define WXPERL_P_VERSION_EQ( V, S, P ) \ ( ( PERL_REVISION == (V) ) && ( PERL_VERSION == (S) ) && ( PERL_SUBVERSION == (P) ) ) #define WXPERL_P_VERSION_GE( V, S, P ) \ ( ( PERL_REVISION > (V) ) || \ ( PERL_REVISION == (V) && PERL_VERSION > (S) ) || \ ( PERL_REVISION == (V) && PERL_VERSION == (S) && PERL_SUBVERSION >= (P) ) ) #else #define WXPERL_P_VERSION_EQ( V, S, P ) \ ( ( 5 == (V) ) && ( PATCHLEVEL == (S) ) && ( SUBVERSION == (P) ) ) #define WXPERL_P_VERSION_GE( V, S, P ) \ ( ( 5 > (V) ) || \ ( 5 == (V) && PATCHLEVEL > (S) ) || \ ( 5 == (V) && PATCHLEVEL == (S) && SUBVERSION >= (P) ) ) #endif #define WXPERL_P_VERSION_LT( V, S, P ) !WXPERL_P_VERSION_GE( V, S, P ) #define WXPERL_W_VERSION_EQ( V, S, P ) \ ( wxMAJOR_VERSION == (V) && wxMINOR_VERSION == (S) && wxRELEASE_NUMBER == (P) ) #define WXPERL_W_VERSION_GE( V, S, P ) \ ( ( wxMAJOR_VERSION > (V) ) || \ ( wxMAJOR_VERSION == (V) && wxMINOR_VERSION > (S) ) || \ ( wxMAJOR_VERSION == (V) && wxMINOR_VERSION == (S) && wxRELEASE_NUMBER >= (P) ) ) #define WXPERL_W_VERSION_LE( V, S, P ) \ ( ( wxMAJOR_VERSION < (V) ) || \ ( wxMAJOR_VERSION == (V) && wxMINOR_VERSION < (S) ) || \ ( wxMAJOR_VERSION == (V) && wxMINOR_VERSION == (S) && wxRELEASE_NUMBER <= (P) ) ) #define WXPERL_W_VERSION_LT( V, S, P ) !WXPERL_W_VERSION_GE( V, S, P ) #if WXPERL_P_VERSION_GE( 5, 5, 0 ) && !WXPERL_P_VERSION_GE( 5, 6, 0 ) #define CHAR_P (char*) #define get_sv perl_get_sv #define get_av perl_get_av #define call_sv perl_call_sv #define eval_pv perl_eval_pv #define call_method perl_call_method #define require_pv perl_require_pv #define call_argv perl_call_argv #define newSVuv( val ) newSViv( (IV)(UV)val ) #define SvPV_nolen( s ) SvPV( (s), PL_na ) #endif #if WXPERL_P_VERSION_GE( 5, 6, 0 ) #define CHAR_P #else #define vTHX #define pTHX #define aTHX #define dTHX #define pTHX_ #define aTHX_ #endif #if WXPERL_P_VERSION_GE( 5, 8, 0 ) // XXX this is an hack #include #undef HAS_CRYPT_R #undef HAS_LOCALTIME_R #endif #ifndef PTR2IV // from perl.h /* * The macros INT2PTR and NUM2PTR are (despite their names) * bi-directional: they will convert int/float to or from pointers. * However the conversion to int/float are named explicitly: * PTR2IV, PTR2UV, PTR2NV. * * For int conversions we do not need two casts if pointers are * the same size as IV and UV. Otherwise we need an explicit * cast (PTRV) to avoid compiler warnings. */ #if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE) # define PTRV UV # define INT2PTR(any,d) (any)(d) #else # if PTRSIZE == LONGSIZE # define PTRV unsigned long # else # define PTRV unsigned # endif # define INT2PTR(any,d) (any)(PTRV)(d) #endif #define NUM2PTR(any,d) (any)(PTRV)(d) #define PTR2IV(p) INT2PTR(IV,p) #define PTR2UV(p) INT2PTR(UV,p) #define PTR2NV(p) NUM2PTR(NV,p) #endif #define WXINTL_NO_GETTEXT_MACRO 1 #if defined(__WXMSW__) # if WXPERL_P_VERSION_GE( 5, 6, 0 ) # define WXXS( name ) __declspec(dllexport) void name( pTHXo_ CV* cv ) # else # ifdef PERL_OBJECT # define WXXS( name ) __declspec( dllexport ) void name(CV* cv, CPerlObj* pPerl) # else # define WXXS( name ) __declspec( dllexport ) void name(CV* cv) # endif # endif #endif #define WXPLDLL #define NEEDS_PLI_HELPERS_STRUCT() \ defined( WXPL_EXT ) && !defined( WXPL_STATIC ) && !defined(__WXMAC__) #if NEEDS_PLI_HELPERS_STRUCT() # define FUNCPTR( name ) ( * name ) #else # define FUNCPTR( name ) name #endif // puts extern "C" around perl headers #if defined(__CYGWIN__) #define WXPL_EXTERN_C_START extern "C" { #define WXPL_EXTERN_C_END } #else #define WXPL_EXTERN_C_START #define WXPL_EXTERN_C_END #endif Wx-0.9923/cpp/constants.h000664000000000000 372512306612226 13437 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/constants.h // Purpose: module to allow modularity in constant() function // Author: Mattia Barbon // Modified by: // Created: 17/03/2001 // RCS-ID: $Id: constants.h 2498 2008-11-05 19:45:38Z mbarbon $ // Copyright: (c) 2001-2002, 2005, 2008 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #ifndef _WXPERL_CONSTANTS_H #define _WXPERL_CONSTANTS_H typedef double (*PL_CONST_FUNC)( const char*, int ); #define WX_PL_CONSTANT_INIT() \ errno = 0; \ char fl = name[0]; \ \ if( tolower( name[0] ) == 'w' && tolower( name[1] ) == 'x' ) \ fl = toupper( name[2] ); #define WX_PL_CONSTANT_CLEANUP() \ errno = EINVAL; \ return 0; // implementation for OnInit/OnExit in Constants.xs class wxPlConstants { public: wxPlConstants( PL_CONST_FUNC function ); ~wxPlConstants(); private: PL_CONST_FUNC m_function; }; // duplicated from helpers.h extern void FUNCPTR( wxPli_add_constant_function ) ( double (**)( const char*, int ) ); extern void FUNCPTR( wxPli_remove_constant_function ) ( double (**)( const char*, int ) ); inline wxPlConstants::wxPlConstants( PL_CONST_FUNC function ) :m_function( function ) { #if NEEDS_PLI_HELPERS_STRUCT() dTHX; // GRR! init helpers... SV* wxpli_tmp = get_sv( "Wx::_exports", 1 ); wxPliHelpers* name = INT2PTR( wxPliHelpers*, SvIV( wxpli_tmp ) ); wxPli_add_constant_function = name->m_wxPli_add_constant_function; #endif wxPli_add_constant_function( &m_function ); } inline wxPlConstants::~wxPlConstants() { wxPli_remove_constant_function( &m_function ); } #endif // _WXPERL_CONSTANTS_H // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/controls.cpp000664000000000000 3330312306612225 13633 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/controls.cpp // Purpose: implementation for controls.h // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: controls.cpp 3340 2012-09-12 03:21:07Z mdootson $ // Copyright: (c) 2000-2008 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/constants.h" // // Wx::ListCtrl implementation // WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliListCtrl, wxListCtrl ); double listctrl_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'E': r( wxEVT_COMMAND_LIST_BEGIN_DRAG ); r( wxEVT_COMMAND_LIST_BEGIN_RDRAG ); r( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT ); r( wxEVT_COMMAND_LIST_CACHE_HINT ); r( wxEVT_COMMAND_LIST_COL_RIGHT_CLICK ); r( wxEVT_COMMAND_LIST_COL_BEGIN_DRAG ); r( wxEVT_COMMAND_LIST_COL_DRAGGING ); r( wxEVT_COMMAND_LIST_COL_END_DRAG ); r( wxEVT_COMMAND_LIST_END_LABEL_EDIT ); r( wxEVT_COMMAND_LIST_DELETE_ITEM ); r( wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS ); #if WXPERL_W_VERSION_LE( 2, 5, 2 ) r( wxEVT_COMMAND_LIST_SET_INFO ); r( wxEVT_COMMAND_LIST_GET_INFO ); #endif r( wxEVT_COMMAND_LIST_ITEM_SELECTED ); r( wxEVT_COMMAND_LIST_ITEM_DESELECTED ); r( wxEVT_COMMAND_LIST_KEY_DOWN ); r( wxEVT_COMMAND_LIST_INSERT_ITEM ); r( wxEVT_COMMAND_LIST_COL_CLICK ); r( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK ); r( wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK ); r( wxEVT_COMMAND_LIST_ITEM_ACTIVATED ); r( wxEVT_COMMAND_LIST_ITEM_FOCUSED ); break; case 'I': r( wxIMAGE_LIST_NORMAL ); // listctrl r( wxIMAGE_LIST_SMALL ); // listctrl r( wxIMAGE_LIST_STATE ); // listctrl break; case 'L': r( wxLIST_AUTOSIZE ); // listctrl r( wxLIST_AUTOSIZE_USEHEADER ); // listctrl r( wxLIST_ALIGN_DEFAULT ); // listctrl r( wxLIST_ALIGN_LEFT ); // listctrl r( wxLIST_ALIGN_TOP ); // listctrl r( wxLIST_ALIGN_SNAP_TO_GRID ); // listctrl r( wxLIST_FIND_UP ); // listctrl r( wxLIST_FIND_DOWN ); // listctrl r( wxLIST_FIND_LEFT ); // listctrl r( wxLIST_FIND_RIGHT ); // listctrl r( wxLIST_FORMAT_LEFT ); // listctrl r( wxLIST_FORMAT_RIGHT ); // listctrl r( wxLIST_FORMAT_CENTRE ); // listctrl r( wxLIST_FORMAT_CENTER ); // listctrl r( wxLIST_HITTEST_ABOVE ); // listctrl r( wxLIST_HITTEST_BELOW ); // listctrl r( wxLIST_HITTEST_NOWHERE ); // listctrl r( wxLIST_HITTEST_ONITEMICON ); // listctrl r( wxLIST_HITTEST_ONITEMLABEL ); // listctrl r( wxLIST_HITTEST_ONITEMRIGHT ); // listctrl r( wxLIST_HITTEST_ONITEMSTATEICON );// listctrl r( wxLIST_HITTEST_TOLEFT ); // listctrl r( wxLIST_HITTEST_TORIGHT ); // listctrl r( wxLIST_HITTEST_ONITEM ); // listctrl #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxLIST_GETSUBITEMRECT_WHOLEITEM ); // listctrl #endif r( wxLIST_MASK_STATE ); // listctrl r( wxLIST_MASK_TEXT ); // listctrl r( wxLIST_MASK_IMAGE ); // listctrl r( wxLIST_MASK_DATA ); // listctrl r( wxLIST_MASK_WIDTH ); // listctrl r( wxLIST_MASK_FORMAT ); // listctrl r( wxLIST_NEXT_ABOVE ); // listctrl r( wxLIST_NEXT_ALL ); // listctrl r( wxLIST_NEXT_BELOW ); // listctrl r( wxLIST_NEXT_LEFT ); // listctrl r( wxLIST_NEXT_RIGHT ); // listctrl r( wxLIST_RECT_BOUNDS ); // listctrl r( wxLIST_RECT_ICON ); // listctrl r( wxLIST_RECT_LABEL ); // listctrl r( wxLIST_STATE_DONTCARE ); // listctrl r( wxLIST_STATE_DROPHILITED ); // listctrl r( wxLIST_STATE_FOCUSED ); // listctrl r( wxLIST_STATE_SELECTED ); // listctrl r( wxLIST_STATE_CUT ); // listctrl r( wxLIST_SET_ITEM ); // listctrl r( wxLC_VRULES ); // listctrl r( wxLC_HRULES ); // listctrl r( wxLC_ICON ); // listctrl r( wxLC_SMALL_ICON ); // listctrl r( wxLC_LIST ); // listctrl r( wxLC_REPORT ); // listctrl r( wxLC_ALIGN_TOP ); // listctrl r( wxLC_ALIGN_LEFT ); // listctrl r( wxLC_AUTOARRANGE ); // listctrl r( wxLC_USER_TEXT ); // listctrl r( wxLC_EDIT_LABELS ); // listctrl r( wxLC_NO_HEADER ); // listctrl r( wxLC_NO_SORT_HEADER ); // listctrl r( wxLC_SINGLE_SEL ); // listctrl r( wxLC_SORT_ASCENDING ); // listctrl r( wxLC_SORT_DESCENDING ); // listctrl r( wxLC_VIRTUAL ); // listctrl break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants listctrl_module( &listctrl_constant ); wxString wxPliListCtrl::OnGetItemText( long item, long column ) const { dTHX; wxPliVirtualCallback* cb = (wxPliVirtualCallback*)&m_callback; if( wxPliVirtualCallback_FindCallback( aTHX_ cb, "OnGetItemText" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ cb, G_SCALAR, "ll", item, column ); wxString val; WXSTRING_INPUT( val, char*, ret ); SvREFCNT_dec( ret ); return val; } return wxListCtrl::OnGetItemText( item, column ); } int wxPliListCtrl::OnGetItemImage( long item ) const { dTHX; wxPliVirtualCallback* cb = (wxPliVirtualCallback*)&m_callback; if( wxPliVirtualCallback_FindCallback( aTHX_ cb, "OnGetItemImage" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ cb, G_SCALAR, "l", item ); int val = SvIV( ret ); SvREFCNT_dec( ret ); return val; } return wxListCtrl::OnGetItemImage( item ); } wxListItemAttr* wxPliListCtrl::OnGetItemAttr( long item ) const { dTHX; wxPliVirtualCallback* cb = (wxPliVirtualCallback*)&m_callback; if( wxPliVirtualCallback_FindCallback( aTHX_ cb, "OnGetItemAttr" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ cb, G_SCALAR, "l", item ); wxListItemAttr* val = (wxListItemAttr*) wxPli_sv_2_object( aTHX_ ret, "Wx::ListItemAttr" ); val = val ? new wxListItemAttr( *val ) : NULL; SvREFCNT_dec( ret ); return val; } return wxListCtrl::OnGetItemAttr( item ); } #if WXPERL_W_VERSION_GE( 2, 7, 2 ) DEF_V_CBACK_INT__LONG_LONG_const( wxPliListCtrl, wxListCtrl, OnGetItemColumnImage ); #endif // // Wx::ListView implementation // WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliListView, wxListView ); wxString wxPliListView::OnGetItemText( long item, long column ) const { dTHX; wxPliVirtualCallback* cb = (wxPliVirtualCallback*)&m_callback; if( wxPliVirtualCallback_FindCallback( aTHX_ cb, "OnGetItemText" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ cb, G_SCALAR, "ll", item, column ); wxString val; WXSTRING_INPUT( val, char*, ret ); SvREFCNT_dec( ret ); return val; } return wxListView::OnGetItemText( item, column ); } int wxPliListView::OnGetItemImage( long item ) const { dTHX; wxPliVirtualCallback* cb = (wxPliVirtualCallback*)&m_callback; if( wxPliVirtualCallback_FindCallback( aTHX_ cb, "OnGetItemImage" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ cb, G_SCALAR, "l", item ); int val = SvIV( ret ); SvREFCNT_dec( ret ); return val; } return wxListView::OnGetItemImage( item ); } wxListItemAttr* wxPliListView::OnGetItemAttr( long item ) const { dTHX; wxPliVirtualCallback* cb = (wxPliVirtualCallback*)&m_callback; if( wxPliVirtualCallback_FindCallback( aTHX_ cb, "OnGetItemAttr" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ cb, G_SCALAR, "l", item ); wxListItemAttr* val = (wxListItemAttr*) wxPli_sv_2_object( aTHX_ ret, "Wx::ListItemAttr" ); val = val ? new wxListItemAttr( *val ) : NULL; SvREFCNT_dec( ret ); return val; } return wxListView::OnGetItemAttr( item ); } #if WXPERL_W_VERSION_GE( 2, 7, 2 ) DEF_V_CBACK_INT__LONG_LONG_const( wxPliListView, wxListView, OnGetItemColumnImage ); #endif // // Wx::TreeCtrl implementation // WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliTreeCtrl, wxTreeCtrl ); double treectrl_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'E': r( wxEVT_COMMAND_TREE_BEGIN_DRAG ); r( wxEVT_COMMAND_TREE_BEGIN_RDRAG ); r( wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT ); r( wxEVT_COMMAND_TREE_END_LABEL_EDIT ); r( wxEVT_COMMAND_TREE_DELETE_ITEM ); r( wxEVT_COMMAND_TREE_GET_INFO ); r( wxEVT_COMMAND_TREE_SET_INFO ); r( wxEVT_COMMAND_TREE_ITEM_EXPANDED ); r( wxEVT_COMMAND_TREE_ITEM_EXPANDING ); r( wxEVT_COMMAND_TREE_ITEM_COLLAPSED ); r( wxEVT_COMMAND_TREE_ITEM_COLLAPSING ); r( wxEVT_COMMAND_TREE_SEL_CHANGED ); r( wxEVT_COMMAND_TREE_SEL_CHANGING ); r( wxEVT_COMMAND_TREE_KEY_DOWN ); r( wxEVT_COMMAND_TREE_ITEM_ACTIVATED ); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxEVT_COMMAND_TREE_ITEM_MENU ); #endif r( wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK ); r( wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK ); r( wxEVT_COMMAND_TREE_END_DRAG ); #if defined(__WXMSW__) r( wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK ); r( wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP ); #endif break; case 'T': r( wxTR_DEFAULT_STYLE ); // treectrl r( wxTR_EDIT_LABELS ); // treectrl #if WXPERL_W_VERSION_LT( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 r( wxTR_EXTENDED ); // treectrl #endif r( wxTR_FULL_ROW_HIGHLIGHT ); // treectrl r( wxTR_HAS_BUTTONS ); // treectrl r( wxTR_HAS_VARIABLE_ROW_HEIGHT ); // treectrl r( wxTR_HIDE_ROOT ); // treectrl r( wxTR_LINES_AT_ROOT ); // treectrl r( wxTR_MULTIPLE ); // treectrl r( wxTR_NO_BUTTONS ); // treectrl r( wxTR_NO_LINES ); // treectrl r( wxTR_ROW_LINES ); // treectrl r( wxTR_SINGLE ); // treectrl r( wxTR_TWIST_BUTTONS ); // treectrl r( wxTreeItemIcon_Normal ); // treectrl r( wxTreeItemIcon_Selected ); // treectrl r( wxTreeItemIcon_Expanded ); // treectrl r( wxTreeItemIcon_SelectedExpanded ); // treectrl r( wxTREE_HITTEST_ABOVE ); // treectrl r( wxTREE_HITTEST_BELOW ); // treectrl r( wxTREE_HITTEST_NOWHERE ); // treectrl r( wxTREE_HITTEST_ONITEMBUTTON ); // treectrl r( wxTREE_HITTEST_ONITEMICON ); // treectrl r( wxTREE_HITTEST_ONITEMINDENT ); // treectrl r( wxTREE_HITTEST_ONITEMLABEL ); // treectrl r( wxTREE_HITTEST_ONITEMRIGHT ); // treectrl r( wxTREE_HITTEST_ONITEMSTATEICON ); // treectrl r( wxTREE_HITTEST_TOLEFT ); // treectrl r( wxTREE_HITTEST_TORIGHT ); // treectrl r( wxTREE_HITTEST_ONITEMUPPERPART ); // treectrl r( wxTREE_HITTEST_ONITEMLOWERPART ); // treectrl r( wxTREE_HITTEST_ONITEM ); // treectrl break; default: break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants tree_module( &treectrl_constant ); int wxPliTreeCtrl::OnCompareItems( const wxTreeItemId& item1, const wxTreeItemId& item2 ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnCompareItems" ) ) { SV* t1 = wxPli_non_object_2_sv( aTHX_ newSViv( 0 ), (void*)&item1, "Wx::TreeItemId" ); SV* t2 = wxPli_non_object_2_sv( aTHX_ newSViv( 0 ), (void*)&item2, "Wx::TreeItemId" ); SV* ret = wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_SCALAR, "SS", t1, t2 ); sv_setiv( SvRV( t1 ), 0 ); sv_setiv( SvRV( t2 ), 0 ); int val = SvIV( ret ); SvREFCNT_dec( ret ); SvREFCNT_dec( t1 ); SvREFCNT_dec( t2 ); return val; } else return wxTreeCtrl::OnCompareItems( item1, item2 ); } // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/controls.h000664000000000000 513612306612226 13264 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/controls.h // Purpose: c++ wrappers for wxControl-derived classes // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: controls.h 3340 2012-09-12 03:21:07Z mdootson $ // Copyright: (c) 2000-2004, 2006 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #ifndef _WXPERL_CONTROLS_H #define _WXPERL_CONTROLS_H class wxPliListCtrl:public wxListCtrl { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliListCtrl ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPliListCtrl, "Wx::ListCtrl", true ); WXPLI_CONSTRUCTOR_7( wxPliListCtrl, "Wx::ListCtrl", true, wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long, const wxValidator&, const wxString& ); wxString OnGetItemText( long item, long column ) const; int OnGetItemImage( long item ) const; wxListItemAttr* OnGetItemAttr( long item ) const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) DEC_V_CBACK_INT__LONG_LONG_const( OnGetItemColumnImage ); #endif }; class wxPliListView:public wxListView { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliListView ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPliListView, "Wx::ListView", true ); WXPLI_CONSTRUCTOR_7( wxPliListView, "Wx::ListView", true, wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long, const wxValidator&, const wxString& ); wxString OnGetItemText( long item, long column ) const; int OnGetItemImage( long item ) const; wxListItemAttr* OnGetItemAttr( long item ) const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) DEC_V_CBACK_INT__LONG_LONG_const( OnGetItemColumnImage ); #endif }; class wxPliTreeCtrl:public wxTreeCtrl { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliTreeCtrl ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPliTreeCtrl, "Wx::TreeCtrl", true ); WXPLI_CONSTRUCTOR_7( wxPliTreeCtrl, "Wx::TreeCtrl", true, wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long, const wxValidator&, const wxString& ); int OnCompareItems( const wxTreeItemId& item1, const wxTreeItemId& item2 ); }; #endif // _WXPERL_CONTROLS_H // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/dialog.h000664000000000000 263212306612225 12655 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/dialog.h // Purpose: c++ wrapper for wxDialog // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: dialog.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2000-2001, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// class wxPliDialog:public wxDialog { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliDialog ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPliDialog, "Wx::Dialog", true ); WXPLI_CONSTRUCTOR_7( wxPliDialog, "Wx::Dialog", true, wxWindow*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, long, const wxString& ); DEC_V_CBACK_BOOL__VOID( TransferDataFromWindow ); DEC_V_CBACK_BOOL__VOID( TransferDataToWindow ); DEC_V_CBACK_BOOL__VOID( Validate ); }; DEF_V_CBACK_BOOL__VOID( wxPliDialog, wxDialog, TransferDataFromWindow ); DEF_V_CBACK_BOOL__VOID( wxPliDialog, wxDialog, TransferDataToWindow ); DEF_V_CBACK_BOOL__VOID( wxPliDialog, wxDialog, Validate ); WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliDialog, wxDialog ); // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/event.h000664000000000000 1354412306612226 12564 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/event.h // Purpose: C++ helpers for user-defined events // Author: Mattia Barbon // Modified by: // Created: 30/03/2002 // RCS-ID: $Id: event.h 2981 2010-10-01 17:50:28Z mdootson $ // Copyright: (c) 2002-2004, 2006-2007, 2009 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include #include "cpp/v_cback.h" class wxPlEvent : public wxEvent { WXPLI_DECLARE_DYNAMIC_CLASS_CTOR( wxPlEvent ); WXPLI_DECLARE_V_CBACK(); // only to appease wxWidgets' RTTI wxPlEvent() : m_callback( NULL ) {} public: wxPlEvent( const char* package, int id, wxEventType eventType ) : wxEvent( id, eventType ), m_callback( "Wx::PlEvent" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } virtual ~wxPlEvent() { m_callback.DeleteSelf( false ); } virtual wxEvent* Clone() const; }; wxEvent* wxPlEvent::Clone() const { dTHX; wxPlEvent* self = (wxPlEvent*)this; // only to appease wxWidgets' RTTI if( !self->m_callback.IsOk() ) return new wxPlEvent(); if( wxPliVirtualCallback_FindCallback( aTHX_ &self->m_callback, "Clone" ) ) { SV* ret = wxPliVirtualCallback_CallCallback ( aTHX_ &self->m_callback, G_SCALAR, NULL ); wxPlEvent* clone = (wxPlEvent*)wxPli_sv_2_object( aTHX_ ret, "Wx::PlEvent" ); return clone; } return 0; } WXPLI_IMPLEMENT_DYNAMIC_CLASS_CTOR( wxPlEvent, wxEvent ); class wxPlCommandEvent : public wxCommandEvent { WXPLI_DECLARE_DYNAMIC_CLASS_CTOR( wxPlCommandEvent ); WXPLI_DECLARE_V_CBACK(); // only to appease wxWidgets' RTTI wxPlCommandEvent() : m_callback( NULL ) {} public: wxPlCommandEvent( const char* package, wxEventType eventType, int id ) : wxCommandEvent( eventType, id ), m_callback( "Wx::PlCommandEvent" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } virtual ~wxPlCommandEvent() { m_callback.DeleteSelf( false ); } virtual wxEvent* Clone() const; }; wxEvent* wxPlCommandEvent::Clone() const { dTHX; wxPlCommandEvent* self = (wxPlCommandEvent*)this; // only to appease wxWidgets' RTTI if( !self->m_callback.IsOk() ) return new wxPlCommandEvent(); if( wxPliVirtualCallback_FindCallback( aTHX_ &self->m_callback, "Clone" ) ) { SV* ret = wxPliVirtualCallback_CallCallback ( aTHX_ &self->m_callback, G_SCALAR, NULL ); wxPlCommandEvent* clone = (wxPlCommandEvent*) wxPli_sv_2_object( aTHX_ ret, "Wx::PlCommandEvent" ); return clone; } return 0; } WXPLI_IMPLEMENT_DYNAMIC_CLASS_CTOR( wxPlCommandEvent, wxCommandEvent ); class wxPlThreadEvent : public wxEvent { WXPLI_DECLARE_DYNAMIC_CLASS_CTOR( wxPlThreadEvent ); public: static void SetStash( SV* hv_ref ) { m_hv = (HV*)SvRV( hv_ref ); } static HV* GetStash() { return m_hv; } wxPlThreadEvent() : m_data( 0 ) {} wxPlThreadEvent( pTHX_ const char* package, int id, wxEventType eventType, SV* data ) : wxEvent( id, eventType ) { PL_lockhook( aTHX_ (SV*)GetStash() ); PL_sharehook( aTHX_ data ); int data_id; char buffer[30]; size_t length; for(;;) { data_id = rand(); length = sprintf( buffer, "%d", data_id ); if( !hv_exists( GetStash(), buffer, length ) ) break; } SV** dst = hv_fetch( GetStash(), buffer, length, 1 ); sv_setsv( *dst, data ); mg_set( *dst ); m_data = data_id; } wxPlThreadEvent( const wxPlThreadEvent& e ) : wxEvent( e ), m_data( e.m_data ) { } ~wxPlThreadEvent() { if( !m_data ) return; dTHX; ENTER; SAVETMPS; PL_lockhook( aTHX_ (SV*)m_hv ); char buffer[30]; size_t length = sprintf( buffer, "%d", m_data ); hv_delete( m_hv, buffer, length, G_DISCARD ); FREETMPS; LEAVE; } int _GetData() const { return m_data; } SV* GetData() const { dTHX; if( !m_data ) return &PL_sv_undef; PL_lockhook( aTHX_ (SV*)m_hv ); char buffer[30]; size_t length = sprintf( buffer, "%d", m_data ); SV** value = hv_fetch( m_hv, buffer, length, 0 ); if( !value ) return NULL; mg_get( *value ); SvREFCNT_inc( *value ); return *value; } virtual wxEvent* Clone() const; private: int m_data; static HV* m_hv; }; wxEvent* wxPlThreadEvent::Clone() const { wxEvent* clone = new wxPlThreadEvent( *this ); ((wxPlThreadEvent*)this)->m_data = 0; return clone; } HV* wxPlThreadEvent::m_hv = NULL; wxPliSelfRef* wxPliGetSelfForwxPlThreadEvent( wxObject* object ) { return 0; } // XXX HACK! #if wxUSE_EXTENDED_RTTI const wxClassInfo* wxPlThreadEvent::ms_classParents[] = { &wxEvent::ms_classInfo , NULL }; wxPliClassInfo wxPlThreadEvent::ms_classInfo( ms_classParents, (wxChar*)wxT( "wxPlPlThreadEvent"), (int)sizeof(wxPlThreadEvent), wxPlThreadEvent::wxCreateObject, (wxPliGetCallbackObjectFn) wxPliGetSelfForwxPlThreadEvent ); #else wxPliClassInfo wxPlThreadEvent::ms_classInfo( (wxChar*)wxT( "wxPlPlThreadEvent"), &wxEvent::ms_classInfo, NULL, (int)sizeof(wxPlThreadEvent), wxPlThreadEvent::wxCreateObject, (wxPliGetCallbackObjectFn) wxPliGetSelfForwxPlThreadEvent ); #endif wxObject* wxPlThreadEvent::wxCreateObject() { return new wxPlThreadEvent(); } // local variables: // // mode: c++ // // end: // Wx-0.9923/cpp/e_cback.cpp000664000000000000 555212306612226 13325 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/e_cback.cpp // Purpose: implementation for e_cback.h // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: e_cback.cpp 3374 2012-09-26 11:37:03Z mdootson $ // Copyright: (c) 2000-2002, 2004-2008 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// wxPliEventCallback::wxPliEventCallback( SV* method, SV* self ) { dTHX; m_method = method; SvREFCNT_inc( m_method ); m_self = self; SvREFCNT_inc( m_self ); m_is_method = !SvROK( m_method ) || !SvRV( m_method ); } wxPliEventCallback::~wxPliEventCallback() { dTHX; SvREFCNT_dec( m_method ); SvREFCNT_dec( m_self ); } void wxPliEventCallback::Handler( wxEvent& event ) { wxPliEventCallback* This = (wxPliEventCallback*) event.m_callbackUserData; dTHX; dSP; ENTER; SAVETMPS; { // similar to wxPli_object_2_sv wxPliGuard guard; SV* e = 0; SV* rv = 0; wxClassInfo *ci = event.GetClassInfo(); const wxChar* classname = ci->GetClassName(); #if wxUSE_UNICODE if( wcsncmp( classname, wxT("wxPl"), 4 ) == 0 ) #else if( strnEQ( classname, "wxPl", 4 ) ) #endif { wxPliClassInfo* cci = (wxPliClassInfo*)ci; wxPliSelfRef* sr = cci->m_func( &event ); if( sr ) { // this needs to have the refcount incremented, otherwise // the refcount will be decremented one time too much when // exiting from the handler e = sv_2mortal( newRV_inc( SvRV( sr->m_self ) ) ); } } if( !e ) { char buffer[WXPL_BUF_SIZE]; const char* CLASS = wxPli_cpp_class_2_perl( classname, buffer ); e = sv_newmortal(); sv_setref_pv( e, CHAR_P CLASS, &event ); rv = SvRV( e ); // corner case: prevent destruction if referrer is // destroyed SvREFCNT_inc( rv ); sv_2mortal( rv ); guard.SetSV( rv ); wxPli_thread_sv_register( aTHX_ CLASS, &event, e ); } PUSHMARK( SP ); XPUSHs( This->m_self ); XPUSHs( e ); PUTBACK; if( This->m_is_method ) { call_method( SvPV_nolen( This->m_method ), G_EVAL|G_VOID|G_DISCARD ); } else { call_sv( This->m_method, G_EVAL|G_VOID|G_DISCARD ); } SPAGAIN; } if( SvTRUE( ERRSV ) ) { croak( Nullch ); } PUTBACK; FREETMPS; LEAVE; } // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/e_cback.h000664000000000000 313112306612226 12761 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/e_cback.h // Purpose: callback helper class for events // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: e_cback.h 3374 2012-09-26 11:37:03Z mdootson $ // Copyright: (c) 2000-2001, 2005, 2008 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #ifndef _WXPERL_E_CBACK_H #define _WXPERL_E_CBACK_H #if WXPERL_W_VERSION_GE( 2, 5, 4 ) typedef void (wxObject::* wxPliObjectEventFunction)(wxEvent&); #define wxPliCastEvtHandler( e ) \ ((wxObjectEventFunction)(wxPliObjectEventFunction) e) #else #define wxPliCastEvtHandler( e ) \ ((wxObjectEventFunction) e) #endif class wxPliGuard { public: wxPliGuard() { m_sv = NULL; } ~wxPliGuard() { if( m_sv ) { dTHX; wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ m_sv ), (void*)SvIV( m_sv ), m_sv ); sv_setiv( m_sv, 0 ); } } void SetSV( SV* sv ) { m_sv = sv; } private: SV* m_sv; }; class wxPliEventCallback : public wxObject { public: wxPliEventCallback( SV* method, SV* self ); ~wxPliEventCallback(); void Handler( wxEvent& event ); private: bool m_is_method; SV* m_method; SV* m_self; }; #endif // _WXPERL_E_CBACK_H // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/frame.h000664000000000000 516112306612225 12510 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/frame.h // Purpose: c++ wrapper for wxFrame // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: frame.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2000-2002, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// class wxPliFrame:public wxFrame { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliFrame ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPliFrame, "Wx::Frame", true ); WXPLI_CONSTRUCTOR_7( wxPliFrame, "Wx::Frame", true, wxWindow*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, long, const wxString& ); virtual wxStatusBar* OnCreateStatusBar( int, long, wxWindowID, const wxString& ); virtual wxToolBar* OnCreateToolBar( long, wxWindowID, const wxString& ); }; inline wxStatusBar* wxPliFrame::OnCreateStatusBar( int number, long style, wxWindowID id, const wxString& name ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnCreateStatusBar" ) ) { SV* ret = wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_SCALAR, "illP", number, style, id, &name ); wxStatusBar* retval = (wxStatusBar*)wxPli_sv_2_object( aTHX_ ret, "Wx::StatusBar" ); SvREFCNT_dec( ret ); return retval; } else return wxFrame::OnCreateStatusBar( number, style, id, name ); } inline wxToolBar* wxPliFrame::OnCreateToolBar( long style, wxWindowID id, const wxString& name ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnCreateToolBar" ) ) { SV* ret = wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_SCALAR, "llP", style, id, &name ); wxToolBar* retval = (wxToolBar*)wxPli_sv_2_object( aTHX_ ret, "Wx::ToolBar" ); SvREFCNT_dec( ret ); return retval; } else return wxFrame::OnCreateToolBar( style, id, name ); } WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliFrame, wxFrame ); // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/helpers.cpp000664000000000000 11454712306612225 13464 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/helpers.cpp // Purpose: implementation for helpers.h // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: helpers.cpp 3397 2012-09-30 02:26:07Z mdootson $ // Copyright: (c) 2000-2011 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include #include "cpp/streams.h" #include "cpp/streams.cpp" #include "cpp/array_helpers.h" #if WXPERL_W_VERSION_GE( 2, 5, 1 ) #include #endif #if WXPERL_W_VERSION_GE( 2, 6, 0 ) #include #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) #include #endif // All code that uses wxPL_USE_MAGIC has been removed // but leave definition in case somehow some external // module contrives to use this #define wxPL_USE_MAGIC 1 // ---------------------------------------------------------------------------- // wxMSW DLL intialisation // ---------------------------------------------------------------------------- #ifdef __WXMSW__ extern "C" BOOL WINAPI DllMain( HANDLE hModule, DWORD fdwReason, LPVOID lpReserved ) { if( fdwReason == DLL_PROCESS_ATTACH && !wxGetInstance() ) wxSetInstance( (HINSTANCE)hModule ); return TRUE; } #endif // ---------------------------------------------------------------------------- // Utility functions for working with MAGIC // ---------------------------------------------------------------------------- struct my_magic { my_magic() : object( NULL ), deleteable( true ) { } void* object; bool deleteable; }; #if WXPERL_P_VERSION_GE( 5, 14, 0 ) STATIC MGVTBL my_vtbl = { 0, 0, 0, 0, 0, 0, 0, 0 }; #endif my_magic* wxPli_get_magic( pTHX_ SV* rv ) { // check for reference if( !SvROK( rv ) ) return NULL; SV* ref = SvRV( rv ); // if it isn't a SvPVMG, then it can't have MAGIC // so it is deleteable if( !ref || SvTYPE( ref ) < SVt_PVMG ) return NULL; // search for '~' / PERL_MAGIC_ext magic, and check the value #if WXPERL_P_VERSION_GE( 5, 14, 0 ) MAGIC* magic = mg_findext( ref, PERL_MAGIC_ext, &my_vtbl ); #else MAGIC* magic = mg_find( ref, '~' ); #endif if( !magic ) return NULL; return (my_magic*)magic->mg_ptr; } my_magic* wxPli_get_or_create_magic( pTHX_ SV* rv ) { // check for reference if( !SvROK( rv ) ) croak( "PANIC: object is not a reference" ); SV* ref = SvRV( rv ); // must be at least a PVMG if( SvTYPE( ref ) < SVt_PVMG ) SvUPGRADE( ref, SVt_PVMG ); // search for '~' magic, and check the value MAGIC* magic; #if WXPERL_P_VERSION_GE( 5, 14, 0 ) while( !( magic = mg_findext( ref, PERL_MAGIC_ext, &my_vtbl ) ) ) #else while( !( magic = mg_find( ref, '~' ) ) ) #endif { my_magic tmp; #if WXPERL_P_VERSION_GE( 5, 14, 0 ) sv_magicext( ref, NULL, PERL_MAGIC_ext, &my_vtbl, (char*)&tmp, sizeof( tmp ) ); #else sv_magic( ref, NULL, '~', (char*)&tmp, sizeof( tmp ) ); #endif } return (my_magic*)magic->mg_ptr; } // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- void wxPliSelfRef::DeleteSelf( bool fromDestroy ) { if( !m_self ) return; dTHX; SV* self = m_self; m_self = NULL; wxPli_detach_object( aTHX_ self ); if( SvROK( self ) ) { if( fromDestroy ) { SvROK_off( self ); SvRV( self ) = NULL; } if( SvREFCNT( self ) > 0 ) SvREFCNT_dec( self ); } } #if WXPERL_W_VERSION_GE( 2, 9, 0 ) int wxCALLBACK ListCtrlCompareFn( long item1, long item2, wxIntPtr comparefn ) #else int wxCALLBACK ListCtrlCompareFn( long item1, long item2, long comparefn ) #endif { dTHX; dSP; SV* func = (SV*)comparefn; ENTER; SAVETMPS; PUSHMARK( SP ); XPUSHs( sv_2mortal( newSViv( item1 ) ) ); XPUSHs( sv_2mortal( newSViv( item2 ) ) ); PUTBACK; int count = call_sv( (SV*)func, G_SCALAR ); SPAGAIN; int retval = POPi; PUTBACK; FREETMPS; LEAVE; if( count != 1 ) { croak( "Comparison function returned %d values ( 1 expected )", count ); } return retval; } const char* wxPli_cpp_class_2_perl( const wxChar* className, char buffer[WXPL_BUF_SIZE] ) { strcpy( buffer, "Wx::" ); if( className[0] == wxT('w') && className[1] == wxT('x') ) className += 2; if( className[0] == wxT('P') && className[1] == wxT('l') ) { if( className[2] == wxT('i') ) className += 3; else className += 2; } #if wxUSE_UNICODE wxConvUTF8.WC2MB( buffer+4, className, WXPL_BUF_SIZE - 8 ); #else strcpy( buffer+4, className ); #endif return buffer; } void wxPli_push_arguments( pTHX_ SV*** psp, const char* argtypes, ... ) { va_list arglist; va_start( arglist, argtypes ); wxPli_push_args( aTHX_ psp, argtypes, arglist ); va_end( arglist ); } void wxPli_delayed_delete( pTHX_ SV* sv ) { wxPli_detach_object( aTHX_ sv ); SvREFCNT_dec( sv ); } void wxPli_push_args( pTHX_ SV*** psp, const char* argtypes, va_list& args ) { SV** sp = *psp; #if WXPERL_P_VERSION_GE( 5, 5, 0 ) dTHR; #endif if( argtypes == 0 ) return; bool bval; IV ival; UV uval; long lval; unsigned long ulval; char* stval; wxChar* wstval; SV* svval; wxObject* oval; void* pval; wxString* wxsval; const char* package; double dval; while( *argtypes ) { switch( *argtypes ) { case 'b': bval = va_arg( args, int ); XPUSHs( bval ? &PL_sv_yes : &PL_sv_no ); break; case 'i': ival = va_arg( args, int ); XPUSHs( sv_2mortal( newSViv( ival ) ) ); break; case 'I': uval = va_arg( args, unsigned int ); XPUSHs( sv_2mortal( newSVuv( uval ) ) ); break; case 'l': lval = va_arg( args, long ); XPUSHs( sv_2mortal( newSViv( lval ) ) ); break; case 'L': ulval = va_arg( args, unsigned long ); XPUSHs( sv_2mortal( newSVuv( ulval ) ) ); break; case 'd': dval = va_arg( args, double ); XPUSHs( sv_2mortal( newSVnv( dval ) ) ); break; case 'p': stval = va_arg( args, char* ); XPUSHs( sv_2mortal( newSVpv( stval, 0 ) ) ); break; case 'P': { wxsval = va_arg( args, wxString* ); SV* sv = sv_newmortal(); wxPli_wxString_2_sv( aTHX_ *wxsval, sv ); XPUSHs( sv ); break; } case 'w': { wstval = va_arg( args, wxChar* ); SV* sv = sv_newmortal(); wxPli_wxChar_2_sv( aTHX_ wstval, sv ); XPUSHs( sv ); break; } case 'S': svval = va_arg( args, SV* ); XPUSHs( sv_2mortal( newSVsv( svval ) ) ); break; case 's': svval = va_arg( args, SV* ); XPUSHs( svval ); break; case 'O': case 'Q': { oval = va_arg( args, wxObject* ); SV* sv = wxPli_object_2_sv( aTHX_ newSViv( 0 ), oval ); if( *argtypes == 'Q' ) { SvREFCNT_inc( sv ); SAVEDESTRUCTOR_X( wxPli_delayed_delete, sv ); } XPUSHs( sv_2mortal( sv ) ); break; } case 'o': case 'q': { pval = va_arg( args, void* ); package = va_arg( args, const char* ); SV * sv = wxPli_non_object_2_sv( aTHX_ newSViv( 0 ), pval, package ); if( *argtypes == 'q' ) { SvREFCNT_inc( sv ); SAVEDESTRUCTOR_X( wxPli_delayed_delete, sv ); } XPUSHs( sv_2mortal( sv ) ); break; } default: croak( "Internal error: unrecognized type '%c'\n", *argtypes ); } ++argtypes; } *psp = sp; } // gets 'this' pointer from a blessed scalar/hash reference void* wxPli_sv_2_object( pTHX_ SV* scalar, const char* classname ) { // is it correct to use undef as 'NULL'? if( !SvOK( scalar ) ) { return NULL; } if( !SvROK( scalar ) ) croak( "variable is not an object: it must have type %s", classname ); if( !classname || sv_derived_from( scalar, CHAR_P classname ) ) { SV* ref = SvRV( scalar ); my_magic* mg = wxPli_get_magic( aTHX_ scalar ); // rationale: if this is an hash-ish object, it always // has both mg and mg->object; if however this is a // scalar-ish object that has been marked/unmarked deletable // it has mg, but not mg->object if( !mg || !mg->object ) return INT2PTR( void*, SvOK( ref ) ? SvIV( ref ) : 0 ); return mg->object; } else { croak( "variable is not of type %s", classname ); return NULL; // dummy, for compiler } } SV* wxPli_non_object_2_sv( pTHX_ SV* var, const void* data, const char* package ) { if( data == NULL ) { sv_setsv( var, &PL_sv_undef ); } else { sv_setref_pv( var, CHAR_P package, const_cast(data) ); } return var; } SV* wxPli_clientdatacontainer_2_sv( pTHX_ SV* var, wxClientDataContainer* cdc, const char* klass ) { if( cdc == NULL ) { sv_setsv( var, &PL_sv_undef ); return var; } wxPliUserDataCD* clientData = (wxPliUserDataCD*) cdc->GetClientObject(); if( clientData != NULL ) { SvSetSV_nosteal( var, clientData->GetData() ); return var; } return wxPli_non_object_2_sv( aTHX_ var, cdc, klass ); } SV* wxPli_object_2_scalarsv( pTHX_ SV* var, const wxObject* object ) { wxClassInfo *ci = object->GetClassInfo(); const wxChar* classname = ci->GetClassName(); char buffer[WXPL_BUF_SIZE]; const char* CLASS = wxPli_cpp_class_2_perl( classname, buffer ); if( strcmp( CLASS, "Wx::Object" ) == 0 ) { warn( "Missing wxRTTI information, using Wx::Object as class" ); } sv_setref_pv( var, CHAR_P CLASS, const_cast(object) ); return var; } SV* wxPli_evthandler_2_sv( pTHX_ SV* var, wxEvtHandler* cdc ) { if( cdc == NULL ) { sv_setsv( var, &PL_sv_undef ); return var; } wxPliUserDataCD* clientData = (wxPliUserDataCD*)cdc->GetClientObject(); if( clientData ) { SvSetSV_nosteal( var, clientData->GetData() ); return var; } // fallback - return a scalarish object return wxPli_object_2_scalarsv( aTHX_ var, (wxObject*)cdc ); } SV* wxPli_object_2_sv( pTHX_ SV* var, const wxObject* object ) { return wxPli_namedobject_2_sv( aTHX_ var, object, NULL); /* if( object == NULL ) { sv_setsv( var, &PL_sv_undef ); return var; } wxEvtHandler* evtHandler = wxDynamicCast( object, wxEvtHandler ); if( evtHandler && evtHandler->GetClientObject() ) return wxPli_evthandler_2_sv( aTHX_ var, evtHandler ); wxPliSelfRef* sr = wxPli_get_selfref( aTHX_ const_cast(object), false ); if( sr && sr->m_self ) { SvSetSV_nosteal( var, sr->m_self ); return var; } // fallback - return a scalarish object return wxPli_object_2_scalarsv( aTHX_ var, object ); */ } SV* wxPli_namedobject_2_sv( pTHX_ SV* var, const wxObject* object, const char* package ) { if( object == NULL ) { sv_setsv( var, &PL_sv_undef ); return var; } wxEvtHandler* evtHandler = wxDynamicCast( object, wxEvtHandler ); if( evtHandler && evtHandler->GetClientObject() ) return wxPli_evthandler_2_sv( aTHX_ var, evtHandler ); wxPliSelfRef* sr = wxPli_get_selfref( aTHX_ const_cast(object), false ); if( sr && sr->m_self ) { SvSetSV_nosteal( var, sr->m_self ); return var; } // We may name the package if the wxWidgets implementation fails to // implement classinfo and calling classinfo will therefore give // us a base class name rather than this class name if( package ) { sv_setref_pv( var, CHAR_P package, const_cast(object) ); return var; } // fallback - return a scalarish object using classinfo return wxPli_object_2_scalarsv( aTHX_ var, object ); } wxPliSelfRef* wxPli_get_selfref( pTHX_ wxObject* object, bool forcevirtual ) { wxPliSelfRef* sr = NULL; wxClassInfo *ci = object->GetClassInfo(); if( forcevirtual ) { wxPliClassInfo* cci = (wxPliClassInfo*)ci; sr = cci->m_func( object ); return sr; } const wxChar* classname = ci->GetClassName(); #if wxUSE_UNICODE if( wcsncmp( classname, wxT("wxPl"), 4 ) == 0 ) #else if( strnEQ( classname, "wxPl", 4 ) ) #endif { wxPliClassInfo* cci = (wxPliClassInfo*)ci; sr = cci->m_func( object ); } return sr; } void wxPli_attach_object( pTHX_ SV* object, void* ptr ) { SV* ref = SvRV( object ); if( SvTYPE( ref ) >= SVt_PVHV ) { my_magic* mg = wxPli_get_or_create_magic( aTHX_ object ); mg->object = ptr; } else { sv_setiv( ref, PTR2IV( ptr ) ); } } void* wxPli_detach_object( pTHX_ SV* object ) { if( !SvROK( object ) ) return NULL; SV* ref = SvRV( object ); if( SvTYPE( ref ) >= SVt_PVHV ) { my_magic* mg = wxPli_get_magic( aTHX_ object ); if( mg ) { void* tmp = mg->object; mg->object = NULL; return tmp; } return NULL; } else { void* tmp = INT2PTR( void*, SvIV( ref ) ); sv_setiv( ref, 0 ); return tmp; } } /* SV* wxPli_create_clientdatacontainer( pTHX_ wxClientDataContainer* object, const char* classname ) { SV* sv = wxPli_make_object( object, classname ); wxPliUserDataCD* clientData = new wxPliUserDataCD( sv ); object->SetClientObject( clientData ); return sv; } */ SV* wxPli_create_evthandler( pTHX_ wxEvtHandler* object, const char* classname ) { return wxPli_create_virtual_evthandler( aTHX_ object, classname, false ); } SV* wxPli_create_virtual_evthandler( pTHX_ wxEvtHandler* object, const char* classname, bool forcevirtual ) { SV* sv = NULL; wxPliUserDataCD* clientData = NULL; wxPliSelfRef* sr = wxPli_get_selfref( aTHX_ (wxObject*)object, forcevirtual ); if( sr && sr->m_self ) { sv = sv_2mortal( newRV_inc( SvRV( sr->m_self ) ) ); SvREFCNT_dec( sr->m_self ); clientData = new wxPliUserDataCD( sv ); sr->SetSelf(clientData->GetData(), true); } if( sv == NULL ) { sv = wxPli_make_object( object, classname ); clientData = new wxPliUserDataCD( sv ); } object->SetClientObject( clientData ); return sv; } SV* wxPli_make_object( void* object, const char* classname ) { dTHX; SV* ret; HV* hv; HV* stash = gv_stashpv( CHAR_P classname, 0 ); hv = newHV(); ret = newRV_noinc( (SV*) hv ); // OK: if you want to keep it, just use SetSelf( sv, true ); sv_2mortal( ret ); wxPli_attach_object( aTHX_ ret, object ); return sv_bless( ret, stash ); } bool wxPli_object_is_deleteable( pTHX_ SV* object ) { my_magic* mg = wxPli_get_magic( aTHX_ object ); return mg ? mg->deleteable : SvRV( object ) ? true : false; } void wxPli_object_set_deleteable( pTHX_ SV* object, bool deleteable ) { // check for reference if( !SvROK( object ) ) return; SV* rv = SvRV( object ); // non-PVMG are always deletable if( deleteable && SvTYPE( rv ) < SVt_PVMG ) return; my_magic* mg = wxPli_get_or_create_magic( aTHX_ object ); mg->deleteable = deleteable; } void wxPli_stringarray_push( pTHX_ const wxArrayString& strings ) { dSP; size_t mx = strings.GetCount(); EXTEND( SP, int(mx) ); for( size_t i = 0; i < mx; ++i ) { #if wxUSE_UNICODE SV* tmp = sv_2mortal( newSVpv( strings[i].mb_str(wxConvUTF8), 0 ) ); SvUTF8_on( tmp ); PUSHs( tmp ); #else PUSHs( sv_2mortal( newSVpvn( CHAR_P strings[i].c_str(), strings[i].size() ) ) ); #endif } PUTBACK; } void wxPli_intarray_push( pTHX_ const wxArrayInt& ints ) { dSP; size_t mx = ints.GetCount(); EXTEND( SP, int(mx) ); for( size_t i = 0; i < mx; ++i ) { PUSHs( sv_2mortal( newSViv( ints[i] ) ) ); } PUTBACK; } #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void wxPli_doublearray_push( pTHX_ const wxArrayDouble& doubles ) { dSP; size_t mx = doubles.GetCount(); EXTEND( SP, int(mx) ); for( size_t i = 0; i < mx; ++i ) { PUSHs( sv_2mortal( newSVnv( doubles[i] ) ) ); } PUTBACK; } #endif void wxPli_objlist_push( pTHX_ const wxList& objs ) { dSP; wxList::compatibility_iterator node; EXTEND( SP, objs.GetCount() ); for( node = objs.GetFirst(); node; node = node->GetNext() ) { SV* tmp = wxPli_object_2_sv( aTHX_ sv_newmortal(), node->GetData() ); PUSHs( tmp ); } PUTBACK; } AV* wxPli_objlist_2_av( pTHX_ const wxList& objs ) { AV* av = newAV(); size_t i; wxList::compatibility_iterator node; av_extend( av, objs.GetCount() ); for( node = objs.GetFirst(), i = 0; node; ++i, node = node->GetNext() ) { SV* tmp = wxPli_object_2_sv( aTHX_ sv_newmortal(), node->GetData() ); SvREFCNT_inc( tmp ); av_store( av, i, tmp ); } return av; } AV* wxPli_stringarray_2_av( pTHX_ const wxArrayString& strings ) { AV* av = newAV(); size_t i, n = strings.GetCount(); SV* tmp; av_extend( av, n ); for( i = 0; i < n; ++i ) { #if wxUSE_UNICODE tmp = newSVpv( strings[i].mb_str(wxConvUTF8), 0 ); SvUTF8_on( tmp ); #else tmp = newSVpv( CHAR_P strings[i].c_str(), 0 ); #endif av_store( av, i, tmp ); } return av; } AV* wxPli_uchararray_2_av( pTHX_ const unsigned char* array, int count ) { AV* av = newAV(); av_extend( av, count ); for( int i = 0; i < count; ++i ) { av_store( av, i, newSViv( array[i] ) ); } return av; } int wxPli_av_2_svarray( pTHX_ SV* avref, SV*** array ) { return wxPli_av_2_arrayany( aTHX_ avref, array, wxPli_convert_sv(), wxPli_array_allocator() ); } class convert_udatacd { public: bool operator()( pTHX_ wxPliUserDataCD*& dest, SV* src ) const { dest = SvOK( src ) ? new wxPliUserDataCD( src ) : NULL; return true; } }; int wxPli_av_2_userdatacdarray( pTHX_ SV* avref, wxPliUserDataCD*** array ) { return wxPli_av_2_arrayany( aTHX_ avref, array, convert_udatacd(), wxPli_array_allocator() ); } int wxPli_av_2_uchararray( pTHX_ SV* avref, unsigned char** array ) { return wxPli_av_2_arrayany( aTHX_ avref, array, wxPli_convert_uchar(), wxPli_array_allocator() ); } int wxPli_av_2_intarray( pTHX_ SV* avref, int** array ) { return wxPli_av_2_arrayany( aTHX_ avref, array, wxPli_convert_int(), wxPli_array_allocator() ); } #include #include wxWindowID wxPli_get_wxwindowid( pTHX_ SV* var ) { if( sv_isobject( var ) ) { if( sv_derived_from( var, "Wx::Window" ) ) { wxWindow* window = (wxWindow*) wxPli_sv_2_object( aTHX_ var, "Wx::Window" ); return window->GetId(); } else if( sv_derived_from( var, "Wx::MenuItem" ) ) { wxMenuItem* item = (wxMenuItem*) wxPli_sv_2_object( aTHX_ var, "Wx::MenuItem" ); return item->GetId(); } else if( sv_derived_from( var, "Wx::Timer" ) ) { wxTimer* timer = (wxTimer*) wxPli_sv_2_object( aTHX_ var, "Wx::Timer" ); return timer->GetId(); } } return SvIV( var ); } int wxPli_av_2_stringarray( pTHX_ SV* avref, wxString** array ) { return wxPli_av_2_arrayany( aTHX_ avref, array, wxPli_convert_wxstring(), wxPli_array_allocator() ); } int wxPli_av_2_arraystring( pTHX_ SV* avref, wxArrayString* array ) { return wxPli_av_2_arrayany( aTHX_ avref, array, wxPli_convert_wxstring(), wxPli_wxarray_allocator( array ) ); } int wxPli_av_2_arrayint( pTHX_ SV* avref, wxArrayInt* array ) { return wxPli_av_2_arrayany( aTHX_ avref, array, wxPli_convert_int(), wxPli_wxarray_allocator( array ) ); } const wxChar wxPliEmptyString[] = wxT(""); #if wxUSE_UNICODE wxChar* my_strdup( const wxChar* s, size_t len ) { wxChar* t = (wxChar*)malloc( (len + 1) * sizeof(wxChar) ); t[len] = 0; memcpy( t, s, len * sizeof(wxChar) ); return t; } #endif char* my_strdup( const char* s, size_t len ) { char* t = (char*)malloc( len + 1 ); t[len] = 0; memcpy( t, s, len ); return t; } class convert_charp { public: bool operator()( pTHX_ char*& dest, SV* src ) const { STRLEN len; char* t = SvPV( src, len ); dest = my_strdup( t, len ); return true; } }; int wxPli_av_2_charparray( pTHX_ SV* avref, char*** array ) { return wxPli_av_2_arrayany( aTHX_ avref, array, convert_charp(), wxPli_array_allocator() ); } class convert_wxcharp { public: bool operator()( pTHX_ wxChar*& dest, SV* src ) const { wxString str; WXSTRING_INPUT( str, wxString, src ); dest = my_strdup( (const wxChar*)str.c_str(), str.length() ); return true; } }; int wxPli_av_2_wxcharparray( pTHX_ SV* avref, wxChar*** array ) { return wxPli_av_2_arrayany( aTHX_ avref, array, convert_wxcharp(), wxPli_array_allocator() ); } #if wxUSE_UNICODE static wxChar* wxPli_copy_string( SV* scalar, wxChar** ) { dTHX; STRLEN length; wxWCharBuffer tmp = ( SvUTF8( scalar ) ) ? wxConvUTF8.cMB2WX( SvPVutf8( scalar, length ) ) : wxWCharBuffer( wxString( SvPV( scalar, length ), wxConvLocal ).wc_str() ); wxChar* buffer = new wxChar[length + 1]; memcpy( buffer, tmp.data(), length * sizeof(wxChar) ); buffer[length] = wxT('\0'); return buffer; } #endif static char* wxPli_copy_string( SV* scalar, char** ) { dTHX; STRLEN length; const char* tmp = SvPV( scalar, length ); char* buffer = new char[length + 1]; memcpy( buffer, tmp, length * sizeof(char) ); buffer[length] = 0; return buffer; } void wxPli_delete_argv( void*** argv, bool unicode ) { #if wxUSE_UNICODE if( unicode ) { wxChar** arg = *(wxChar***)argv; if( arg != NULL ) for( wxChar** i = arg; *i; ++i ) delete[] *i; delete[] arg; *(wxChar***)argv = NULL; } else { #endif char** arg = *(char***)argv; if( arg != NULL ) for( char** i = arg; *i; ++i ) delete[] *i; delete[] arg; *(char***)argv = NULL; #if wxUSE_UNICODE } #endif } int wxPli_get_args_argc_argv( void*** argvp, bool unicode ) { dTHX; #if wxUSE_UNICODE wxChar** argv_w; #endif char ** argv_a; AV* args = get_av( "main::ARGV" , 0 ); SV* progname = get_sv( "main::0", 0 ); int arg_num = args ? av_len( args ) + 1 : 0; I32 argc = arg_num + 1; I32 i; if( !progname ) progname = &PL_sv_undef; #if wxUSE_UNICODE if( unicode ) { argv_w = new wxChar*[ arg_num + 2 ]; argv_w[argc] = 0; argv_w[0] = wxPli_copy_string( progname, argv_w ); for( i = 0; i < arg_num; ++i ) { argv_w[i + 1] = wxPli_copy_string( *av_fetch( args, i, 0 ), argv_w ); } *(wxChar***)argvp = argv_w; } else { #endif argv_a = new char*[ arg_num + 2 ]; argv_a[argc] = 0; argv_a[0] = wxPli_copy_string( progname, argv_a ); for( i = 0; i < arg_num; ++i ) { argv_a[i + 1] = wxPli_copy_string( *av_fetch( args, i, 0 ), argv_a ); } *(char***)argvp = argv_a; #if wxUSE_UNICODE } #endif return argc; } const char* wxPli_get_class( pTHX_ SV* ref ) { const char* ret; if( sv_isobject( ref ) ) { ret = HvNAME( SvSTASH( SvRV( ref ) ) ); } else { ret = SvPV_nolen( ref ); } return ret; } template R wxPli_sv_2_wxpoint_test( pTHX_ SV* scalar, const F& convertf, const char* klass, bool* ispoint ) { static R dummy; if( ispoint ) *ispoint = true; if( SvROK( scalar ) ) { SV* ref = SvRV( scalar ); if( sv_derived_from( scalar, CHAR_P klass ) ) { return *INT2PTR( R*, SvIV( ref ) ); } else if( SvTYPE( ref ) == SVt_PVAV ) { AV* av = (AV*) ref; if( av_len( av ) != 1 ) { if( ispoint ) { *ispoint = false; return dummy; } else { croak( "the array reference must have 2 elements" ); } } else { E x, y; convertf( aTHX_ x, *av_fetch( av, 0, 0 ) ); convertf( aTHX_ y, *av_fetch( av, 1, 0 ) ); return R( x, y ); } } } if( ispoint ) { *ispoint = false; return dummy; } else { croak( "variable is not of type Wx::Point" ); } return dummy; } wxPoint wxPli_sv_2_wxpoint_test( pTHX_ SV* scalar, bool* ispoint ) { return wxPli_sv_2_wxpoint_test ( aTHX_ scalar, wxPli_convert_int(), "Wx::Point", ispoint ); } wxPoint wxPli_sv_2_wxpoint( pTHX_ SV* scalar ) { return wxPli_sv_2_wxpoint_test ( aTHX_ scalar, wxPli_convert_int(), "Wx::Point", 0 ); } template inline T wxPli_sv_2_wxthing( pTHX_ SV* scalar, const char* name ) { if( SvROK( scalar ) ) { SV* ref = SvRV( scalar ); if( sv_derived_from( scalar, CHAR_P name ) ) return *INT2PTR( T*, SvIV( ref ) ); else if( SvTYPE( ref ) == SVt_PVAV ) { AV* av = (AV*) ref; if( av_len( av ) != 1 ) croak( "the array reference must have 2 elements" ); else return T( SvIV( *av_fetch( av, 0, 0 ) ), SvIV( *av_fetch( av, 1, 0 ) ) ); } } croak( "variable is not of type %s", name ); return T(); // to appease the compilers } wxSize wxPli_sv_2_wxsize( pTHX_ SV* scalar ) { return wxPli_sv_2_wxthing( aTHX_ scalar, "Wx::Size" ); } #if WXPERL_W_VERSION_GE( 2, 6, 0 ) wxGBPosition wxPli_sv_2_wxgbposition( pTHX_ SV* scalar ) { return wxPli_sv_2_wxthing( aTHX_ scalar, "Wx::GBPosition" ); } wxGBSpan wxPli_sv_2_wxgbspan( pTHX_ SV* scalar ) { return wxPli_sv_2_wxthing( aTHX_ scalar, "Wx::GBSpan" ); } #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxPosition wxPli_sv_2_wxposition( pTHX_ SV* scalar ) { return wxPli_sv_2_wxthing( aTHX_ scalar, "Wx::Position" ); } #endif wxKeyCode wxPli_sv_2_keycode( pTHX_ SV* sv ) { if( SvIOK( sv ) || SvNOK( sv ) ) { return (wxKeyCode) SvIV( sv ); } else if( SvPOK( sv ) && SvCUR( sv ) == 1 ) { return (wxKeyCode) ( SvPV_nolen( sv ) )[0]; } else { croak( "You must supply either a number or a 1-character string" ); } return wxKeyCode( 0 ); // just to silence a possible warning } wxVariant wxPli_sv_2_wxvariant( pTHX_ SV* sv ) { if( !SvOK( sv ) ) { return wxVariant(); } else if( SvROK( sv ) ) { if( SvTYPE( SvRV( sv ) ) == SVt_PVAV ) { // array type. // assume a string array as it is the only one we // can usefully handle. // TODO - something better wxArrayString items; wxPli_av_2_arraystring( aTHX_ sv, &items ); return wxVariant( items ); } else { // TODO return wxVariant(); } } else if( SvNOK( sv ) ) { return wxVariant( (double)SvNV( sv ) ); } else if( SvIOK( sv ) ) { #if INTSIZE > LONGSIZE return wxVariant( (int)SvIV( sv ) ); #else return wxVariant( (long)SvIV( sv ) ); #endif } return wxVariant(); } class convert_wxpoint { public: bool operator()( pTHX_ wxPoint& dest, SV* src ) const { bool ispoint; dest = wxPli_sv_2_wxpoint_test ( aTHX_ src, wxPli_convert_int(), "Wx::Point", &ispoint ); return ispoint; } }; int wxPli_av_2_pointarray( pTHX_ SV* avref, wxPoint** array ) { return wxPli_av_2_arrayany( aTHX_ avref, array, convert_wxpoint(), wxPli_array_allocator() ); } class convert_double { public: bool operator()( pTHX_ double& dest, SV* src ) const { dest = (double) SvNV( src ); return true; } }; class convert_wxpoint2ddouble { public: bool operator()( pTHX_ wxPoint2DDouble& dest, SV* src ) const { bool ispoint; dest = wxPli_sv_2_wxpoint_test ( aTHX_ src, convert_double(), "Wx::Point2DDouble", &ispoint ); return ispoint; } }; int wxPli_av_2_point2ddoublearray( pTHX_ SV* avref, wxPoint2DDouble** array ) { return wxPli_av_2_arrayany( aTHX_ avref, array, convert_wxpoint2ddouble(), wxPli_array_allocator() ); } #if WXPERL_W_VERSION_GE( 2, 9, 0 ) int wxPli_av_2_pointlist( pTHX_ SV* arr, wxPointList *points, wxPoint** tmp ) #else int wxPli_av_2_pointlist( pTHX_ SV* arr, wxList *points, wxPoint** tmp ) #endif { *tmp = 0; if( !SvROK( arr ) || SvTYPE( SvRV( arr ) ) != SVt_PVAV ) { croak( "variable is not an array reference" ); } AV* array = (AV*) SvRV( arr ); int itm = av_len( array ) + 1, i; if( itm == 0 ) return 0; *tmp = new wxPoint[ itm ]; int used = 0; for( i = 0; i < itm; ++i ) { SV* scalar = *av_fetch( array, i, 0 ); if( SvROK( scalar ) ) { SV* ref = SvRV( scalar ); if( sv_derived_from( scalar, CHAR_P "Wx::Point" ) ) { #if WXPERL_W_VERSION_GE( 2, 9, 0 ) points->Append( INT2PTR( wxPoint*, SvIV( ref ) ) ); #else points->Append( INT2PTR( wxObject*, SvIV( ref ) ) ); #endif continue; } else if( SvTYPE( ref ) == SVt_PVAV ) { AV* av = (AV*) ref; if( av_len( av ) != 1 ) { croak( "the array reference must have 2 elements" ); delete [] *tmp; return 0; } else { int x = SvIV( *av_fetch( av, 0, 0 ) ); int y = SvIV( *av_fetch( av, 1, 0 ) ); (*tmp)[used] = wxPoint( x, y ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) points->Append( reinterpret_cast( *tmp + used ) ); #else points->Append( reinterpret_cast( *tmp + used ) ); #endif ++used; continue; } } } croak( "variable is not of type Wx::Point" ); delete [] *tmp; return 0; } return itm; } void wxPli_sv_2_istream( pTHX_ SV* scalar, wxPliInputStream& stream ) { stream = wxPliInputStream( scalar ); } void wxPli_sv_2_ostream( pTHX_ SV* scalar, wxPliOutputStream& stream ) { stream = wxPliOutputStream( scalar ); } void wxPli_stream_2_sv( pTHX_ SV* scalar, wxStreamBase* stream, const char* package ) { if( !stream ) { SvSetSV_nosteal( scalar, &PL_sv_undef ); return; } static SV* tie = eval_pv ( "require Symbol; sub { my $x = Symbol::gensym(); my $c = shift; tie *$x, $c, @_; return $x }", 1 ); static SV* dummy = SvREFCNT_inc( tie ); dSP; PUSHMARK( SP ); XPUSHs( newSVpv( CHAR_P package, 0 ) ); XPUSHs( newSViv( PTR2IV( stream ) ) ); PUTBACK; call_sv( tie, G_SCALAR ); SPAGAIN; SV* ret = POPs; SvSetSV_nosteal( scalar, ret ); PUTBACK; } I32 my_looks_like_number( pTHX_ SV* sv ) { if( SvROK( sv ) || !SvOK( sv ) ) return 0; if( SvIOK( sv ) || SvNOK( sv ) ) return 1; return looks_like_number( sv ); } #if wxPERL_USE_THREADS #define dwxHash( package, create ) \ char wxrbuffer[512]; \ strcpy( wxrbuffer, (package) ); \ strcat( wxrbuffer, "::_thr_register" ); \ HV* wxhash = get_hv( wxrbuffer, (create) ) \ #define dwxKey( ptr ) \ char wxkey[40]; \ sprintf( wxkey, "%p", (ptr) ); \ void wxPli_thread_sv_register( pTHX_ const char* package, const void* ptr, SV* sv ) { if( !SvOK( sv ) ) return; if( !SvROK( sv ) ) croak( "PANIC: no sense in registering a non-reference" ); dwxHash( package, 1 ); dwxKey( ptr ); SV* nsv = newRV( SvRV( sv ) ); hv_store( wxhash, wxkey, strlen(wxkey), nsv, 0 ); sv_rvweaken( nsv ); } void wxPli_thread_sv_unregister( pTHX_ const char* package, const void* ptr, SV* sv ) { if( !ptr ) return; dwxHash( package, 0 ); if( !wxhash ) return; dwxKey( ptr ); hv_delete( wxhash, wxkey, strlen(wxkey), 0 ); } void wxPli_thread_sv_clone( pTHX_ const char* package, wxPliCloneSV clonefn ) { dwxHash( package, 0 ); if( !wxhash ) return; hv_iterinit( wxhash ); HE* he; while( ( he = hv_iternext( wxhash ) ) != NULL ) { SV* val = hv_iterval( wxhash, he ); clonefn( aTHX_ val ); // hack around Scalar::Util::weaken() producing warnings if( MAGIC* magic = mg_find( SvRV( val ), '<' ) ) { SvREFCNT_inc( magic->mg_obj ); mg_free( SvRV( val ) ); } } hv_undef( wxhash ); } #endif // wxPERL_USE_THREADS // helpers for declaring event macros #include "cpp/e_cback.h" // THIS, (any) XS(ConnectDummy); XS(ConnectDummy) { dXSARGS; SV* THISs = ST(0); wxEvtHandler *THISo = // not needed, but sanity check (wxEvtHandler*)wxPli_sv_2_object( aTHX_ THISs, "Wx::EvtHandler" ); } // THIS, function XS(Connect2); XS(Connect2) { dXSARGS; assert( items == 2 ); SV* THISs = ST(0); wxEvtHandler *THISo = (wxEvtHandler*)wxPli_sv_2_object( aTHX_ THISs, "Wx::EvtHandler" ); SV* func = ST(1); wxEventType evtID = CvXSUBANY(cv).any_i32; if( SvOK( func ) ) { THISo->Connect( wxID_ANY, wxID_ANY, evtID, wxPliCastEvtHandler( &wxPliEventCallback::Handler ), new wxPliEventCallback( func, THISs ) ); } else { THISo->Disconnect( wxID_ANY, wxID_ANY, evtID, wxPliCastEvtHandler( &wxPliEventCallback::Handler ), 0 ); } } // THIS, ID, function XS(Connect3); XS(Connect3) { dXSARGS; assert( items == 3 ); SV* THISs = ST(0); wxEvtHandler *THISo = (wxEvtHandler*)wxPli_sv_2_object( aTHX_ THISs, "Wx::EvtHandler" ); wxWindowID id = wxPli_get_wxwindowid( aTHX_ ST(1) ); SV* func = ST(2); wxEventType evtID = CvXSUBANY(cv).any_i32; if( SvOK( func ) ) { THISo->Connect( id, wxID_ANY, evtID, wxPliCastEvtHandler( &wxPliEventCallback::Handler ), new wxPliEventCallback( func, THISs ) ); } else { THISo->Disconnect( id, wxID_ANY, evtID, wxPliCastEvtHandler( &wxPliEventCallback::Handler ), 0 ); } } // THIS, ID, wxEventId, function XS(Connect4); XS(Connect4) { dXSARGS; assert( items == 4 ); SV* THISs = ST(0); wxEvtHandler *THISo = (wxEvtHandler*)wxPli_sv_2_object( aTHX_ THISs, "Wx::EvtHandler" ); wxWindowID id = wxPli_get_wxwindowid( aTHX_ ST(1) ); wxEventType evtID = SvIV( ST(2) ); SV* func = ST(3); if( SvOK( func ) ) { THISo->Connect( id, wxID_ANY, evtID, wxPliCastEvtHandler( &wxPliEventCallback::Handler ), new wxPliEventCallback( func, THISs ) ); } else { THISo->Disconnect( id, wxID_ANY, evtID, wxPliCastEvtHandler( &wxPliEventCallback::Handler ), 0 ); } } void CreateEventMacro( const char* name, unsigned char args, int id ) { char buffer[1024]; CV* cv; dTHX; strcpy( buffer, "Wx::Event::" ); strcat( buffer, name ); switch( args ) { case 0: cv = (CV*)newXS( buffer, ConnectDummy, (char*)"Constants.xs" ); break; case 2: cv = (CV*)newXS( buffer, Connect2, (char*)"Constants.xs" ); sv_setpv((SV*)cv, "$$"); break; case 3: cv = (CV*)newXS( buffer, Connect3, (char*)"Constants.xs" ); sv_setpv((SV*)cv, "$$$"); break; case 4: cv = (CV*)newXS( buffer, Connect4, (char*)"Constants.xs" ); sv_setpv((SV*)cv, "$$$$"); break; default: return; } CvXSUBANY(cv).any_i32 = id; } void wxPli_set_events( const struct wxPliEventDescription* events ) { for( size_t i = 0; events[i].name != 0; ++i ) CreateEventMacro( events[i].name, events[i].args, events[i].evtID ); } // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/helpers.h000664000000000000 11601412306612226 13121 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/helpers.h // Purpose: some helper functions/classes // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: helpers.h 3499 2013-05-02 01:46:04Z mdootson $ // Copyright: (c) 2000-2011 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #ifndef __CPP_HELPERS_H #define __CPP_HELPERS_H #include #include #include #include #include #include class wxPliUserDataCD; class wxPliTreeItemData; class wxPliSelfRef; struct wxPliEventDescription; #ifndef WXDLLIMPEXP_FWD_CORE #define WXDLLIMPEXP_FWD_CORE WXDLLEXPORT #endif // forward declare Wx_*Stream class WXDLLIMPEXP_FWD_CORE wxInputStream; class WXDLLIMPEXP_FWD_CORE wxOutputStream; class WXDLLIMPEXP_FWD_CORE wxEvtHandler; class WXDLLIMPEXP_FWD_CORE wxClientDataContainer; class WXDLLIMPEXP_FWD_CORE wxPoint2DDouble; typedef wxInputStream Wx_InputStream; typedef wxOutputStream Wx_OutputStream; typedef const char* PlClassName; // for typemap #include I32 my_looks_like_number( pTHX_ SV* sv ); // helpers for UTF8 <-> wxString/wxChar // because xsubpp does not allow preprocessor commands in typemaps SV* wxPli_wxChar_2_sv( pTHX_ const wxChar* str, SV* out ); SV* wxPli_wxString_2_sv( pTHX_ const wxString& str, SV* out ); #if defined(wxUSE_UNICODE_UTF8) && wxUSE_UNICODE_UTF8 inline SV* wxPli_wxChar_2_sv( pTHX_ const wxChar* str, SV* out ) { sv_setpv( out, wxString( str ).wx_str() ); SvUTF8_on( out ); return out; } inline SV* wxPli_wxString_2_sv( pTHX_ const wxString& str, SV* out ) { sv_setpv( out, str.wx_str() ); SvUTF8_on( out ); return out; } #define WXCHAR_INPUT( var, type, arg ) \ const wxWCharBuffer var##_tmp = ( wxString( SvPVutf8_nolen( arg ), wxConvUTF8 ) ).wc_str(); \ var = const_cast( var##_tmp.data() ); #define WXCHAR_OUTPUT( var, arg ) \ wxPli_wxChar_2_sv( aTHX_ var, arg ) #define WXSTRING_INPUT( var, type, arg ) \ var = wxString( SvPVutf8_nolen( arg ), wxConvUTF8 ); #define WXSTRING_OUTPUT( var, arg ) \ wxPli_wxString_2_sv( aTHX_ var, arg ) #elif wxUSE_UNICODE inline SV* wxPli_wxChar_2_sv( pTHX_ const wxChar* str, SV* out ) { sv_setpv( out, wxConvUTF8.cWC2MB( str ? str : wxEmptyString ) ); SvUTF8_on( out ); return out; } inline SV* wxPli_wxString_2_sv( pTHX_ const wxString& str, SV* out ) { sv_setpv( out, str.mb_str( wxConvUTF8 ) ); SvUTF8_on( out ); return out; } #define WXCHAR_INPUT( var, type, arg ) \ const wxString var##_tmp = ( wxString( SvPVutf8_nolen( arg ), wxConvUTF8 ) ); \ var = const_cast( static_cast( var##_tmp.wc_str() ) ); #define WXCHAR_OUTPUT( var, arg ) \ wxPli_wxChar_2_sv( aTHX_ var, arg ) #define WXSTRING_INPUT( var, type, arg ) \ var = wxString( SvPVutf8_nolen( arg ), wxConvUTF8 ); #define WXSTRING_OUTPUT( var, arg ) \ wxPli_wxString_2_sv( aTHX_ var, arg ) #else #if NEEDS_PLI_HELPERS_STRUCT() bool* wxPli_always_utf8; #else extern bool wxPli_always_utf8; #endif inline SV* wxPli_wxChar_2_sv( pTHX_ const wxChar* str, SV* out ) { #if NEEDS_PLI_HELPERS_STRUCT() if( *wxPli_always_utf8 ) #else if( wxPli_always_utf8 ) #endif { sv_setpv( out, wxConvUTF8.cWC2MB( wxConvLibc.cWX2WC( str ? str : wxEmptyString ) ) ); SvUTF8_on( out ); } else { sv_setpv( out, str ); } return out; } inline SV* wxPli_wxString_2_sv( pTHX_ const wxString& str, SV* out ) { #if NEEDS_PLI_HELPERS_STRUCT() if( *wxPli_always_utf8 ) #else if( wxPli_always_utf8 ) #endif { sv_setpv( out, wxConvUTF8.cWC2MB( wxConvLibc.cWX2WC( str.c_str() ) ) ); SvUTF8_on( out ); } else { sv_setpvn( out, str.c_str(), str.size() ); } return out; } #define WXCHAR_INPUT( var, type, arg ) \ const wxString var##_tmp = ( SvUTF8( arg ) ) ? \ ( wxString( wxConvUTF8.cMB2WC( SvPVutf8_nolen( arg ) ), wxConvLocal ) ) \ : ( wxString( SvPV_nolen( arg ) ) ); \ var = const_cast( static_cast( var##_tmp.c_str() ) ); #define WXCHAR_OUTPUT( var, arg ) \ wxPli_wxChar_2_sv( aTHX_ var, arg ) #define WXSTRING_INPUT( var, type, arg ) \ var = ( SvUTF8( arg ) ) ? \ wxString( wxConvUTF8.cMB2WC( SvPVutf8_nolen( arg ) ), wxConvLocal ) \ : wxString( SvPV_nolen( arg ) ); #define WXSTRING_OUTPUT( var, arg ) \ wxPli_wxString_2_sv( aTHX_ var, arg ) #endif inline wxString wxPli_sv_2_wxString( pTHX_ SV* sv ) { wxString ret; WXSTRING_INPUT( ret, wxString , sv ); return ret; } // some utility functions inline AV* wxPli_avref_2_av( SV* sv ) { if( SvROK( sv ) ) { SV* rv = SvRV( sv ); return SvTYPE( rv ) == SVt_PVAV ? (AV*)rv : NULL; } return NULL; } #define wxPli_push_2ints( i1, i2 ) \ EXTEND( SP, 2 ); \ PUSHs( sv_2mortal( newSViv( (IV) (i1) ) ) ); \ PUSHs( sv_2mortal( newSViv( (IV) (i2) ) ) ); \ // const int WXPL_BUF_SIZE = 120; const char* FUNCPTR( wxPli_cpp_class_2_perl )( const wxChar* className, char buffer[WXPL_BUF_SIZE] ); // argtypes is a string; each character describes the C++ argument // type and how it should be used (i.e. a valid string is "ii", assuming // you pass two integers as additional parameters // b - a boolean value // i - an 'int' value // I - an 'unsigned int' value // l - a 'long' value // L - an 'unsigned long' value // d - a 'double' value // p - a char* // w - a wxChar* // P - a wxString* // S - an SV*; a _COPY_ of the SV is passed // s - an SV*; _the SV_ is passed (any modifications made by the function // will affect the SV, unlike in the previous case) // O - a wxObject*; this will use wxPli_object_2_sv and push the result // o - a void* followed by a char*; will use wxPli_non_object_2_sv // and push the result // Q, q - same as O and o, but does not call delete() on the object void FUNCPTR( wxPli_push_arguments )( pTHX_ SV*** stack, const char* argtypes, ... ); void wxPli_push_args( pTHX_ SV*** stack, const char* argtypes, va_list &list ); void* FUNCPTR( wxPli_sv_2_object )( pTHX_ SV* scalar, const char* classname ); SV* FUNCPTR( wxPli_object_2_sv )( pTHX_ SV* var, const wxObject* object ); SV* FUNCPTR( wxPli_clientdatacontainer_2_sv )( pTHX_ SV* var, wxClientDataContainer* cdc, const char* klass ); SV* FUNCPTR( wxPli_evthandler_2_sv )( pTHX_ SV* var, wxEvtHandler* evth ); SV* FUNCPTR( wxPli_non_object_2_sv )( pTHX_ SV* var, const void* data, const char* package ); SV* FUNCPTR( wxPli_make_object )( void* object, const char* cname ); SV* FUNCPTR( wxPli_create_evthandler )( pTHX_ wxEvtHandler* object, const char* classn ); bool FUNCPTR( wxPli_object_is_deleteable )( pTHX_ SV* object ); void FUNCPTR( wxPli_object_set_deleteable )( pTHX_ SV* object, bool deleteable ); // in both attach and detach, object is a _reference_ to a // blessed thing void FUNCPTR( wxPli_attach_object )( pTHX_ SV* object, void* ptr ); void* FUNCPTR( wxPli_detach_object )( pTHX_ SV* object ); const char* FUNCPTR( wxPli_get_class )( pTHX_ SV* ref ); wxWindowID FUNCPTR( wxPli_get_wxwindowid )( pTHX_ SV* var ); int FUNCPTR( wxPli_av_2_stringarray )( pTHX_ SV* avref, wxString** array ); int wxPli_av_2_charparray( pTHX_ SV* avref, char*** array ); int wxPli_av_2_wxcharparray( pTHX_ SV* avref, wxChar*** array ); int wxPli_av_2_uchararray( pTHX_ SV* avref, unsigned char** array ); int wxPli_av_2_svarray( pTHX_ SV* avref, SV*** array ); int FUNCPTR( wxPli_av_2_intarray )( pTHX_ SV* avref, int** array ); int wxPli_av_2_userdatacdarray( pTHX_ SV* avref, wxPliUserDataCD*** array ); int FUNCPTR( wxPli_av_2_arraystring )( pTHX_ SV* avref, wxArrayString* array ); int FUNCPTR( wxPli_av_2_arrayint )( pTHX_ SV* avref, wxArrayInt* array ); // pushes the elements of the array into the stack // the caller _MUST_ call PUTBACK; before the function // and SPAGAIN; after the function template void wxPli_non_objarray_push( pTHX_ const A& things, const char* package ) { dSP; size_t mx = things.GetCount(); EXTEND( SP, int(mx) ); for( size_t i = 0; i < mx; ++i ) { PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), &things[i], package ) ); } PUTBACK; } void FUNCPTR( wxPli_stringarray_push )( pTHX_ const wxArrayString& strings ); void FUNCPTR( wxPli_intarray_push )( pTHX_ const wxArrayInt& ints ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void wxPli_doublearray_push( pTHX_ const wxArrayDouble& doubles ); #endif AV* wxPli_stringarray_2_av( pTHX_ const wxArrayString& strings ); AV* wxPli_uchararray_2_av( pTHX_ const unsigned char* array, int count ); AV* FUNCPTR( wxPli_objlist_2_av )( pTHX_ const wxList& objs ); void FUNCPTR( wxPli_objlist_push )( pTHX_ const wxList& objs ); template void wxPli_nonobjarray_push( pTHX_ const A& objs, const char* klass ) { dSP; size_t mx = objs.GetCount(); EXTEND( SP, IV(mx) ); for( size_t i = 0; i < mx; ++i ) { PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new E( objs[i] ), klass ) ); } PUTBACK; } void wxPli_delete_argv( void*** argv, bool unicode ); int wxPli_get_args_argc_argv( void*** argv, bool unicode ); void wxPli_get_args_objectarray( pTHX_ SV** sp, int items, void** array, const char* package ); wxPoint FUNCPTR( wxPli_sv_2_wxpoint_test )( pTHX_ SV* scalar, bool* ispoint ); wxPoint FUNCPTR( wxPli_sv_2_wxpoint )( pTHX_ SV* scalar ); wxSize FUNCPTR( wxPli_sv_2_wxsize )( pTHX_ SV* scalar ); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) class WXDLLIMPEXP_FWD_CORE wxGBPosition; class WXDLLIMPEXP_FWD_CORE wxGBSpan; wxGBPosition wxPli_sv_2_wxgbposition( pTHX_ SV* scalar ); wxGBSpan wxPli_sv_2_wxgbspan( pTHX_ SV* scalar ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) class wxPosition; wxPosition wxPli_sv_2_wxposition( pTHX_ SV* scalar ); #endif wxVariant FUNCPTR( wxPli_sv_2_wxvariant )( pTHX_ SV* scalar ); wxKeyCode wxPli_sv_2_keycode( pTHX_ SV* scalar ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) int wxPli_av_2_pointlist( pTHX_ SV* array, wxPointList *points, wxPoint** tmp ); #else int wxPli_av_2_pointlist( pTHX_ SV* array, wxList *points, wxPoint** tmp ); #endif int wxPli_av_2_pointarray( pTHX_ SV* array, wxPoint** points ); int wxPli_av_2_point2ddoublearray( pTHX_ SV* array, wxPoint2DDouble** points ); template class wxPliArrayGuard { private: E* m_array; public: wxPliArrayGuard( E* els = NULL ) : m_array( els ) {} ~wxPliArrayGuard() { delete[] m_array; } E** lvalue() { return &m_array; } E* rvalue() { return m_array; } operator E*() { return m_array; } E* disarm() { E* oldvalue = m_array; m_array = NULL; return oldvalue; } }; // thread helpers #if wxPERL_USE_THREADS typedef void (* wxPliCloneSV)( pTHX_ SV* scalar ); void FUNCPTR( wxPli_thread_sv_register )( pTHX_ const char* package, const void* ptr, SV* sv ); void FUNCPTR( wxPli_thread_sv_unregister )( pTHX_ const char* package, const void* ptr, SV* sv ); void FUNCPTR( wxPli_thread_sv_clone )( pTHX_ const char* package, wxPliCloneSV clonefn ); #else // if !wxPERL_USE_THREADS #define wxPli_thread_sv_register( package, ptr, sv ) #define wxPli_thread_sv_unregister( package, ptr, sv ) #define wxPli_thread_sv_clone( package, clonefn ) #endif // !wxPERL_USE_THREADS // stream wrappers class wxPliInputStream; class wxPliOutputStream; class wxStreamBase; void wxPli_sv_2_istream( pTHX_ SV* scalar, wxPliInputStream& stream ); void wxPli_sv_2_ostream( pTHX_ SV* scalar, wxPliOutputStream& stream ); void FUNCPTR( wxPli_stream_2_sv )( pTHX_ SV* scalar, wxStreamBase* stream, const char* package ); wxPliInputStream* FUNCPTR( wxPliInputStream_ctor )( SV* sv ); wxPliOutputStream* FUNCPTR( wxPliOutputStream_ctor )( SV* sv ); void FUNCPTR( wxPli_set_events )( const wxPliEventDescription* events ); // defined in Constants.xs void FUNCPTR( wxPli_add_constant_function )( double (**)( const char*, int ) ); void FUNCPTR( wxPli_remove_constant_function )( double (**)( const char*, int ) ); // defined in v_cback.cpp class wxPliVirtualCallback; bool FUNCPTR( wxPliVirtualCallback_FindCallback ) ( pTHX_ const wxPliVirtualCallback* cb, const char* name ); // see wxPli_push_args for a description of argtypes SV* FUNCPTR( wxPliVirtualCallback_CallCallback ) ( pTHX_ const wxPliVirtualCallback* cb, I32 flags, const char* argtypes, ... ); // used in overload.cpp struct wxPliPrototype { wxPliPrototype( const char** const proto, const size_t proto_size ) : args( proto ), count( proto_size ) { } const char** const args; const size_t count; }; bool wxPli_match_arguments( pTHX_ const wxPliPrototype& prototype, int required = -1, bool allow_more = false ); bool FUNCPTR( wxPli_match_arguments_skipfirst )( pTHX_ const wxPliPrototype& p, int required, bool allow_more ); void FUNCPTR( wxPli_overload_error )( pTHX_ const char* function, wxPliPrototype* prototypes[] ); SV* FUNCPTR( wxPli_create_virtual_evthandler )( pTHX_ wxEvtHandler* object, const char* classn, bool forcevirtual ); wxPliSelfRef* FUNCPTR( wxPli_get_selfref )( pTHX_ wxObject* object, bool forcevirtual ); SV* FUNCPTR( wxPli_object_2_scalarsv )( pTHX_ SV* var, const wxObject* object ); SV* FUNCPTR( wxPli_namedobject_2_sv )( pTHX_ SV* var, const wxObject* object, const char* package ); #define WXPLI_BOOT_ONCE_( name, xs ) \ bool name##_booted = false; \ extern "C" XS(wxPli_boot_##name); \ extern "C" \ xs(boot_##name) \ { \ if( name##_booted ) return; \ name##_booted = true; \ wxPli_boot_##name( aTHX_ cv ); \ } #define WXPLI_BOOT_ONCE( name ) WXPLI_BOOT_ONCE_( name, XS ) #if defined(WIN32) || defined(__CYGWIN__) # define WXPLI_BOOT_ONCE_EXP( name ) WXPLI_BOOT_ONCE_( name, WXXS ) #else # define WXPLI_BOOT_ONCE_EXP WXPLI_BOOT_ONCE #endif #if WXPERL_W_VERSION_GE( 2, 5, 1 ) #define WXPLI_INIT_CLASSINFO() #else #define WXPLI_INIT_CLASSINFO() \ wxClassInfo::CleanUpClasses(); \ wxClassInfo::InitializeClasses() #endif struct wxPliHelpers { void* ( * m_wxPli_sv_2_object )( pTHX_ SV*, const char* ); SV* ( * m_wxPli_evthandler_2_sv )( pTHX_ SV* var, wxEvtHandler* evth ); SV* ( * m_wxPli_object_2_sv )( pTHX_ SV*, const wxObject* ); SV* ( * m_wxPli_non_object_2_sv )( pTHX_ SV* , const void*, const char* ); SV* ( * m_wxPli_make_object )( void*, const char* ); wxPoint ( * m_wxPli_sv_2_wxpoint_test )( pTHX_ SV*, bool* ); wxPoint ( * m_wxPli_sv_2_wxpoint )( pTHX_ SV* ); wxSize ( * m_wxPli_sv_2_wxsize )( pTHX_ SV* ); int ( * m_wxPli_av_2_intarray )( pTHX_ SV*, int** ); void ( * m_wxPli_stream_2_sv )( pTHX_ SV*, wxStreamBase*, const char* ); void ( * m_wxPli_add_constant_function ) ( double (**)( const char*, int ) ); void ( * m_wxPli_remove_constant_function ) ( double (**)( const char*, int ) ); bool ( * m_wxPliVirtualCallback_FindCallback )( pTHX_ const wxPliVirtualCallback*, const char* ); SV* ( * m_wxPliVirtualCallback_CallCallback ) ( pTHX_ const wxPliVirtualCallback*, I32, const char*, ... ); bool ( * m_wxPli_object_is_deleteable )( pTHX_ SV* ); void ( * m_wxPli_object_set_deleteable )( pTHX_ SV*, bool ); const char* ( * m_wxPli_get_class )( pTHX_ SV* ); wxWindowID ( * m_wxPli_get_wxwindowid )( pTHX_ SV* ); int ( * m_wxPli_av_2_stringarray )( pTHX_ SV*, wxString** ); wxPliInputStream* ( * m_wxPliInputStream_ctor )( SV* ); const char* ( * m_wxPli_cpp_class_2_perl )( const wxChar*, char buffer[WXPL_BUF_SIZE] ); void ( * m_wxPli_push_arguments )( pTHX_ SV*** stack, const char* argtypes, ... ); void ( * m_wxPli_attach_object )( pTHX_ SV* object, void* ptr ); void* ( * m_wxPli_detach_object )( pTHX_ SV* object ); SV* ( * m_wxPli_create_evthandler )( pTHX_ wxEvtHandler* object, const char* cln ); bool (* m_wxPli_match_arguments_skipfirst )( pTHX_ const wxPliPrototype&, int required, bool allow_more ); AV* (* m_wxPli_objlist_2_av )( pTHX_ const wxList& objs ); void (* m_wxPli_intarray_push )( pTHX_ const wxArrayInt& ); SV* (* m_wxPli_clientdatacontainer_2_sv )( pTHX_ SV* var, wxClientDataContainer* cdc, const char* klass ); #if wxPERL_USE_THREADS void (* m_wxPli_thread_sv_register )( pTHX_ const char* package, const void* ptr, SV* sv ); void (* m_wxPli_thread_sv_unregister )( pTHX_ const char* package, const void* ptr, SV* sv ); void (* m_wxPli_thread_sv_clone )( pTHX_ const char* package, wxPliCloneSV clonefn ); #endif #if !wxUSE_UNICODE bool *m_wxPli_always_utf8; #endif int (* m_wxPli_av_2_arrayint )( pTHX_ SV* avref, wxArrayInt* array ); void (* m_wxPli_set_events )( const wxPliEventDescription* events ); int (* m_wxPli_av_2_arraystring )( pTHX_ SV* avref, wxArrayString* array ); void (* m_wxPli_objlist_push )( pTHX_ const wxList& objs ); wxPliOutputStream* ( * m_wxPliOutputStream_ctor )( SV* ); void (* m_wxPli_stringarray_push )( pTHX_ const wxArrayString& ); void (* m_wxPli_overload_error )( pTHX_ const char* function, wxPliPrototype* prototypes[] ); wxVariant (* m_wxPli_sv_2_wxvariant )( pTHX_ SV* scalar ); SV* ( * m_wxPli_create_virtual_evthandler )( pTHX_ wxEvtHandler* object, const char* cln, bool forcevirtual ); wxPliSelfRef* ( * m_wxPli_get_selfref )( pTHX_ wxObject*, bool); SV* ( * m_wxPli_object_2_scalarsv )( pTHX_ SV* var, const wxObject* object ); SV* ( * m_wxPli_namedobject_2_sv )( pTHX_ SV* var, const wxObject* object, const char* package ); }; #if wxPERL_USE_THREADS # define wxDEFINE_PLI_HELPER_THREADS() \ &wxPli_thread_sv_register, \ &wxPli_thread_sv_unregister, &wxPli_thread_sv_clone, # define wxINIT_PLI_HELPER_THREADS( name ) \ wxPli_thread_sv_register = name->m_wxPli_thread_sv_register; \ wxPli_thread_sv_unregister = name->m_wxPli_thread_sv_unregister; \ wxPli_thread_sv_clone = name->m_wxPli_thread_sv_clone; #else # define wxDEFINE_PLI_HELPER_THREADS() # define wxINIT_PLI_HELPER_THREADS( name ) #endif #if !wxUSE_UNICODE # define wxDEFINE_PLI_HELPER_UNICODE() \ &wxPli_always_utf8, # define wxINIT_PLI_HELPER_UNICODE( name ) \ wxPli_always_utf8 = name->m_wxPli_always_utf8; #else # define wxDEFINE_PLI_HELPER_UNICODE() # define wxINIT_PLI_HELPER_UNICODE( name ) #endif #define DEFINE_PLI_HELPERS( name ) \ wxPliHelpers name = { &wxPli_sv_2_object, \ &wxPli_evthandler_2_sv, &wxPli_object_2_sv, \ &wxPli_non_object_2_sv, &wxPli_make_object, &wxPli_sv_2_wxpoint_test, \ &wxPli_sv_2_wxpoint, \ &wxPli_sv_2_wxsize, &wxPli_av_2_intarray, wxPli_stream_2_sv, \ &wxPli_add_constant_function, &wxPli_remove_constant_function, \ &wxPliVirtualCallback_FindCallback, &wxPliVirtualCallback_CallCallback, \ &wxPli_object_is_deleteable, &wxPli_object_set_deleteable, &wxPli_get_class, \ &wxPli_get_wxwindowid, &wxPli_av_2_stringarray, &wxPliInputStream_ctor, \ &wxPli_cpp_class_2_perl, &wxPli_push_arguments, &wxPli_attach_object, \ &wxPli_detach_object, &wxPli_create_evthandler, \ &wxPli_match_arguments_skipfirst, &wxPli_objlist_2_av, &wxPli_intarray_push, \ &wxPli_clientdatacontainer_2_sv, \ wxDEFINE_PLI_HELPER_THREADS() \ wxDEFINE_PLI_HELPER_UNICODE() \ &wxPli_av_2_arrayint, &wxPli_set_events, &wxPli_av_2_arraystring, \ &wxPli_objlist_push, &wxPliOutputStream_ctor, &wxPli_stringarray_push, \ &wxPli_overload_error, &wxPli_sv_2_wxvariant, \ &wxPli_create_virtual_evthandler, &wxPli_get_selfref, &wxPli_object_2_scalarsv, \ &wxPli_namedobject_2_sv \ } #if NEEDS_PLI_HELPERS_STRUCT() #define INIT_PLI_HELPERS( name ) \ SV* wxpli_tmp = get_sv( "Wx::_exports", 1 ); \ wxPliHelpers* name = INT2PTR( wxPliHelpers*, SvIV( wxpli_tmp ) ); \ wxPli_sv_2_object = name->m_wxPli_sv_2_object; \ wxPli_evthandler_2_sv = name->m_wxPli_evthandler_2_sv; \ wxPli_object_2_sv = name->m_wxPli_object_2_sv; \ wxPli_non_object_2_sv = name->m_wxPli_non_object_2_sv; \ wxPli_make_object = name->m_wxPli_make_object; \ wxPli_sv_2_wxpoint_test = name->m_wxPli_sv_2_wxpoint_test; \ wxPli_sv_2_wxpoint = name->m_wxPli_sv_2_wxpoint; \ wxPli_sv_2_wxsize = name->m_wxPli_sv_2_wxsize; \ wxPli_av_2_intarray = name->m_wxPli_av_2_intarray; \ wxPli_stream_2_sv = name->m_wxPli_stream_2_sv; \ wxPli_add_constant_function = name->m_wxPli_add_constant_function; \ wxPli_remove_constant_function = name->m_wxPli_remove_constant_function; \ wxPliVirtualCallback_FindCallback = name->m_wxPliVirtualCallback_FindCallback; \ wxPliVirtualCallback_CallCallback = name->m_wxPliVirtualCallback_CallCallback; \ wxPli_object_is_deleteable = name->m_wxPli_object_is_deleteable; \ wxPli_object_set_deleteable = name->m_wxPli_object_set_deleteable; \ wxPli_get_class = name->m_wxPli_get_class; \ wxPli_get_wxwindowid = name->m_wxPli_get_wxwindowid; \ wxPli_av_2_stringarray = name->m_wxPli_av_2_stringarray; \ wxPliInputStream_ctor = name->m_wxPliInputStream_ctor; \ wxPli_cpp_class_2_perl = name->m_wxPli_cpp_class_2_perl; \ wxPli_push_arguments = name->m_wxPli_push_arguments; \ wxPli_attach_object = name->m_wxPli_attach_object; \ wxPli_detach_object = name->m_wxPli_detach_object; \ wxPli_create_evthandler = name->m_wxPli_create_evthandler; \ wxPli_match_arguments_skipfirst = name->m_wxPli_match_arguments_skipfirst; \ wxPli_objlist_2_av = name->m_wxPli_objlist_2_av; \ wxPli_intarray_push = name->m_wxPli_intarray_push; \ wxPli_clientdatacontainer_2_sv = name->m_wxPli_clientdatacontainer_2_sv; \ wxINIT_PLI_HELPER_THREADS( name ) \ wxINIT_PLI_HELPER_UNICODE( name ) \ wxPli_av_2_arrayint = name->m_wxPli_av_2_arrayint; \ wxPli_set_events = name->m_wxPli_set_events; \ wxPli_av_2_arraystring = name->m_wxPli_av_2_arraystring; \ wxPli_objlist_push = name->m_wxPli_objlist_push; \ wxPliOutputStream_ctor = name->m_wxPliOutputStream_ctor; \ wxPli_av_2_stringarray = name->m_wxPli_av_2_stringarray; \ wxPli_overload_error = name->m_wxPli_overload_error; \ wxPli_sv_2_wxvariant = name->m_wxPli_sv_2_wxvariant; \ wxPli_create_virtual_evthandler = name->m_wxPli_create_virtual_evthandler; \ wxPli_get_selfref = name->m_wxPli_get_selfref; \ wxPli_object_2_scalarsv = name->m_wxPli_object_2_scalarsv; \ wxPli_namedobject_2_sv = name->m_wxPli_namedobject_2_sv; \ WXPLI_INIT_CLASSINFO(); #else #define INIT_PLI_HELPERS( name ) #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) int wxCALLBACK ListCtrlCompareFn( long item1, long item2, wxIntPtr comparefn ); #else int wxCALLBACK ListCtrlCompareFn( long item1, long item2, long comparefn ); #endif class wxPliUserDataO : public wxObject { public: wxPliUserDataO( SV* data ) { dTHX; m_data = data ? newSVsv( data ) : NULL; } ~wxPliUserDataO() { dTHX; SvREFCNT_dec( m_data ); } SV* GetData() { return m_data; } private: SV* m_data; }; typedef wxPliUserDataO Wx_UserDataO; class wxPliSelfRef { public: wxPliSelfRef( const char* unused = 0 ) {} virtual ~wxPliSelfRef() { dTHX; if( m_self ) SvREFCNT_dec( m_self ); } void SetSelf( SV* self, bool increment = true ) { dTHX; m_self = self; if( m_self && increment ) SvREFCNT_inc( m_self ); } SV* GetSelf() const { return m_self; } void DeleteSelf( bool fromDestroy ); public: SV* m_self; }; typedef wxPliSelfRef* (* wxPliGetCallbackObjectFn)(wxObject* object); class wxPliClassInfo : public wxClassInfo { public: #if wxUSE_EXTENDED_RTTI wxPliClassInfo( const wxClassInfo **_Parents, const wxChar *_ClassName, int size, wxObjectConstructorFn ctor, wxPliGetCallbackObjectFn fn ) :wxClassInfo( _Parents, NULL, _ClassName, size, ctor, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL ) { m_func = fn; } #else wxPliClassInfo( wxChar *cName, const wxClassInfo *baseInfo1, const wxClassInfo *baseInfo2, int sz, wxObjectConstructorFn ctor, wxPliGetCallbackObjectFn fn ) :wxClassInfo( cName, baseInfo1, baseInfo2, sz, ctor) { m_func = fn; } #endif public: wxPliGetCallbackObjectFn m_func; }; #if wxUSE_EXTENDED_RTTI #define WXPLI_DECLARE_DYNAMIC_CLASS(name) \ public:\ static wxPliClassInfo ms_classInfo;\ static const wxClassInfo* ms_classParents[] ;\ virtual wxClassInfo *GetClassInfo() const \ { return &ms_classInfo; } #else #define WXPLI_DECLARE_DYNAMIC_CLASS(name) \ public:\ static wxPliClassInfo ms_classInfo;\ virtual wxClassInfo *GetClassInfo() const \ { return &ms_classInfo; } #endif #define WXPLI_DECLARE_DYNAMIC_CLASS_CTOR(name) \ WXPLI_DECLARE_DYNAMIC_CLASS(name) \ static wxObject* wxCreateObject() #define WXPLI_DECLARE_SELFREF() \ public:\ wxPliSelfRef m_callback #define WXPLI_DECLARE_V_CBACK() \ public:\ wxPliVirtualCallback m_callback #if wxUSE_EXTENDED_RTTI #define WXPLI_IMPLEMENT_DYNAMIC_CLASS_(name, basename, fn) \ wxPliSelfRef* wxPliGetSelfFor##name(wxObject* object) \ { return &((name *)object)->m_callback; } \ const wxClassInfo* name::ms_classParents[] = \ { &basename::ms_classInfo , NULL }; \ wxPliClassInfo name::ms_classInfo( ms_classParents, \ (wxChar *) wxT(#name), (int) sizeof(name), fn, \ (wxPliGetCallbackObjectFn) wxPliGetSelfFor##name); #else #define WXPLI_IMPLEMENT_DYNAMIC_CLASS_(name, basename, fn) \ wxPliSelfRef* wxPliGetSelfFor##name(wxObject* object) \ { return &((name *)object)->m_callback; } \ wxPliClassInfo name::ms_classInfo((wxChar *) wxT(#name), \ &basename::ms_classInfo, NULL, (int) sizeof(name), fn, \ (wxPliGetCallbackObjectFn) wxPliGetSelfFor##name); #endif #define WXPLI_IMPLEMENT_DYNAMIC_CLASS(name, basename) \ WXPLI_IMPLEMENT_DYNAMIC_CLASS_(name, basename, NULL) #define WXPLI_IMPLEMENT_DYNAMIC_CLASS_CTOR(name, basename) \ WXPLI_IMPLEMENT_DYNAMIC_CLASS_(name, basename, name::wxCreateObject) \ wxObject* name::wxCreateObject() { return new name(); } #define WXPLI_DEFAULT_CONSTRUCTOR_NC( name, packagename, incref ) \ name( const char* package ) \ : m_callback( packagename ) \ { \ m_callback.SetSelf( wxPli_make_object( this, package ), incref );\ } #define WXPLI_DEFAULT_CONSTRUCTOR( name, packagename, incref ) \ name( const char* package ) \ :m_callback( packagename ) \ { \ m_callback.SetSelf( wxPli_make_object( this, package ), incref );\ } #define WXPLI_CONSTRUCTOR_1_NC( name, base, packagename, incref, argt1 ) \ name( const char* package, argt1 _arg1 ) \ : base( _arg1 ), \ m_callback( packagename ) \ { \ m_callback.SetSelf( wxPli_make_object( this, package ), incref );\ } #define WXPLI_CONSTRUCTOR_2( name, packagename, incref, argt1, argt2 ) \ name( const char* package, argt1 _arg1, argt2 _arg2 ) \ :m_callback( packagename ) \ { \ m_callback.SetSelf( wxPli_make_object( this, package ), incref ); \ Create( _arg1, _arg2 ); \ } #define WXPLI_CONSTRUCTOR_5( name, packagename, incref, argt1, argt2, argt3, argt4, argt5 ) \ name( const char* package, argt1 _arg1, argt2 _arg2, argt3 _arg3, \ argt4 _arg4, argt5 _arg5 ) \ :m_callback( packagename ) \ { \ m_callback.SetSelf( wxPli_make_object( this, package ), incref ); \ Create( _arg1, _arg2, _arg3, _arg4, _arg5 ); \ } #define WXPLI_CONSTRUCTOR_6( name, packagename, incref, argt1, argt2, argt3, argt4, argt5, argt6 ) \ name( const char* package, argt1 _arg1, argt2 _arg2, argt3 _arg3, \ argt4 _arg4, argt5 _arg5, argt6 _arg6 ) \ :m_callback( packagename ) \ { \ m_callback.SetSelf( wxPli_make_object( this, package ), incref ); \ Create( _arg1, _arg2, _arg3, _arg4, _arg5, _arg6 ); \ } #define WXPLI_CONSTRUCTOR_7( name, packagename, incref, argt1, argt2, argt3, argt4, argt5, argt6, argt7 ) \ name( const char* package, argt1 _arg1, argt2 _arg2, argt3 _arg3, \ argt4 _arg4, argt5 _arg5, argt6 _arg6, argt7 _arg7) \ :m_callback( packagename ) \ { \ m_callback.SetSelf( wxPli_make_object( this, package ), incref ); \ Create( _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7 ); \ } #define WXPLI_CONSTRUCTOR_8( name, packagename, incref, argt1, argt2, argt3, argt4, argt5, argt6, argt7, argt8 ) \ name( const char* package, argt1 _arg1, argt2 _arg2, argt3 _arg3, \ argt4 _arg4, argt5 _arg5, argt6 _arg6, argt7 _arg7, argt8 _arg8)\ :m_callback( packagename ) \ { \ m_callback.SetSelf( wxPli_make_object( this, package ), incref ); \ Create( _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8 ); \ } #define WXPLI_CONSTRUCTOR_9( name, packagename, incref, argt1, argt2, argt3, argt4, argt5, argt6, argt7, argt8, argt9 ) \ name( const char* package, argt1 _arg1, argt2 _arg2, argt3 _arg3, \ argt4 _arg4, argt5 _arg5, argt6 _arg6, argt7 _arg7, \ argt8 _arg8, argt9 _arg9 ) \ :m_callback( packagename ) \ { \ m_callback.SetSelf( wxPli_make_object( this, package ), incref ); \ Create( _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, \ _arg9 ); \ } #define WXPLI_CONSTRUCTOR_10( name, packagename, incref, argt1, argt2, argt3, argt4, argt5, argt6, argt7, argt8, argt9, argt10 ) \ name( const char* package, argt1 _arg1, argt2 _arg2, argt3 _arg3, \ argt4 _arg4, argt5 _arg5, argt6 _arg6, argt7 _arg7, \ argt8 _arg8, argt9 _arg9, argt10 _arg10 ) \ :m_callback( packagename ) \ { \ m_callback.SetSelf( wxPli_make_object( this, package ), incref ); \ Create( _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, \ _arg9, _arg10 ); \ } #define WXPLI_CONSTRUCTOR_11( name, packagename, incref, argt1, argt2, argt3, argt4, argt5, argt6, argt7, argt8, argt9, argt10, argt11 ) \ name( const char* package, argt1 _arg1, argt2 _arg2, argt3 _arg3, \ argt4 _arg4, argt5 _arg5, argt6 _arg6, argt7 _arg7, \ argt8 _arg8, argt9 _arg9, argt10 _arg10, argt11 _arg11 ) \ :m_callback( packagename ) \ { \ m_callback.SetSelf( wxPli_make_object( this, package ), incref ); \ Create( _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, \ _arg9, _arg10, _arg11 ); \ } #define WXPLI_DECLARE_CLASS_6( name, incref, argt1, argt2, argt3, argt4, argt5, argt6 ) \ class wxPli##name:public wx##name \ { \ WXPLI_DECLARE_DYNAMIC_CLASS( wxPli##name ); \ WXPLI_DECLARE_SELFREF(); \ public: \ WXPLI_DEFAULT_CONSTRUCTOR( wxPli##name, "Wx::" #name, incref ); \ WXPLI_CONSTRUCTOR_6( wxPli##name, "Wx::" #name, incref, \ argt1, argt2, argt3, argt4, argt5, argt6 ); \ }; #define WXPLI_DECLARE_CLASS_7( name, incref, argt1, argt2, argt3, argt4, argt5, argt6, argt7 ) \ class wxPli##name:public wx##name \ { \ WXPLI_DECLARE_DYNAMIC_CLASS( wxPli##name ); \ WXPLI_DECLARE_SELFREF(); \ public: \ WXPLI_DEFAULT_CONSTRUCTOR( wxPli##name, "Wx::" #name, incref ); \ WXPLI_CONSTRUCTOR_7( wxPli##name, "Wx::" #name, incref, \ argt1, argt2, argt3, argt4, argt5, argt6, \ argt7 ); \ }; #define WXPLI_DECLARE_CLASS_8( name, incref, argt1, argt2, argt3, argt4, argt5, argt6, argt7, argt8 ) \ class wxPli##name:public wx##name \ { \ WXPLI_DECLARE_DYNAMIC_CLASS( wxPli##name ); \ WXPLI_DECLARE_SELFREF(); \ public: \ WXPLI_DEFAULT_CONSTRUCTOR( wxPli##name, "Wx::" #name, incref ); \ WXPLI_CONSTRUCTOR_8( wxPli##name, "Wx::" #name, incref, \ argt1, argt2, argt3, argt4, argt5, argt6, \ argt7, argt8 ); \ }; #define WXPLI_DECLARE_CLASS_9( name, incref, argt1, argt2, argt3, argt4, argt5, argt6, argt7, argt8, argt9 ) \ class wxPli##name:public wx##name \ { \ WXPLI_DECLARE_DYNAMIC_CLASS( wxPli##name ); \ WXPLI_DECLARE_SELFREF(); \ public: \ WXPLI_DEFAULT_CONSTRUCTOR( wxPli##name, "Wx::" #name, incref ); \ WXPLI_CONSTRUCTOR_9( wxPli##name, "Wx::" #name, incref, \ argt1, argt2, argt3, argt4, argt5, argt6, \ argt7, argt8, argt9 ); \ }; #define WXPLI_DECLARE_CLASS_10( name, incref, argt1, argt2, argt3, argt4, argt5, argt6, argt7, argt8, argt9, argt10 ) \ class wxPli##name:public wx##name \ { \ WXPLI_DECLARE_DYNAMIC_CLASS( wxPli##name ); \ WXPLI_DECLARE_SELFREF(); \ public: \ WXPLI_DEFAULT_CONSTRUCTOR( wxPli##name, "Wx::" #name, incref ); \ WXPLI_CONSTRUCTOR_10( wxPli##name, "Wx::" #name, incref, \ argt1, argt2, argt3, argt4, argt5, argt6, \ argt7, argt8, argt9, argt10 ); \ }; #define WXPLI_DEFINE_CLASS( name ) \ WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPli##name, wx##name ); typedef SV SV_null; // equal to SV except that maps C++ 0 <-> Perl undef // helpers for declaring event macros struct wxPliEventDescription { const char* name; // 2 - only THIS and function // 3 - THIS, function, one ID // 4 - THIS, function, two ids // 5 - THIS, function, two ids, event id unsigned char args; int evtID; }; #define wxPli_StdEvent( NAME, ARGS ) { #NAME, ARGS, wx##NAME }, #define wxPli_Event( NAME, ARGS, ID ) { #NAME, ARGS, ID }, #endif // __CPP_HELPERS_H #if defined( _WX_CLNTDATAH__ ) #ifndef __CPP_HELPERS_H_UDCD #define __CPP_HELPERS_H_UDCD class wxPliUserDataCD : public wxClientData { public: wxPliUserDataCD( SV* data ) { dTHX; m_data = data ? newSVsv( data ) : NULL; } ~wxPliUserDataCD() { dTHX; SvREFCNT_dec( m_data ); } SV* GetData() { return m_data; } private: SV* m_data; }; typedef wxPliUserDataCD Wx_UserDataCD; #endif // __CPP_HELPERS_H_UDCD #endif // defined( _WX_CLNTDATAH__ ) #if defined( _WX_TREEBASE_H_ ) || defined( _WX_TREECTRL_H_BASE_ ) #ifndef __CPP_HELPERS_H_TID #define __CPP_HELPERS_H_TID class wxPliTreeItemData:public wxTreeItemData { public: wxPliTreeItemData( SV* data ) : m_data( NULL ) { SetData( data ); } ~wxPliTreeItemData() { SetData( NULL ); } void SetData( SV* data ) { dTHX; if( m_data ) SvREFCNT_dec( m_data ); m_data = data ? newSVsv( data ) : NULL; } public: SV* m_data; }; #endif // __CPP_HELPERS_H_TID #endif // defined( _WX_TREEBASE_H_ ) || defined( _WX_TREECTRL_H_BASE_ ) // Local variables: // mode: c++ // End: Wx-0.9923/cpp/log.h000664000000000000 1102612306612226 12215 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/log.h // Purpose: c++ wrapper for wxLog and wxLogPassThrough // Author: Mattia Barbon // Modified by: // Created: 22/09/2002 // RCS-ID: $Id: log.h 3402 2012-10-01 11:18:15Z mdootson $ // Copyright: (c) 2002-2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include class wxPlLog : public wxLog { // WXPLI_DECLARE_DYNAMIC_CLASS( wxPlLog ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR_NC( wxPlLog, "Wx::PlLog", true ); #if WXPERL_W_VERSION_LT( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 DEC_V_CBACK_VOID__CWXCHARP_TIMET( DoLogString ); DEC_V_CBACK_VOID__WXLOGLEVEL_CWXCHARP_TIMET( DoLog ); #endif DEC_V_CBACK_VOID__VOID( Flush ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEC_V_CBACK_VOID__WXLOGLEVEL_WXSTRING_WXLOGRECORDINFO( DoLogRecord ); DEC_V_CBACK_VOID__WXLOGLEVEL_WXSTRING( DoLogTextAtLevel ); DEC_V_CBACK_VOID__WXSTRING( DoLogText ); #endif }; #if WXPERL_W_VERSION_LT( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 DEF_V_CBACK_VOID__CWXCHARP_TIMET( wxPlLog, wxLog, DoLogString ); DEF_V_CBACK_VOID__WXLOGLEVEL_CWXCHARP_TIMET( wxPlLog, wxLog, DoLog ); #endif DEF_V_CBACK_VOID__VOID( wxPlLog, wxLog, Flush ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEF_V_CBACK_VOID__WXLOGLEVEL_WXSTRING_WXLOGRECORDINFO( wxPlLog, wxLog, DoLogRecord ); DEF_V_CBACK_VOID__WXLOGLEVEL_WXSTRING( wxPlLog, wxLog, DoLogTextAtLevel ); DEF_V_CBACK_VOID__WXSTRING( wxPlLog, wxLog, DoLogText ); #endif class wxPlLogPassThrough : public wxLogPassThrough { // WXPLI_DECLARE_DYNAMIC_CLASS( wxPlLogPassThrough ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR_NC( wxPlLogPassThrough, "Wx::PlLogPassThrough", true ); #if WXPERL_W_VERSION_LT( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 DEC_V_CBACK_VOID__CWXCHARP_TIMET( DoLogString ); DEC_V_CBACK_VOID__WXLOGLEVEL_CWXCHARP_TIMET( DoLog ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEC_V_CBACK_VOID__WXLOGLEVEL_WXSTRING_WXLOGRECORDINFO( DoLogRecord ); DEC_V_CBACK_VOID__WXLOGLEVEL_WXSTRING( DoLogTextAtLevel ); DEC_V_CBACK_VOID__WXSTRING( DoLogText ); #endif }; #if WXPERL_W_VERSION_LT( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 DEF_V_CBACK_VOID__CWXCHARP_TIMET( wxPlLogPassThrough, wxLogPassThrough, DoLogString ); DEF_V_CBACK_VOID__WXLOGLEVEL_CWXCHARP_TIMET( wxPlLogPassThrough, wxLogPassThrough, DoLog ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEF_V_CBACK_VOID__WXLOGLEVEL_WXSTRING_WXLOGRECORDINFO( wxPlLogPassThrough, wxLogPassThrough, DoLogRecord ); DEF_V_CBACK_VOID__WXLOGLEVEL_WXSTRING( wxPlLogPassThrough, wxLogPassThrough, DoLogTextAtLevel ); DEF_V_CBACK_VOID__WXSTRING( wxPlLogPassThrough, wxLogPassThrough, DoLogText ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) class wxPlLogFormatter : public wxLogFormatter { WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR_NC( wxPlLogFormatter, "Wx::PlLogFormatter", true ); wxString Format(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info) const; protected: wxString FormatTime(time_t t) const; }; wxString wxPlLogFormatter::Format(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info) const { dTHX; if( wxPliFCback( aTHX_ &m_callback, "Format" ) ) { wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, "IPq", level, &msg, &info, "Wx::LogRecordInfo" ) ); wxString val; WXSTRING_INPUT( val, wxString, ret ); return val; } else return wxLogFormatter::Format( level, msg, info ); } wxString wxPlLogFormatter::FormatTime(time_t t) const { dTHX; if( wxPliFCback( aTHX_ &m_callback, "FormatTime" ) ) { wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, "i", t) ); wxString val; WXSTRING_INPUT( val, wxString, ret ); return val; } else return wxLogFormatter::FormatTime( t ); } #endif // local variables: // mode: c++ // end: Wx-0.9923/cpp/overload.cpp000664000000000000 1464012306612226 13607 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/overload.cpp // Purpose: C++ implementation for a function to match a function's // argument list against a prototype // Author: Mattia Barbon // Modified by: // Created: 07/08/2002 // RCS-ID: $Id: overload.cpp 2953 2010-08-15 14:29:24Z mbarbon $ // Copyright: (c) 2002-2004, 2006-2007, 2010 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/overload.h" #if 0 class wxPliArgArray { public: virtual ~wxPliArgArray() {}; virtual SV* operator[]( size_t index ) = 0; virtual size_t GetCount() const = 0; }; class wxPliStackArray { public: wxPliStackArray(); private: SV*** sp; }; #endif bool wxPli_match_arguments_offset( pTHX_ const wxPliPrototype& prototype, int required, bool allow_more, size_t offset ); bool wxPli_match_arguments_skipfirst( pTHX_ const wxPliPrototype& prototype, int required /* = -1 */, bool allow_more /* = false */ ) { return wxPli_match_arguments_offset( aTHX_ prototype, required, allow_more, 1 ); } bool wxPli_match_arguments( pTHX_ const wxPliPrototype& prototype, int required /* = -1 */, bool allow_more /* = false */ ) { return wxPli_match_arguments_offset( aTHX_ prototype, required, allow_more, 0 ); } static inline bool IsGV( SV* sv ) { return SvTYPE( sv ) == SVt_PVGV; } bool wxPli_match_arguments_offset( pTHX_ const wxPliPrototype& prototype, int required, bool allow_more, size_t offset ) { dXSARGS; // restore the mark we implicitly popped in dMARK! int argc = items - int(offset); if( required != -1 ) { if( allow_more && argc < required ) { PUSHMARK(MARK); return false; } if( !allow_more && argc != required ) { PUSHMARK(MARK); return false; } } else if( argc < int(prototype.count) ) { PUSHMARK(MARK); return false; } size_t max = wxMin( prototype.count, size_t(argc) ) + offset; for( size_t i = offset; i < max; ++i ) { const char* p = prototype.args[i - offset]; // everything is a string or a boolean if( p == wxPliOvlstr || p == wxPliOvlbool ) continue; SV* t = ST(i); // want a number if( p == wxPliOvlnum ) { if( my_looks_like_number( aTHX_ t ) ) continue; else { PUSHMARK(MARK); return false; } } // want an object/package name, accept undef, too const char* cstr = p > wxPliOvlzzz ? p : p == wxPliOvlwpos ? "Wx::Position" : p == wxPliOvlwpoi ? "Wx::Point" : p == wxPliOvlwsiz ? "Wx::Size" : NULL; if( !IsGV( t ) && ( !SvOK( t ) || ( cstr != NULL && sv_isobject( t ) && sv_derived_from( t, CHAR_P cstr ) ) ) ) continue; // want an array reference if( p == wxPliOvlarr && wxPli_avref_2_av( t ) ) continue; // want a wxPoint/wxSize, accept an array reference, too if( ( p == wxPliOvlwpoi || p == wxPliOvlwsiz || p == wxPliOvlwpos ) && wxPli_avref_2_av( t ) ) continue; // want an input/output stream, accept any reference if( ( p == wxPliOvlwist || p == wxPliOvlwost ) && ( SvROK( t ) || IsGV( t ) ) ) continue; // type clash: return false PUSHMARK(MARK); return false; } PUSHMARK(MARK); return true; } void wxPli_set_ovl_constant( const char* name, const wxPliPrototype* value ) { dTHX; char buffer[1024]; strcpy( buffer, "Wx::_" ); strcat( buffer, name ); SV* sv = get_sv( buffer, 1 ); sv_setiv( sv, PTR2IV( value ) ); } static const char *overload_descriptions[] = { NULL, "array", "boolean", "number", "string/scalar", "input stream", "output stream", "Wx::Point/array", "Wx::Position/array", "Wx::Size/array" }; void wxPli_overload_error( pTHX_ const char* function, wxPliPrototype* prototypes[] ) { dXSARGS; // restore the mark we implicitly popped in dMARK! SV* message = newSVpv( "Availble methods:\n", 0 ); sv_2mortal( message ); for( int j = 0; prototypes[j]; ++j ) { wxPliPrototype* p = prototypes[j]; sv_catpv( message, function ); sv_catpv( message, "(" ); for( int i = 0; i < p->count; ++i ) { if( p->args[i] < wxPliOvlzzz ) sv_catpv( message, overload_descriptions[wxUIntPtr(p->args[i])] ); else sv_catpv( message, p->args[i] ); if( i != p->count - 1 ) sv_catpv( message, ", " ); } sv_catpv( message, ")\n" ); } sv_catpvf( message, "unable to resolve overload for %s(", function ); for( size_t i = 1; i < items; ++i ) { SV* t = ST(i); const char* type; if( !SvOK( t ) ) type = "undef"; else if( sv_isobject( t ) ) type = HvNAME( SvSTASH( SvRV( t ) ) ); else if( SvROK( t ) ) { SV* r = SvRV( t ); if( SvTYPE( r ) == SVt_PVAV ) type = "array"; else if( SvTYPE( r ) == SVt_PVHV ) type = "hash"; else type = "reference"; } else if( IsGV( t ) ) type = "glob/handle"; else if( my_looks_like_number( aTHX_ t ) ) type = "number"; else type = "scalar"; sv_catpv( message, type ); if( i != items - 1 ) sv_catpv( message, ", " ); } sv_catpv( message, ")" ); PUSHMARK(MARK); // probably not necessary require_pv( "Carp.pm" ); const char* argv[2]; argv[0] = SvPV_nolen( message ); argv[1] = NULL; call_argv( "Carp::croak", G_VOID|G_DISCARD, (char**) argv ); \ } Wx-0.9923/cpp/overload.h000664000000000000 673012306612226 13235 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/overload.h // Purpose: C++ code to redispatch a function based on function argument // types // Author: Mattia Barbon // Modified by: // Created: 11/08/2002 // RCS-ID: $Id: overload.h 2953 2010-08-15 14:29:24Z mbarbon $ // Copyright: (c) 2002, 2004, 2006-2007, 2010 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/ovl_const.h" #define wxPliOvlarr ((const char*)1) #define wxPliOvlbool ((const char*)2) #define wxPliOvlnum ((const char*)3) #define wxPliOvlstr ((const char*)4) #define wxPliOvlwist ((const char*)5) #define wxPliOvlwost ((const char*)6) #define wxPliOvlwpoi ((const char*)7) #define wxPliOvlwpos ((const char*)8) #define wxPliOvlwsiz ((const char*)9) #define wxPliOvlzzz ((const char*)10) #define BEGIN_OVERLOAD() \ PUSHMARK(MARK); \ int count; \ if( false ); #define END_OVERLOAD( FUNCTION ) \ else \ { \ static const char msg[] = "unable to resolve overloaded method for "; \ require_pv( "Carp.pm" ); \ const char* argv[3]; argv[0] = msg; argv[1] = #FUNCTION; argv[2] = 0; \ call_argv( "Carp::croak", G_VOID|G_DISCARD, (char**) argv ); \ } #define END_OVERLOAD_MESSAGE( FUNCTION, PROTOTYPES ) \ else \ wxPli_overload_error( aTHX_ #FUNCTION, PROTOTYPES ); #define REDISPATCH( NEW_METHOD_NAME ) \ count = call_method( #NEW_METHOD_NAME, GIMME_V ); SPAGAIN #define REDISPATCH_FUNCTION( NEW_METHOD_NAME ) \ count = call_pv( #NEW_METHOD_NAME, GIMME_V ); SPAGAIN #define MATCH_VOIDM_REDISP( METHOD ) \ else if( items == 1 ) \ { REDISPATCH( METHOD ); } #define MATCH_ANY_REDISP( METHOD ) \ else if( true ) \ { REDISPATCH( METHOD ); } #define MATCH_REDISP( PROTO, METHOD ) \ else if( wxPli_match_arguments_skipfirst( aTHX_ PROTO, \ -1, false ) ) \ { REDISPATCH( METHOD ); } #define MATCH_REDISP_COUNT( PROTO, METHOD, REQUIRED ) \ else if( wxPli_match_arguments_skipfirst( aTHX_ PROTO, \ REQUIRED, false ) ) \ { REDISPATCH( METHOD ); } #define MATCH_REDISP_COUNT_ALLOWMORE( PROTO, METHOD, REQUIRED ) \ else if( wxPli_match_arguments_skipfirst( aTHX_ PROTO, \ REQUIRED, true ) ) \ { REDISPATCH( METHOD ); } /* used for overloading static functions, see GraphicsContext.xs for an example */ #define MATCH_REDISP_FUNCTION( PROTO, METHOD ) \ else if( wxPli_match_arguments( aTHX_ PROTO, \ -1, false ) ) \ { REDISPATCH_FUNCTION( METHOD ); } #define MATCH_REDISP_COUNT_FUNCTION( PROTO, METHOD, REQUIRED ) \ else if( wxPli_match_arguments( aTHX_ PROTO, \ REQUIRED, false ) ) \ { REDISPATCH_FUNCTION( METHOD ); } #define MATCH_REDISP_COUNT_ALLOWMORE_FUNCTION( PROTO, METHOD, REQUIRED ) \ else if( wxPli_match_arguments( aTHX_ PROTO, \ REQUIRED, true ) ) \ { REDISPATCH_FUNCTION( METHOD ); } #define MATCH_VOIDM_REDISP_FUNCTION( METHOD ) \ else if( items == 0 ) \ { REDISPATCH_FUNCTION( METHOD ); } Wx-0.9923/cpp/panel.h000664000000000000 253612306612226 12521 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/panel.h // Purpose: c++ wrapper for wxPanel // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: panel.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2000-2001, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// class wxPliPanel:public wxPanel { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliPanel ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPliPanel, "Wx::Panel", true ); WXPLI_CONSTRUCTOR_6( wxPliPanel, "Wx::Panel", true, wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long, const wxString& ); DEC_V_CBACK_BOOL__VOID( TransferDataFromWindow ); DEC_V_CBACK_BOOL__VOID( TransferDataToWindow ); DEC_V_CBACK_BOOL__VOID( Validate ); }; DEF_V_CBACK_BOOL__VOID( wxPliPanel, wxPanel, TransferDataFromWindow ); DEF_V_CBACK_BOOL__VOID( wxPliPanel, wxPanel, TransferDataToWindow ); DEF_V_CBACK_BOOL__VOID( wxPliPanel, wxPanel, Validate ); WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliPanel, wxPanel ); // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/process.h000664000000000000 305612306612226 13076 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/process.h // Purpose: C++ wrapper for wxProcess // Author: Mattia Barbon // Modified by: // Created: 11/02/2002 // RCS-ID: $Id: process.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2002, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// class wxPliProcess:public wxProcess { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliProcess ); WXPLI_DECLARE_V_CBACK(); public: wxPliProcess( const char* package, wxEvtHandler* parent, int id ); virtual void OnTerminate( int pid, int status ); }; inline wxPliProcess::wxPliProcess( const char* package, wxEvtHandler* parent, int id ) : wxProcess( parent, id ), m_callback( "Wx::Process" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } void wxPliProcess::OnTerminate( int pid, int status ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnTerminate" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "ii", pid, status ); } else wxProcess::OnTerminate( pid, status ); } WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliProcess, wxProcess ); // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/scrolledwindow.h000664000000000000 317012306612225 14453 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/scrolledwindow.h // Purpose: c++ wrapper for wxScrolledWindow // Author: Mattia Barbon // Modified by: // Created: 02/12/2000 // RCS-ID: $Id: scrolledwindow.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2000-2002, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// class wxPliScrolledWindow:public wxScrolledWindow { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliScrolledWindow ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPliScrolledWindow, "Wx::ScrolledWindow", true ); WXPLI_CONSTRUCTOR_6( wxPliScrolledWindow, "Wx::ScrolledWindow", true, wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long, const wxString& ); void OnDraw( wxDC& dc ); }; void wxPliScrolledWindow::OnDraw( wxDC& dc ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnDraw" ) ) { SV* val = wxPli_object_2_sv( aTHX_ newSViv( 0 ), &dc ); wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "S", val ); sv_setiv( SvRV( val ), 0 ); SvREFCNT_dec( val ); } else wxScrolledWindow::OnDraw( dc ); } WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliScrolledWindow, wxScrolledWindow ); // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/singlechoicedialog.h000664000000000000 374712306612226 15243 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/singlechoicedialog.h // Purpose: c++ wrapper for wxSingleChoiceDialog // Author: Mattia Barbon // Modified by: // Created: 11/02/2001 // RCS-ID: $Id: singlechoicedialog.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2001-2002 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// // increments reference count of client data upon construction, // and decrements it upon destruction class wxPliSingleChoiceDialog:public wxSingleChoiceDialog { public: wxPliSingleChoiceDialog( wxWindow* parent, const wxString& message, const wxString& caption, int n, const wxString* choices, SV** clientdata, long style, const wxPoint& pos ); ~wxPliSingleChoiceDialog(); private: SV** m_data; int m_num; }; inline wxPliSingleChoiceDialog::wxPliSingleChoiceDialog ( wxWindow* parent, const wxString& message, const wxString& caption, int n, const wxString* choices, SV** clientdata, long style, const wxPoint& pos ) :wxSingleChoiceDialog( parent, message, caption, n, choices, (char**)clientdata, style, pos ), m_data(0) { dTHX; if( clientdata ) { int i; for( i = 0; i < n; ++i ) { SvREFCNT_inc( clientdata[i] ); } m_data = new SV*[ n ]; m_num = n; memcpy( m_data, clientdata, n * sizeof( SV* ) ); } } inline wxPliSingleChoiceDialog::~wxPliSingleChoiceDialog() { dTHX; if( m_data ) { int i; for( i = 0; i < m_num; ++i ) { SvREFCNT_dec( m_data[i] ); } delete[] m_data; } } // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/sizer.h000664000000000000 327512306612225 12556 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/sizer.h // Purpose: c++ wrapper for wxSizers // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: sizer.h 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 ///////////////////////////////////////////////////////////////////////////// #if WXPERL_W_VERSION_LT( 2, 5, 1 ) || !WXWIN_COMPATIBILITY_2_4 #if WXPERL_W_VERSION_LT( 2, 5, 4 ) #define wxBookCtrlBase wxBookCtrl #endif #include "cpp/wxsizer.h" #endif class wxPlSizer:public wxSizer { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlSizer ); WXPLI_DECLARE_V_CBACK(); public: wxPlSizer( const char* package ); DEC_V_CBACK_VOID__VOID( RecalcSizes ); virtual wxSize CalcMin(); }; inline wxPlSizer::wxPlSizer( const char* package ) :m_callback( "Wx::PlSizer" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } DEF_V_CBACK_VOID__VOID_pure( wxPlSizer, wxSizer, RecalcSizes ) wxSize wxPlSizer::CalcMin() { static wxSize ret( 0, 0 ); dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "CalcMin" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, NULL ); wxSize* val = (wxSize*)wxPli_sv_2_object( aTHX_ ret, "Wx::Size" ); SvREFCNT_dec( ret ); return *val; } return ret; } WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlSizer, wxSizer ); // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/streams.cpp000664000000000000 2072412306612226 13452 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/streams.cpp // Purpose: implementation for streams.h // Author: Mattia Barbon // Modified by: // Created: 30/03/2001 // RCS-ID: $Id: streams.cpp 3128 2011-11-21 20:54:27Z mdootson $ // Copyright: (c) 2001-2002, 2004, 2006-2007, 2009 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #if WXPERL_W_VERSION_GE( 2, 5, 3 ) typedef wxFileOffset wxPliFileOffset; #else typedef off_t wxPliFileOffset; #endif // thread KO const char sub_read[] = "sub { read $_[0], $_[1], $_[2] }"; const char sub_seek[] = "sub { seek $_[0], $_[1], $_[2]; tell $_[0] }"; const char sub_tell[] = "sub { tell $_[0] }"; const char sub_write[] = "sub { print { $_[0] } $_[1] }"; // for an open filehandle to a real file, fileno returns a filenumber // and we use stat to get the file length. // If fileno returns undef, $fh may be a scalar tied via IO::Scalar // or IO::String. We test for that and return length of tied scalar. // If fileno returns -1, then $fh maybe a handle provided by PerlIO // scalar layer so we see if we can get the length with seek & tell const char sub_length[] = "sub { \ local $@; \ my $rval = -1; \ my $fn = eval { fileno( $_[0] ) }; \ if( !defined($fn) ) { \ eval { \ if( $_[0]->can('sref') ) { \ use bytes; \ $rval = length( ${ $_[0]->sref } ); \ } \ }; \ } elsif( $fn != -1 ) { \ $rval = (stat $_[0])[7]; \ } else { \ eval { \ my $curpos = tell($_[0]); \ if( ( $curpos != -1) && seek($_[0],0,2) ) { \ $rval = tell($_[0]); \ seek($_[0],$curpos,0); \ } \ }; \ } \ return $rval; \ }"; SV* sg_read; SV* sg_seek; SV* sg_tell; SV* sg_write; SV* sg_length; class wxPliStreamInitializer { public: wxPliStreamInitializer() { dTHX; sg_read = eval_pv( CHAR_P sub_read, 1 ); sg_seek = eval_pv( CHAR_P sub_seek, 1 ); sg_tell = eval_pv( CHAR_P sub_tell, 1 ); sg_write = eval_pv( CHAR_P sub_write, 1 ); sg_length = eval_pv( CHAR_P sub_length, 1 ); SvREFCNT_inc( sg_read ); SvREFCNT_inc( sg_seek ); SvREFCNT_inc( sg_tell ); SvREFCNT_inc( sg_write ); SvREFCNT_inc( sg_length ); } ~wxPliStreamInitializer() { // SvREFCNT_dec( sg_read ); // SvREFCNT_dec( sg_seek ); // SvREFCNT_dec( sg_tell ); // SvREFCNT_dec( sg_write ); } }; wxPliStreamInitializer dummy; // helpers wxPliFileOffset stream_seek( wxStreamBase* stream, SV* fh, wxPliFileOffset seek, wxSeekMode mode ); wxPliFileOffset stream_tell( const wxStreamBase* stream, SV* fh ); wxPliFileOffset stream_length( const wxStreamBase* stream, SV* fh ); // input stream wxPliInputStream* wxPliInputStream_ctor( SV* sv ) { return new wxPliInputStream( sv ); } wxPliOutputStream* wxPliOutputStream_ctor( SV* sv ) { return new wxPliOutputStream( sv ); } wxPliInputStream::wxPliInputStream( SV* fh ) :m_fh( fh ) { dTHX; SvREFCNT_inc( m_fh ); } wxPliInputStream::wxPliInputStream( const wxPliInputStream& stream ) :m_fh( stream.m_fh ) { dTHX; SvREFCNT_inc( m_fh ); } const wxPliInputStream& wxPliInputStream::operator = ( const wxPliInputStream& stream ) { dTHX; if( m_fh ) SvREFCNT_dec( m_fh ); m_fh = stream.m_fh; SvREFCNT_inc( m_fh ); return *this; } wxPliInputStream::~wxPliInputStream() { dTHX; SvREFCNT_dec( m_fh ); } size_t wxPliInputStream::OnSysRead( void* buffer, size_t size ) { //FIXME// need a ( safe ) way to: create an SV, set ( NOT copy ) //FIXME// buffer into it, then call sg_read dTHX; dSP; ENTER; SAVETMPS; SV* target = sv_2mortal( newSVsv( &PL_sv_undef ) ); PUSHMARK( SP ); XPUSHs( m_fh ); XPUSHs( target ); XPUSHs( sv_2mortal( newSVuv( size ) ) ); PUTBACK; call_sv( sg_read, G_SCALAR ); SPAGAIN; SV* sv_read_count = POPs; size_t read_count = 0; m_lasterror = wxSTREAM_NO_ERROR; if( !SvOK( sv_read_count ) ) m_lasterror = wxSTREAM_READ_ERROR; else { read_count = SvOK( target ) ? SvUV( sv_read_count ) : 0; if( !read_count ) m_lasterror = wxSTREAM_EOF; } PUTBACK; if( read_count ) memcpy( buffer, SvPV_nolen( target ), read_count ); FREETMPS; LEAVE; return read_count; } wxPliFileOffset wxPliInputStream::OnSysSeek( wxPliFileOffset seek, wxSeekMode mode ) { return stream_seek( this, m_fh, seek, mode ); } wxPliFileOffset wxPliInputStream::OnSysTell() const { return stream_tell( this, m_fh ); } wxFileOffset wxPliInputStream::GetLength() const { return stream_length( this, m_fh ); } size_t wxPliInputStream::GetSize() const { wxFileOffset length = stream_length( this, m_fh ); if ( length == (wxFileOffset)wxInvalidOffset ) return 0; const size_t len = wx_truncate_cast(size_t, length); return len; } // output stream wxPliOutputStream::wxPliOutputStream( SV* fh ) :m_fh( fh ) { dTHX; SvREFCNT_inc( m_fh ); } wxPliOutputStream::wxPliOutputStream( const wxPliOutputStream& stream ) :m_fh( stream.m_fh ) { dTHX; SvREFCNT_inc( m_fh ); } const wxPliOutputStream& wxPliOutputStream::operator = ( const wxPliOutputStream& stream ) { dTHX; if( m_fh ) SvREFCNT_dec( m_fh ); m_fh = stream.m_fh; SvREFCNT_inc( m_fh ); return *this; } wxPliOutputStream::~wxPliOutputStream() { dTHX; SvREFCNT_dec( m_fh ); } size_t wxPliOutputStream::OnSysWrite( const void* buffer, size_t size ) { //FIXME// need a ( safe ) way to: create an SV, set ( NOT copy ) //FIXME// buffer into it, then call sg_write // printf( "OnSysWrite: %x %d = ", buffer, size ); dTHX; dSP; ENTER; SAVETMPS; SV* target = sv_2mortal( newSVpvn( CHAR_P ( const char*)buffer, size ) ); PUSHMARK( SP ); XPUSHs( m_fh ); XPUSHs( target ); XPUSHs( sv_2mortal( newSVuv( size ) ) ); PUTBACK; call_sv( sg_write, G_SCALAR ); SPAGAIN; SV* sv_write_count = POPs; size_t write_count = 0; m_lasterror = wxSTREAM_NO_ERROR; if( !SvOK( sv_write_count ) ) m_lasterror = wxSTREAM_WRITE_ERROR; else { write_count = SvUV( sv_write_count ); } PUTBACK; FREETMPS; LEAVE; // printf( "%d\n", write_count );fflush( stdout ); // OnSysSeek( 0, wxFromCurrent ); return write_count; } wxPliFileOffset wxPliOutputStream::OnSysSeek( wxPliFileOffset seek, wxSeekMode mode ) { return stream_seek( this, m_fh, seek, mode ); } wxPliFileOffset wxPliOutputStream::OnSysTell() const { return stream_tell( this, m_fh ); } wxFileOffset wxPliOutputStream::GetLength() const { return stream_length( this, m_fh ); } size_t wxPliOutputStream::GetSize() const { wxFileOffset length = stream_length( this, m_fh ); if ( length == (wxFileOffset)wxInvalidOffset ) return 0; const size_t len = wx_truncate_cast(size_t, length); return len; } // helpers wxPliFileOffset stream_seek( wxStreamBase* stream, SV* fh, wxPliFileOffset seek, wxSeekMode mode ) { IV pl_act; switch( mode ) { case wxFromStart: pl_act = 0; break; case wxFromCurrent: pl_act = 1; break; case wxFromEnd: pl_act = 2; break; default: return -1; } dTHX; dSP; ENTER; SAVETMPS; PUSHMARK( SP ); XPUSHs( fh ); XPUSHs( sv_2mortal( newSViv( seek ) ) ); XPUSHs( sv_2mortal( newSViv( pl_act ) ) ); PUTBACK; call_sv( sg_seek, G_SCALAR ); SPAGAIN; IV ret = POPi; PUTBACK; FREETMPS; LEAVE; return ret; } wxPliFileOffset stream_tell( const wxStreamBase* stream, SV* fh ) { dTHX; dSP; ENTER; SAVETMPS; PUSHMARK( SP ); XPUSHs( fh ); PUTBACK; call_sv( sg_tell, G_SCALAR ); SPAGAIN; IV ret = POPi; PUTBACK; FREETMPS; LEAVE; return ret; } wxPliFileOffset stream_length( const wxStreamBase* stream, SV* fh ) { dTHX; dSP; ENTER; SAVETMPS; PUSHMARK( SP ); XPUSHs( fh ); PUTBACK; call_sv( sg_length, G_SCALAR ); SPAGAIN; IV ret = POPi; PUTBACK; FREETMPS; LEAVE; return ret == -1 ? ~0 : ret; } Wx-0.9923/cpp/streams.h000664000000000000 426712306612226 13103 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/streams.h // Purpose: wrappers to pass streams from Perl to wxWidgets // (see also XS/Streams.xs) // Author: Mattia Barbon // Modified by: // Created: 30/03/2001 // RCS-ID: $Id: streams.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2001-2002, 2004, 2006 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #ifndef _WXPERL_STREAMS_H #define _WXPERL_STREAMS_H #include // for wxWidgets use: store a Perl object and // read from/write to it using wxWidgets functions class wxPliInputStream:public wxInputStream { public: wxPliInputStream():m_fh( 0 ) {} wxPliInputStream( SV* fh ); wxPliInputStream( const wxPliInputStream& stream ); ~wxPliInputStream(); const wxPliInputStream& operator =( const wxPliInputStream& stream ); protected: wxFileOffset GetLength() const; size_t OnSysRead( void* buffer, size_t bufsize ); size_t GetSize() const; #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode); wxFileOffset OnSysTell() const; #else off_t OnSysSeek(off_t seek, wxSeekMode mode); off_t OnSysTell() const; #endif protected: SV* m_fh; }; class wxPliOutputStream:public wxOutputStream { public: wxPliOutputStream():m_fh( 0 ) {} wxPliOutputStream( SV* fh ); wxPliOutputStream( const wxPliOutputStream& stream ); ~wxPliOutputStream(); const wxPliOutputStream& operator = ( const wxPliOutputStream& stream ); protected: wxFileOffset GetLength() const; size_t OnSysWrite( const void* buffer, size_t size ); size_t GetSize() const; #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxFileOffset OnSysSeek(wxFileOffset seek, wxSeekMode mode); wxFileOffset OnSysTell() const; #else off_t OnSysSeek(off_t seek, wxSeekMode mode); off_t OnSysTell() const; #endif protected: SV* m_fh; }; #endif // _WXPERL_STREAMS_H // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/timer.h000664000000000000 254712306612226 12544 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/timer.h // Purpose: C++ wrapper for wxTimer // Author: Mattia Barbon // Modified by: // Created: 14/02/2001 // RCS-ID: $Id: timer.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2001-2002, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// class wxPliTimer:public wxTimer { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliTimer ); WXPLI_DECLARE_V_CBACK(); public: wxPliTimer( const char* package ); wxPliTimer( const char* package, wxEvtHandler* owner, int id ); DEC_V_CBACK_VOID__VOID( Notify ); }; inline wxPliTimer::wxPliTimer( const char* package ) :m_callback( "Wx::Timer" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } inline wxPliTimer::wxPliTimer( const char* package, wxEvtHandler* owner, int id ) :wxTimer( owner, id ), m_callback( "Wx::Timer" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } DEF_V_CBACK_VOID__VOID( wxPliTimer, wxTimer, Notify ); WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliTimer, wxTimer ); // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/tipprovider.h000664000000000000 253612306612226 13771 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/tipprovider.h // Purpose: C++ wrapper for wxTipProvider // Author: Mattia Barbon // Modified by: // Created: 07/09/2001 // RCS-ID: $Id: tipprovider.h 2239 2007-10-07 19:16:59Z mbarbon $ // Copyright: (c) 2001-2002, 2007 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include class wxPliTipProvider:public wxTipProvider { WXPLI_DECLARE_V_CBACK(); public: wxPliTipProvider( const char* package, size_t currentTip ) :wxTipProvider( currentTip ), m_callback( "Wx::TipProvider" ) { dTHX; m_callback.SetSelf( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), this, package ) ); } void SetCurrentTip( size_t currentTip ) { m_currentTip = currentTip; } DEC_V_CBACK_WXSTRING__VOID( GetTip ); DEC_V_CBACK_WXSTRING__WXSTRING( PreprocessTip ); }; DEF_V_CBACK_WXSTRING__VOID_pure( wxPliTipProvider, wxTipProvider, GetTip ); DEF_V_CBACK_WXSTRING__WXSTRING( wxPliTipProvider, wxTipProvider, PreprocessTip ); // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/validators.h000664000000000000 456712306612226 13600 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/validators.h // Purpose: c++ wrapper for wxValidator, and wxPlValidator // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: validators.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2000-2002, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #ifndef _WXPERL_VALIDATORS_H #define _WXPERL_VALIDATORS_H class wxPlValidator:public wxValidator { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlValidator ); WXPLI_DECLARE_V_CBACK(); public: wxPlValidator( const char* package ); virtual wxObject* Clone() const; virtual bool Validate( wxWindow* ); DEC_V_CBACK_BOOL__VOID( TransferToWindow ); DEC_V_CBACK_BOOL__VOID( TransferFromWindow ); }; DEF_V_CBACK_BOOL__VOID( wxPlValidator, wxValidator, TransferToWindow ); DEF_V_CBACK_BOOL__VOID( wxPlValidator, wxValidator, TransferFromWindow ); inline wxPlValidator::wxPlValidator( const char* package ) :m_callback( "Wx::PlValidator" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } wxObject* wxPlValidator::Clone() const { dTHX; wxPlValidator* self = (wxPlValidator*)this; if( wxPliVirtualCallback_FindCallback( aTHX_ &self->m_callback, "Clone" ) ) { SV* ret = wxPliVirtualCallback_CallCallback ( aTHX_ &self->m_callback, G_SCALAR, NULL ); wxValidator* clone = (wxValidator*)wxPli_sv_2_object( aTHX_ ret, "Wx::Validator" ); SvREFCNT_dec( ret ); delete self; return clone; } return 0; } bool wxPlValidator::Validate( wxWindow* parent ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "Validate" ) ) { SV* ret = wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_SCALAR, "s", wxPli_object_2_sv( aTHX_ sv_newmortal(), parent ) ); bool val = SvTRUE( ret ); SvREFCNT_dec( ret ); return val; } else return wxValidator::Validate( parent ); } WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlValidator, wxValidator ); #endif // _WXPERL_VALIDATORS_H // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/v_cback.cpp000664000000000000 534112306612226 13342 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/v_cback.cpp // Purpose: implementation for v_cback.h // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: v_cback.cpp 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2000-2002, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// bool wxPliVirtualCallback::FindCallback( pTHX_ const char* name ) const { // it would be better to declare m_method & m_stash 'mutable' // but of course some C++ compiler don't support it... CV** pm_method = (CV**)&m_method; HV** pm_stash = (HV**)&m_stash; HV* pkg = 0; *pm_method = 0; pkg = SvSTASH( SvRV( m_self ) ); void* p_method = 0; if( pkg ) { GV* gv = gv_fetchmethod( pkg, CHAR_P name ); if( gv && isGV( gv ) ) // mortal, since CallCallback is called before we return to perl *pm_method = (CV*) ( p_method = GvCV( gv ) ); } if( !m_method ) return false; if( !m_stash ) *pm_stash = gv_stashpv( CHAR_P m_package, false ); if( !m_stash ) return true; void* p_pmethod = 0; GV* gv = gv_fetchmethod( m_stash, CHAR_P name ); if( gv && isGV( gv ) ) p_pmethod = GvCV( gv ); return p_method != p_pmethod; } SV* wxPliVirtualCallback::CallCallback( pTHX_ I32 flags, const char* argtypes, va_list& arglist ) const { if( !m_method ) return 0; dSP; ENTER; SAVETMPS; PUSHMARK( SP ); XPUSHs( m_self ); wxPli_push_args( aTHX_ &SP, argtypes, arglist ); PUTBACK; SV* method = sv_2mortal( newRV_inc( (SV*) m_method ) ); call_sv( method, flags ); SV* retval; if( ( flags & G_DISCARD ) == 0 ) { SPAGAIN; retval = POPs; SvREFCNT_inc( retval ); PUTBACK; } else retval = 0; FREETMPS; LEAVE; return retval; } bool wxPliVirtualCallback_FindCallback( pTHX_ const wxPliVirtualCallback* cb, const char* name ) { return cb->FindCallback( aTHX_ name ); } SV* wxPliVirtualCallback_CallCallback( pTHX_ const wxPliVirtualCallback* cb, I32 flags, const char* argtypes, ... ) { va_list arglist; va_start( arglist, argtypes ); SV* ret = cb->CallCallback( aTHX_ flags, argtypes, arglist ); va_end( arglist ); return ret; } // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/v_cback.h000664000000000000 12245512306612226 13055 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/v_cback.h // Purpose: callback helper class for virtual functions // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: v_cback.h 3402 2012-10-01 11:18:15Z mdootson $ // Copyright: (c) 2000-2007, 2009 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #ifndef _WXPERL_V_CBACK_H #define _WXPERL_V_CBACK_H #include class wxAutoSV { public: wxAutoSV( pTHX_ SV* sv ) : m_sv( sv ) #ifdef MULTIPLICITY , vTHX( aTHX ) #endif { } ~wxAutoSV() { SvREFCNT_dec( m_sv ); } operator SV*() { return m_sv; } operator const SV*() const { return m_sv; } operator bool() const { return m_sv != NULL; } bool operator !() const { return m_sv == NULL; } SV* operator->() { return m_sv; } const SV* operator->() const { return m_sv; } private: SV* m_sv; #ifdef MULTIPLICITY #undef register #define register pTHXx; #undef register #endif }; #define wxPliFCback wxPliVirtualCallback_FindCallback #define wxPliCCback wxPliVirtualCallback_CallCallback class wxPliVirtualCallback : public wxPliSelfRef { public: wxPliVirtualCallback( const char* package ); // these aren't really const functions, but we will need // to declare m_method mutable... bool FindCallback( pTHX_ const char* name ) const; SV* CallCallback( pTHX_ I32 flags, const char* argtypes, va_list& arglist ) const; CV* GetMethod() const { return m_method; } bool IsOk() const { return GetSelf() && m_package; } public: const char* m_package; HV* m_stash; CV* m_method; }; inline wxPliVirtualCallback::wxPliVirtualCallback( const char* package ) { m_package = package; m_self = 0; m_stash = 0; } // declare/define callbacks for commonly used signatures #define wxPli_NOCONST #define wxPli_CONST const #define wxPli_VOID #define DEC_V_CBACK_BOOL__WXDRAGRESULT( METHOD ) \ bool METHOD( wxDragResult ) #define DEF_V_CBACK_BOOL__WXDRAGRESULT( CLASS, BASE, METHOD ) \ bool CLASS::METHOD( wxDragResult p1 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, \ "i", p1 ); \ bool val = SvTRUE( ret ); \ SvREFCNT_dec( ret ); \ return val; \ } else \ return BASE::METHOD( p1 ); \ } #define DEC_V_CBACK_WXDRAGRESULT__WXCOORD_WXCOORD_WXDRAGRESULT( METHOD ) \ wxDragResult METHOD( wxCoord, wxCoord, wxDragResult ) #define DEF_V_CBACK_WXDRAGRESULT__WXCOORD_WXCOORD_WXDRAGRESULT( CLASS, BASE, METHOD ) \ wxDragResult CLASS::METHOD( wxCoord p1, wxCoord p2, wxDragResult p3 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, \ "lli", p1, p2, p3 ); \ wxDragResult val = (wxDragResult)SvIV( ret ); \ SvREFCNT_dec( ret ); \ return val; \ } else \ return BASE::METHOD( p1, p2, p3 ); \ } #define DEF_V_CBACK_WXDRAGRESULT__WXCOORD_WXCOORD_WXDRAGRESULT_pure( CLASS, BASE, METHOD ) \ wxDragResult CLASS::METHOD( wxCoord p1, wxCoord p2, \ wxDragResult p3 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, \ "lli", p1, p2, p3 ); \ wxDragResult val = (wxDragResult)SvIV( ret ); \ SvREFCNT_dec( ret ); \ return val; \ } else \ return wxDragNone; \ } #define DEC_V_CBACK_BOOL__WXCOORD_WXCOORD( METHOD ) \ bool METHOD( wxCoord, wxCoord ) #define DEF_V_CBACK_BOOL__WXCOORD_WXCOORD( CLASS, BASE, METHOD ) \ bool CLASS::METHOD( wxCoord p1, wxCoord p2 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, \ "ll", p1, p2 ); \ bool val = SvTRUE( ret ); \ SvREFCNT_dec( ret ); \ return val; \ } else \ return BASE::METHOD( p1, p2 ); \ } #define DEC_V_CBACK_BOOL__WXCOORD_WXCOORD_WXSTRING( METHOD ) \ bool METHOD( wxCoord, wxCoord, const wxString& ) #define DEF_V_CBACK_BOOL__WXCOORD_WXCOORD_WXSTRING_pure( CLASS, BASE, METHOD ) \ bool CLASS::METHOD( wxCoord p1, wxCoord p2, const wxString& p3 )\ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, \ "llP", p1, p2, &p3 ); \ bool val = SvTRUE( ret ); \ SvREFCNT_dec( ret ); \ return val; \ } else \ return false; \ } #define DEC_V_CBACK_BOOL__WXCOORD_WXCOORD_WXARRAYSTRING( METHOD ) \ bool METHOD( wxCoord, wxCoord, const wxArrayString& ) #define DEF_V_CBACK_BOOL__WXCOORD_WXCOORD_WXARRAYSTRING_pure( CLASS, BASE, METHOD )\ bool CLASS::METHOD( wxCoord p1, wxCoord p2, const wxArrayString& p3 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ AV* av = newAV(); \ size_t i, max = p3.GetCount(); \ \ for( i = 0; i < max; ++i ) \ { \ SV* sv = newSViv( 0 ); \ const wxString& tmp = p3[ i ]; \ WXSTRING_OUTPUT( tmp, sv ); \ av_store( av, i, sv ); \ } \ SV* rv = newRV_noinc( (SV*) av ); \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, \ "lls", p1, p2, rv ); \ bool val = SvTRUE( ret ); \ SvREFCNT_dec( ret ); \ return val; \ } else \ return false; \ } #define DEC_V_CBACK_WXSTRING__WXSTRING_INT( METHOD ) \ wxString METHOD( const wxString&, int ) #define DEC_V_CBACK_WXFSFILEP__WXFILESYSTEM_WXSTRING( METHOD ) \ wxFSFile* METHOD( wxFileSystem&, const wxString& ) #define DEC_V_CBACK_VOID__WXLOGLEVEL_WXSTRING_WXLOGRECORDINFO( METHOD ) \ void METHOD( wxLogLevel, const wxString&, const wxLogRecordInfo& ) #define DEF_V_CBACK_VOID__WXLOGLEVEL_WXSTRING_WXLOGRECORDINFO( CLASS, BASE, METHOD ) \ void CLASS::METHOD( wxLogLevel p1, const wxString& p2, const wxLogRecordInfo& p3 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_VOID, \ "iPq", int(p1), &p2, &p3, "Wx::LogRecordInfo" ); \ } \ BASE::METHOD( p1, p2, p3 ); \ } #define DEC_V_CBACK_VOID__WXLOGLEVEL_WXSTRING( METHOD ) \ void METHOD( wxLogLevel, const wxString& ) #define DEF_V_CBACK_VOID__WXLOGLEVEL_WXSTRING( CLASS, BASE, METHOD ) \ void CLASS::METHOD( wxLogLevel p1, const wxString& p2) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_VOID, \ "iP", int(p1), &p2); \ } \ BASE::METHOD( p1, p2 ); \ } #define DEC_V_CBACK_VOID__WXLOGLEVEL_CWXCHARP_TIMET( METHOD ) \ void METHOD( wxLogLevel, const wxChar*, time_t ) #define DEF_V_CBACK_VOID__WXLOGLEVEL_CWXCHARP_TIMET( CLASS, BASE, METHOD )\ void CLASS::METHOD( wxLogLevel p1, const wxChar* p2, time_t p3 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_VOID, \ "iwl", int(p1), p2, long(p3) ); \ } \ BASE::METHOD( p1, p2, p3 ); \ } #define DEC_V_CBACK_VOID__CWXCHARP_TIMET( METHOD ) \ void METHOD( const wxChar*, time_t ) #define DEF_V_CBACK_VOID__CWXCHARP_TIMET( CLASS, BASE, METHOD )\ void CLASS::METHOD( const wxChar* p1, time_t p2 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_VOID, \ "wl", p1, long(p2) ); \ } \ BASE::METHOD( p1, p2 ); \ } // ANY METH(int, int, int) #define DEC_V_CBACK_ANY__INT_INT_INT_( RET, METHOD, CONST ) \ RET METHOD( int, int, int ) CONST #define DEF_V_CBACK_ANY__INT_INT_INT_( RET, CVT, CLASS, CALLBASE, METHOD, CONST )\ RET CLASS::METHOD( int p1, int p2, int p3 ) CONST \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) )\ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, \ "iii", p1, p2, p3 ) ); \ return CVT; \ } else \ CALLBASE; \ } // bool METH(int, int, const wxString&) #define DEC_V_CBACK_BOOL__INT_INT_WXSTRING_( METHOD, CONST ) \ bool METHOD( int, int, const wxString& ) CONST #define DEF_V_CBACK_BOOL__INT_INT_WXSTRING_( CLASS, CALLBASE, METHOD, CONST )\ bool CLASS::METHOD( int p1, int p2, const wxString& p3 ) CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, \ "iiP", p1, p2, &p3 ) ); \ return SvTRUE( ret ); \ } else \ CALLBASE; \ } #define DEC_V_CBACK_BOOL__INT_INT_WXSTRING( METHOD ) \ DEC_V_CBACK_BOOL__INT_INT_WXSTRING_( METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_BOOL__INT_INT_WXSTRING( CLASS, BASE, METHOD ) \ DEF_V_CBACK_BOOL__INT_INT_WXSTRING_( CLASS, return BASE::METHOD(p1, p2, p3), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_BOOL__INT_INT_WXSTRING_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_BOOL__INT_INT_WXSTRING_( CLASS, return false, METHOD, wxPli_NOCONST ) // void METH(const wxString&) #define DEC_V_CBACK_VOID__WXSTRING( METHOD ) \ DEC_V_CBACK_ANY__WXSTRING_( void, METHOD, wxPli_NOCONST ) #define DEC_V_CBACK_VOID__WXSTRING_const( METHOD ) \ DEC_V_CBACK_ANY__WXSTRING_( void, METHOD, wxPli_CONST ) #define DEF_V_CBACK_VOID__WXSTRING( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__WXSTRING_( void, ;, CLASS, BASE::METHOD(p1), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__WXSTRING_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__WXSTRING_( void, ;, CLASS, return, METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__WXSTRING_const( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__WXSTRING_( void, ;, CLASS, BASE::METHOD(p1), METHOD, wxPli_CONST ) // bool METH(const wxString&) #define DEC_V_CBACK_BOOL__WXSTRING( METHOD ) \ DEC_V_CBACK_ANY__WXSTRING_( bool, METHOD, wxPli_NOCONST ) #define DEC_V_CBACK_BOOL__WXSTRING_const( METHOD ) \ DEC_V_CBACK_ANY__WXSTRING_( bool, METHOD, wxPli_CONST ) #define DEF_V_CBACK_BOOL__WXSTRING( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__WXSTRING_( bool, SvTRUE( ret ), CLASS, return BASE::METHOD(p1), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_BOOL__WXSTRING_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__WXSTRING_( bool, SvTRUE( ret ), CLASS, return false, METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_BOOL__WXSTRING_const( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__WXSTRING_( bool, SvTRUE( ret ), CLASS, return BASE::METHOD(p1), METHOD, wxPli_CONST ) // bool METH(wxObject*) #define DEF_V_CBACK_BOOL__WXOBJECTs_( T1, CLASS, CALLBASE, METHOD, CONST ) \ bool CLASS::METHOD( T1 p1 ) CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, \ G_SCALAR, "O", &p1 ) ); \ return SvTRUE( ret ); \ } else \ CALLBASE; \ } #define DEF_V_CBACK_BOOL__WXOBJECTsP_( T1, CLASS, CALLBASE, METHOD, CONST ) \ bool CLASS::METHOD( T1 p1 ) CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, \ G_SCALAR, "O", p1 ) ); \ return SvTRUE( ret ); \ } else \ CALLBASE; \ } // bool METH(wxString&) #define DEC_V_CBACK_BOOL__mWXSTRING_( METHOD, CONST ) \ bool METHOD(wxString&) CONST #define DEF_V_CBACK_BOOL__mWXSTRING_( CLASS, CALLBASE, METHOD, CONST ) \ bool CLASS::METHOD(wxString& p1) CONST \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, \ #METHOD ) ) \ { \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, "P", \ &p1 ); \ \ wxString tmp; \ WXSTRING_INPUT( tmp, const char *, ret ); \ p1 = tmp; \ \ bool val = SvTRUE( ret ); \ SvREFCNT_dec( ret ); \ return val; \ } \ else \ CALLBASE; \ } #define DEC_V_CBACK_BOOL__mWXSTRING( METHOD ) \ DEC_V_CBACK_BOOL__mWXSTRING_( METHOD, wxPli_NOCONST ) #define DEC_V_CBACK_BOOL__mWXSTRING_const( METHOD ) \ DEC_V_CBACK_BOOL__mWXSTRING_( METHOD, wxPli_CONST ) #define DEF_V_CBACK_BOOL__mWXSTRING( CLASS, BASE, METHOD ) \ DEF_V_CBACK_BOOL__mWXSTRING_( CLASS, return BASE::METHOD(p1), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_BOOL__mWXSTRING_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_BOOL__mWXSTRING_( CLASS, return false, METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_BOOL__mWXSTRING_const( CLASS, BASE, METHOD ) \ DEF_V_CBACK_BOOL__mWXSTRING_( CLASS, return BASE::METHOD(p1), METHOD, wxPli_CONST ) // ANY METH() #define DEC_V_CBACK_ANY__VOID_( RET, METHOD, CONST ) \ RET METHOD() CONST #define DEF_V_CBACK_ANY__VOID_( RET, CVT, CLASS, CALLBASE, METHOD, CONST ) \ RET CLASS::METHOD() CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, \ NULL ) ); \ return CVT; \ } \ else \ CALLBASE; \ } // void METH() #define DEC_V_CBACK_VOID__VOID_( METHOD, CONST ) \ void METHOD() CONST #define DEF_V_CBACK_VOID__VOID_( CLASS, CALLBASE, METHOD, CONST ) \ void CLASS::METHOD() CONST \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR|G_DISCARD, NULL ); \ } else \ CALLBASE; \ } #define DEC_V_CBACK_VOID__VOID( METHOD ) \ DEC_V_CBACK_VOID__VOID_( METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__VOID( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__VOID_( CLASS, BASE::METHOD(), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__VOID_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__VOID_( CLASS, return, METHOD, wxPli_NOCONST ) // void METH(int, int, bool) #define DEC_V_CBACK_VOID__INT_INT_BOOL_( METHOD, CONST ) \ void METHOD( int, int, bool ) CONST #define DEF_V_CBACK_VOID__INT_INT_BOOL_( CLASS, CALLBASE, METHOD, CONST )\ void CLASS::METHOD( int p1, int p2, bool p3 ) CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxPliCCback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "iib", \ p1, p2, p3 ); \ } else \ CALLBASE; \ } #define DEC_V_CBACK_VOID__INT_INT_BOOL( METHOD ) \ DEC_V_CBACK_VOID__INT_INT_BOOL_( METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__INT_INT_BOOL( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__INT_INT_BOOL_( CLASS, BASE::METHOD(p1, p2, p3), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__INT_INT_BOOL_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__INT_INT_BOOL_( CLASS, return, METHOD, wxPli_NOCONST ) // void METH(int, int, double) #define DEC_V_CBACK_VOID__INT_INT_DOUBLE_( METHOD, CONST ) \ void METHOD( int, int, double ) CONST #define DEF_V_CBACK_VOID__INT_INT_DOUBLE_( CLASS, CALLBASE, METHOD, CONST )\ void CLASS::METHOD( int p1, int p2, double p3 ) CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxPliCCback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "iid", \ p1, p2, p3 ); \ } else \ CALLBASE; \ } #define DEC_V_CBACK_VOID__INT_INT_DOUBLE( METHOD ) \ DEC_V_CBACK_VOID__INT_INT_DOUBLE_( METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__INT_INT_DOUBLE( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__INT_INT_DOUBLE_( CLASS, BASE::METHOD(p1, p2, p3), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__INT_INT_DOUBLE_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__INT_INT_DOUBLE_( CLASS, return, METHOD, wxPli_NOCONST ) // void METH(int, int, wxString) #define DEC_V_CBACK_VOID__INT_INT_WXSTRING_( METHOD, CONST ) \ void METHOD( int, int, const wxString& ) CONST #define DEF_V_CBACK_VOID__INT_INT_WXSTRING_( CLASS, CALLBASE, METHOD, CONST )\ void CLASS::METHOD( int p1, int p2, const wxString& p3 ) CONST \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) )\ { \ wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR|G_DISCARD, "iiP", \ p1, p2, &p3 ); \ } else \ CALLBASE; \ } #define DEC_V_CBACK_VOID__INT_INT_WXSTRING( METHOD ) \ DEC_V_CBACK_VOID__INT_INT_WXSTRING_( METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__INT_INT_WXSTRING( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__INT_INT_WXSTRING_( CLASS, BASE::METHOD(p1, p2, p3), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__INT_INT_WXSTRING_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__INT_INT_WXSTRING_( CLASS, return, METHOD, wxPli_NOCONST ) // void METH(int, const wxString&) #define DEC_V_CBACK_VOID__INT_WXSTRING_( METHOD, CONST ) \ void METHOD( int, const wxString& ) CONST #define DEF_V_CBACK_VOID__INT_WXSTRING_( CLASS, CALLBASE, METHOD, CONST )\ void CLASS::METHOD( int p1, const wxString& p2 ) CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxPliCCback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, \ "iP", p1, &p2 ); \ } else \ CALLBASE; \ } #define DEC_V_CBACK_VOID__INT_WXSTRING( METHOD ) \ DEC_V_CBACK_VOID__INT_WXSTRING_( METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__INT_WXSTRING( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__INT_WXSTRING_( CLASS, BASE::METHOD(p1, p2), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__INT_WXSTRING_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__INT_WXSTRING_( CLASS, return, METHOD, wxPli_NOCONST ) // void METH(wxGrid*) #define DEC_V_CBACK_VOID__WXGRID_( METHOD, CONST ) \ void METHOD( wxGrid* ) CONST #define DEF_V_CBACK_VOID__WXGRID_( CLASS, CALLBASE, METHOD, CONST ) \ DEF_V_CBACK_VOID__WXOBJECTsP_( wxGrid*, CLASS, CALLBASE, METHOD, CONST ) #define DEC_V_CBACK_VOID__WXGRID( METHOD ) \ DEC_V_CBACK_VOID__WXGRID_( METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__WXGRID( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__WXOBJECTsP_( wxGrid*, CLASS, BASE::METHOD(p1), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__WXGRID_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__WXOBJECTsP_( wxGrid*, CLASS, return, METHOD, wxPli_NOCONST ) // void METH(wxWindow*) #define DEC_V_CBACK_VOID__WXWINDOW_( METHOD, CONST ) \ void METHOD( wxWindow* ) CONST #define DEF_V_CBACK_VOID__WXWINDOW_( CLASS, CALLBASE, METHOD, CONST ) \ DEF_V_CBACK_VOID__WXOBJECTsP_( wxWindow*, CLASS, CALLBASE, METHOD, CONST ) #define DEC_V_CBACK_VOID__WXWINDOW( METHOD ) \ DEC_V_CBACK_VOID__WXWINDOW_( METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__WXWINDOW( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__WXOBJECTsP_( wxWindow*, CLASS, BASE::METHOD(p1), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__WXWINDOW_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__WXOBJECTsP_( wxWindow*, CLASS, return, METHOD, wxPli_NOCONST ) // bool METH(wxWindow*) #define DEC_V_CBACK_BOOL__WXWINDOW_( METHOD, CONST ) \ bool METHOD( wxWindow* ) CONST #define DEF_V_CBACK_BOOL__WXWINDOW_( CLASS, CALLBASE, METHOD, CONST ) \ DEF_V_CBACK_BOOL__WXOBJECTsP_( wxWindow*, CLASS, CALLBASE, METHOD, CONST ) #define DEC_V_CBACK_BOOL__WXWINDOW( METHOD ) \ DEC_V_CBACK_BOOL__WXWINDOW_( METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_BOOL__WXWINDOW( CLASS, BASE, METHOD ) \ DEF_V_CBACK_BOOL__WXOBJECTsP_( wxWindow*, CLASS, BASE::METHOD(p1), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_BOOL__WXWINDOW_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_BOOL__WXOBJECTsP_( wxWindow*, CLASS, return false, METHOD, wxPli_NOCONST ) // void METH(wxObject*) #define DEF_V_CBACK_VOID__WXOBJECTsP_( T1, CLASS, CALLBASE, METHOD, CONST ) \ void CLASS::METHOD( T1 p1 ) CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxPliCCback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "O", p1 ); \ } else \ CALLBASE; \ } // wxGrid* METH() #define DEC_V_CBACK_WXGRID__VOID_( METHOD, CONST ) \ wxGrid* METHOD() CONST #define DEF_V_CBACK_WXGRID__VOID_( CLASS, CALLBASE, METHOD, CONST ) \ DEF_V_CBACK_WXOBJECTsP__VOID_( wxGrid*, Wx::Grid, CLASS, CALLBASE, METHOD, CONST ) #define DEC_V_CBACK_WXGRID__VOID_const( METHOD ) \ DEC_V_CBACK_WXGRID__VOID_( METHOD, wxPli_CONST ) #define DEF_V_CBACK_WXGRID__VOID_const( CLASS, BASE, METHOD ) \ DEF_V_CBACK_WXGRID__VOID_( CLASS, return BASE::METHOD(), METHOD, wxPli_CONST ) // wxWindow* METH() #define DEC_V_CBACK_WXWINDOW__VOID_( METHOD, CONST ) \ wxWindow* METHOD() CONST #define DEF_V_CBACK_WXWINDOW__VOID_( CLASS, CALLBASE, METHOD, CONST ) \ DEF_V_CBACK_WXOBJECTsP__VOID_( wxWindow*, Wx::Window, CLASS, CALLBASE, METHOD, CONST ) #define DEC_V_CBACK_WXWINDOW__VOID( METHOD ) \ DEC_V_CBACK_WXWINDOW__VOID_( METHOD, wxPli_NOCONST ) #define DEC_V_CBACK_WXWINDOW__VOID_const( METHOD ) \ DEC_V_CBACK_WXWINDOW__VOID_( METHOD, wxPli_CONST ) #define DEF_V_CBACK_WXWINDOW__VOID_const( CLASS, BASE, METHOD ) \ DEF_V_CBACK_WXWINDOW__VOID_( CLASS, return BASE::METHOD(), METHOD, wxPli_CONST ) #define DEF_V_CBACK_WXWINDOW__VOID_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_WXWINDOW__VOID_( CLASS, return NULL, METHOD, wxPli_NOCONST ) // wxObject* METH() #define DEF_V_CBACK_WXOBJECTsP__VOID_( TR, TRC, CLASS, CALLBASE, METHOD, CONST )\ TR CLASS::METHOD() CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, \ NULL ) ); \ return (TR)wxPli_sv_2_object( aTHX_ ret, #TRC ); \ } else \ CALLBASE; \ } // wxString METH() #define DEC_V_CBACK_WXSTRING__VOID_( METHOD, CONST ) \ wxString METHOD() CONST #define DEF_V_CBACK_WXSTRING__VOID_( CLASS, CALLBASE, METHOD, CONST ) \ wxString CLASS::METHOD() CONST \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, NULL ); \ wxString val; \ WXSTRING_INPUT( val, wxString, ret ); \ SvREFCNT_dec( ret ); \ return val; \ } \ else \ CALLBASE; \ } #define DEC_V_CBACK_WXSTRING__VOID( METHOD ) \ DEC_V_CBACK_WXSTRING__VOID_( METHOD, wxPli_NOCONST ) #define DEC_V_CBACK_WXSTRING__VOID_const( METHOD ) \ DEC_V_CBACK_WXSTRING__VOID_( METHOD, wxPli_CONST ) #define DEF_V_CBACK_WXSTRING__VOID( CLASS, BASE, METHOD ) \ DEF_V_CBACK_WXSTRING__VOID_( CLASS, return BASE::METHOD(), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_WXSTRING__VOID_const( CLASS, BASE, METHOD ) \ DEF_V_CBACK_WXSTRING__VOID_( CLASS, return BASE::METHOD(), METHOD, wxPli_CONST ) #define DEF_V_CBACK_WXSTRING__VOID_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_WXSTRING__VOID_( CLASS, return wxEmptyString, METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_WXSTRING__VOID_const_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_WXSTRING__VOID_( CLASS, return wxEmptyString, METHOD, wxPli_CONST ) // wxString METH(int) #define DEC_V_CBACK_WXSTRING__INT_( METHOD, CONST ) \ wxString METHOD( int ) CONST #define DEF_V_CBACK_WXSTRING__INT_( CLASS, CALLBASE, METHOD, CONST ) \ wxString CLASS::METHOD( int p1 ) CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, \ "i", p1 ) ); \ wxString val; \ WXSTRING_INPUT( val, wxString, ret ); \ return val; \ } \ else \ CALLBASE; \ } #define DEC_V_CBACK_WXSTRING__INT( METHOD ) \ DEC_V_CBACK_WXSTRING__INT_( METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_WXSTRING__INT( CLASS, BASE, METHOD ) \ DEF_V_CBACK_WXSTRING__INT_( CLASS, return BASE::METHOD(p1), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_WXSTRING__INT_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_WXSTRING__INT_( CLASS, return wxEmptyString, METHOD, wxPli_NOCONST ) // wxString METH(int, int) #define DEC_V_CBACK_WXSTRING__INT_INT_( METHOD, CONST ) \ wxString METHOD( int, int ) CONST #define DEF_V_CBACK_WXSTRING__INT_INT_( CLASS, CALLBASE, METHOD, CONST ) \ wxString CLASS::METHOD( int p1, int p2 ) CONST \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) )\ { \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, "ii", \ p1, p2 ); \ wxString val; \ WXSTRING_INPUT( val, wxString, ret ); \ SvREFCNT_dec( ret ); \ return val; \ } \ else \ CALLBASE; \ } #define DEC_V_CBACK_WXSTRING__INT_INT( METHOD ) \ DEC_V_CBACK_WXSTRING__INT_INT_( METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_WXSTRING__INT_INT( CLASS, BASE, METHOD ) \ DEF_V_CBACK_WXSTRING__INT_INT_( CLASS, return BASE::METHOD(p1, p2), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_WXSTRING__INT_INT_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_WXSTRING__INT_INT_( CLASS, return wxEmptyString, METHOD, wxPli_NOCONST ) // ANY METH( wxKeyEvent& ) #define DEC_V_CBACK_ANY__WXKEYEVENT_( RET, METHOD, CONST ) \ RET METHOD( wxKeyEvent& event ) CONST #define DEF_V_CBACK_ANY__WXKEYEVENT_( RET, CVT, CLASS, CALLBASE, METHOD, CONST )\ RET CLASS::METHOD( wxKeyEvent& p1 ) CONST \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ SV* evt = wxPli_object_2_sv( aTHX_ newSViv( 0 ), &p1 ); \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, \ "S", evt ) ); \ sv_setiv( SvRV( evt ), 0 ); \ SvREFCNT_dec( evt ); \ return CVT; \ } else \ CALLBASE; \ } #include "cpp/v_cback_def.h" #endif // _WXPERL_V_CBACK_H // Local variables: // // mode: c++ // // End: // Wx-0.9923/cpp/window.h000664000000000000 146112306612226 12725 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/window.h // Purpose: c++ wrapper for wxWindow // Author: Mattia Barbon // Modified by: // Created: 03/11/2000 // RCS-ID: $Id: window.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2000-2001, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// WXPLI_DECLARE_CLASS_6( Window, true, wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long, const wxString& ); WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliWindow, wxWindow ); // local variables: // mode: c++ // end: Wx-0.9923/cpp/wizard.h000664000000000000 571512306612225 12723 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/wizard.h // Purpose: c++ wrapper for wxWizard/wxWizardPage // Author: Mattia Barbon // Modified by: // Created: 28/08/2002 // RCS-ID: $Id: wizard.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2002-2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define DEC_V_CBACK_BOOL__WXWIZARDPAGE( NAME ) \ bool NAME( wxWizardPage* page ) #define DEF_V_CBACK_BOOL__WXWIZARDPAGE( CLASS, BASE, METHOD ) \ DEF_V_CBACK_BOOL__WXOBJECTsP_( wxWizardPage*, CLASS, \ return BASE::METHOD( p1 ), \ METHOD, wxPli_NOCONST ) #define DEC_V_CBACK_WXWIZARDPAGE__VOID_const( NAME ) \ wxWizardPage* NAME() const #define DEF_V_CBACK_WXWIZARDPAGE__VOID_const_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_WXOBJECTsP__VOID_( wxWizardPage*, Wx::WizardPage, \ CLASS, return NULL, METHOD, wxPli_CONST ) class wxPliWizard : public wxWizard { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliWizard ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPliWizard, "Wx::Wizard", true ); WXPLI_CONSTRUCTOR_5( wxPliWizard, "Wx::Wizard", true, wxWindow*, wxWindowID, const wxString&, const wxBitmap&, const wxPoint& ); DEC_V_CBACK_BOOL__WXWIZARDPAGE( HasPrevPage ); DEC_V_CBACK_BOOL__WXWIZARDPAGE( HasNextPage ); }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliWizard, wxWizard ); DEF_V_CBACK_BOOL__WXWIZARDPAGE( wxPliWizard, wxWizard, HasPrevPage ); DEF_V_CBACK_BOOL__WXWIZARDPAGE( wxPliWizard, wxWizard, HasNextPage ); class wxPliWizardPage : public wxWizardPage { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliWizardPage ); WXPLI_DECLARE_V_CBACK(); public: wxPliWizardPage( const char* package ) : wxWizardPage(), m_callback( "Wx::WizardPage" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } wxPliWizardPage( const char* package, wxWizard* parent, const wxBitmap& bitmap ) :wxWizardPage( parent, bitmap ), m_callback( "Wx::WizardPage" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } DEC_V_CBACK_WXWIZARDPAGE__VOID_const( GetPrev ); DEC_V_CBACK_WXWIZARDPAGE__VOID_const( GetNext ); }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliWizardPage, wxWizardPage ); DEF_V_CBACK_WXWIZARDPAGE__VOID_const_pure( wxPliWizardPage, wxWizardPage, GetPrev ); DEF_V_CBACK_WXWIZARDPAGE__VOID_const_pure( wxPliWizardPage, wxWizardPage, GetNext ); // local variables: // mode: c++ // end: Wx-0.9923/cpp/wxapi.h000664000000000000 654612306612226 12557 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/wxapi.h // Purpose: Magic to be included to get access to wxPerl API // Author: Mattia Barbon // Modified by: // Created: 21/09/2002 // RCS-ID: $Id: wxapi.h 3009 2011-02-20 16:25:26Z mbarbon $ // Copyright: (c) 2002-2003, 2005-2011 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #ifdef __CPP_WXAPI_H #error cpp/wxapi.h must be included only once! #endif #define __CPP_WXAPI_H #undef bool #if defined( __WXMSW__ ) #define STRICT #undef NO_STRICT #endif #include #include // used to restore PerlIO-inflicted damage inline FILE* _wxPli_stdin() { return stdin; } inline FILE* _wxPli_stdout() { return stdout; } inline FILE* _wxPli_stderr() { return stderr; } #include "cpp/compat.h" #if WXPERL_W_VERSION_LT( 2, 5, 3 ) || WXPERL_W_VERSION_EQ( 2, 7, 0 ) || \ WXPERL_W_VERSION_EQ( 2, 7, 1 ) #error wxWidgets 2.4.x, 2.5.0, 2.5.1, 2.5.2, 2.7.0, 2.7.1 are no longer supported by wxPerl #endif #if WXPERL_W_VERSION_LE( 2, 5, 1 ) #define compatibility_iterator Node* #endif #include "cpp/chkconfig.h" #if defined(__WXWINCE__) #undef __WINDOWS__ #endif #if defined(__VISUALC__) || defined(__DIGITALMARS__) #define mode_t mode_avoid_redefinition_t #endif WXPL_EXTERN_C_START #include #include #include WXPL_EXTERN_C_END #if WXPERL_P_VERSION_LT( 5, 10, 0 ) // fix newXS type for perl 5.8 inline CV* wxPli_newXS(pTHX_ const char* name, XSUBADDR_t addr, const char* file) { return newXS( (char*)name, addr, (char*)file ); } #undef newXS #define newXS( a, b, c ) wxPli_newXS( aTHX_ a, b, c ) #endif #if defined(__VISUALC__) || defined(__DIGITALMARS__) #undef mode_t #endif #if WXPERL_P_VERSION_GE( 5, 9, 0 ) || WXPERL_P_VERSION_GE( 5, 8, 1 ) // XXX this is an hack #undef assert_not_ROK #define assert_not_ROK(sv) #endif #undef bool #undef Move #undef Copy #undef New #undef Pause #undef Mkdir #undef Seek #undef Stat #undef Error #undef do_open #undef do_close #undef utf8_length #if defined( PERL_IMPLICIT_SYS ) #undef abort #undef clearerr #undef close #undef eof #undef exit #undef fclose #undef feof #undef ferror #undef fflush #undef fgetpos #undef fopen #undef form #undef fputc #undef fputs #undef fread #undef free #undef freopen #undef fseek #undef fsetpos #undef ftell #undef fwrite #undef getc #undef getenv #undef malloc #undef open #undef read #undef realloc #undef rename #undef seekdir #undef setbuf #undef setvbuf #undef tmpfile #undef tmpnam #undef ungetc #undef vform #undef vfprintf #undef write #undef fgets #undef stdin #undef stdout #undef stderr #define stdin (_wxPli_stdin()) #define stdout (_wxPli_stdout()) #define stderr (_wxPli_stderr()) #endif #if __VISUALC__ #pragma warning ( disable: 4800 ) #pragma warning ( disable: 4100 ) // unreferenced formal parameter #pragma warning ( disable: 4101 ) // unreferenced local variable #pragma warning ( disable: 4706 ) // assignment within conditional expression #endif #ifdef __WXMSW__ #include #endif // __WXMSW__ // some helper functions/classes/macros #include "cpp/helpers.h" // 0.01 -> 0010; 1.01 -> 1010, etc #define WXPL_API_VERSION 0150 Wx-0.9923/cpp/wxPerl.osx/000775000000000000 012316265011 13251 5ustar00Mark000000000000Wx-0.9923/cpp/wxPerl.osx/Info.plist000664000000000000 127612306612225 15311 0ustar00Mark000000000000 CFBundleDevelopmentRegion English CFBundleExecutable wxPerl CFBundleIconFile CFBundleIdentifier net.sourceforge.wxperl CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType BNDL CFBundleSignature ???? CFBundleVersion 1.0 CSResourcesFileMapped Wx-0.9923/cpp/wxPerl.osx/main.c000664000000000000 3512306612225 14361 0ustar00Mark000000000000int main(void) { return 0; } Wx-0.9923/cpp/wxPerl.osx/Makefile000775000000000000 174012306612225 15000 0ustar00Mark000000000000#!/bin/make -f BUILD=build APP_PARTS=\ $(BUILD)/wxPerl.app/Contents/Info.plist \ $(BUILD)/wxPerl.app/Contents/MacOS/wxPerl \ $(BUILD)/wxPerl.app/Contents/Resources/wxPerl.rsrc \ $(BUILD)/wxPerl.app/Contents/PkgInfo all: $(BUILD)/wxPerl.app clean: rm -rf $(BUILD) $(BUILD)/wxPerl.app: $(APP_PARTS) $(BUILD)/wxPerl.app/Contents: mkdir -p $@ $(BUILD)/wxPerl.app/Contents/MacOS: mkdir -p $@ $(BUILD)/wxPerl.app/Contents/Resources: mkdir -p $@ $(BUILD)/wxPerl.app/Contents/PkgInfo: $(BUILD)/wxPerl.app/Contents echo -n "BNDL????" > $@ $(BUILD)/wxPerl.app/Contents/Info.plist: $(BUILD)/wxPerl.app/Contents cp Info.plist $@ $(BUILD)/wxPerl.app/Contents/MacOS/wxPerl: $(BUILD)/wxPerl.app/Contents/MacOS gcc -o $@ $(ARCH_FLAGS) main.c $(BUILD)/wxPerl.app/Contents/Resources/wxPerl.rsrc: $(BUILD)/wxPerl.app/Contents/Resources $(RESTOOLDIR)/Rez -d __DARWIN__ -useDF -o $(BUILD)/wxPerl.rsrc $(ARCH_FLAGS) wxPerl.r $(RESTOOLDIR)/ResMerger -dstIs DF $(BUILD)/wxPerl.rsrc -o $@ Wx-0.9923/cpp/wxsizer.h000664000000000000 646312306612226 13140 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: cpp/wxsizer.h // Purpose: provide wxBookCtrlSizer and wxNotebookSizer class // Author: Robert Roebling and Robin Dunn // Modified by: Ron Lee, Vadim Zeitlin (wxSizerFlags) // Created: // RCS-ID: $Id: wxsizer.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) Robin Dunn, Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // extracted from sizer.h/sizer.cpp from wxWidgets 2.6.1 // NB: wxBookCtrlSizer and wxNotebookSizer are deprecated, they // don't do anything. wxBookCtrlBase::DoGetBestSize does the job now. // ---------------------------------------------------------------------------- // wxBookCtrlSizer // ---------------------------------------------------------------------------- #if wxUSE_BOOKCTRL #include // this sizer works with wxNotebook/wxListbook/... and sizes the control to // fit its pages class wxBookCtrlSizer : public wxSizer { public: wxBookCtrlSizer(wxBookCtrlBase *bookctrl); wxBookCtrlBase *GetControl() const { return m_bookctrl; } virtual void RecalcSizes(); virtual wxSize CalcMin(); protected: wxBookCtrlBase *m_bookctrl; private: DECLARE_CLASS(wxBookCtrlSizer) DECLARE_NO_COPY_CLASS(wxBookCtrlSizer) }; #if wxUSE_NOTEBOOK // before wxBookCtrlBase we only had wxNotebookSizer, keep it for backwards // compatibility #include class wxNotebookSizer : public wxBookCtrlSizer { public: wxNotebookSizer(wxNotebook *nb); wxNotebook *GetNotebook() const { return (wxNotebook *)m_bookctrl; } private: DECLARE_CLASS(wxNotebookSizer) DECLARE_NO_COPY_CLASS(wxNotebookSizer) }; #endif // wxUSE_NOTEBOOK #endif // wxUSE_BOOKCTRL #if wxUSE_BOOKCTRL IMPLEMENT_CLASS(wxBookCtrlSizer, wxSizer) #if wxUSE_NOTEBOOK IMPLEMENT_CLASS(wxNotebookSizer, wxBookCtrlSizer) #endif // wxUSE_NOTEBOOK #endif // wxUSE_BOOKCTRL #if wxUSE_BOOKCTRL wxBookCtrlSizer::wxBookCtrlSizer(wxBookCtrlBase *bookctrl) : m_bookctrl(bookctrl) { wxASSERT_MSG( bookctrl, wxT("wxBookCtrlSizer needs a control") ); } void wxBookCtrlSizer::RecalcSizes() { m_bookctrl->SetSize( m_position.x, m_position.y, m_size.x, m_size.y ); } wxSize wxBookCtrlSizer::CalcMin() { wxSize sizeBorder = m_bookctrl->CalcSizeFromPage(wxSize(0,0)); sizeBorder.x += 5; sizeBorder.y += 5; if ( m_bookctrl->GetPageCount() == 0 ) { return wxSize(sizeBorder.x + 10, sizeBorder.y + 10); } int maxX = 0; int maxY = 0; wxWindowList::compatibility_iterator node = m_bookctrl->GetChildren().GetFirst(); while (node) { wxWindow *item = node->GetData(); wxSizer *itemsizer = item->GetSizer(); if (itemsizer) { wxSize subsize( itemsizer->CalcMin() ); if (subsize.x > maxX) maxX = subsize.x; if (subsize.y > maxY) maxY = subsize.y; } node = node->GetNext(); } return wxSize( maxX, maxY ) + sizeBorder; } #if wxUSE_NOTEBOOK wxNotebookSizer::wxNotebookSizer(wxNotebook *nb) : wxBookCtrlSizer(nb) { wxASSERT_MSG( nb, wxT("wxNotebookSizer needs a control") ); } #endif // wxUSE_NOTEBOOOK #endif // wxUSE_BOOKCTRL Wx-0.9923/docs/000775000000000000 012316265011 11326 5ustar00Mark000000000000Wx-0.9923/docs/INSTALL.pod000664000000000000 1340512306612226 13246 0ustar00Mark000000000000If you read this file _as_is_, just ignore the funny characters you see. It is written in the POD format (see pod/perlpod.pod) which is specially designed to be readable as is. =head1 NAME Install - Build and install wxPerl =head1 wxPerl installation ************************************************************************ You need to install wxWidgets 2.5.3 or later before you can compile wxPerl. For UNIX systems look at the section "INSTALL wxWidgets"; for Win32 systems, detailed build instructions for wxWidgets + wxPerl are included in the section "COMPILING UNDER WIN32"; for Mac OS X, refer to "INSTALL wxWidgets", and then to "USING wxPerl on MAC OS X" ************************************************************************ =head1 Quick installation This applies to UN*X systems, and only if wxWidgets 2.5.3 or later is already compiled and installed. # unpack the wxPerl archive tar xzvf Wx-0.xx.tar.gz cd Wx-0.xx perl Makefile.PL # (1) make # (2) make test # (3) make install # (4) 1) see below for a way to specify a different installation directory 2) under Windows you may need to use nmake, or another *make 3) you may also want to do perl run minimal perl run controls ... against the samples in the 'samples' subdirectory, and perl demo/demo.pl before installing 4) you may need Administrator/root privileges to install =head1 Additional flags to Makefile.PL In addition to ExtUtils::MakeMaker flags wxPerl Makefile.PL accepts --debug Currently only under Win32 or GCC adds debugging information to the library --extra-libs={extra libraries} Adds extra libraries to the link command line --extra-cflags={extra compiler flags} Adds extra compiler flags to compiler line --help Show the full list of options =head1 Installing wxWidgets (on UNIX systems and Mac OS X) wxWidgets 2.5.3 or later is required for wxPerl to work. For UNIX systems only. If you are using prepackaged wxWidgets binaries you need to install the -dev and -contrib-dev packages in order to compile wxPerl, otherwise you just need the main package and the -contrib package. If you are compiling wxWidgets yourself, the quick way is: ./configure make make install cd contrib/src/stc make make install If something goes wrong, please refer to the wxWidgets installation instructions. =head1 Installing under Win32 This wxPerl version was tested with MinGW 3.0 and MS Visual C++ 5. Older MinGW versions (from 1.1 onwards) and newer versions will likely work. For the remainder of this section I'll assume that your Perl is installed in C:\Perl =head2 MS Visual C++ 5 (wxWidgets 2.5.x), MS Visual C++ 6 SP4 (wxWidgets 2.5.x) wxWidgets 2.5.3 or later is required for wxPerl to work. Build wxWidgets as a dll cd z:\path\to\wx\build\msw nmake -f makefile.vc SHARED=1 BUILD=release cd ..\..\contrib\build\stc nmake -f makefile.vc SHARED=1 BUILD=release # build wxPerl set WXDIR=z:\path\to\wx set WXWIN=z:\path\to\wx perl Makefile.PL nmake nmake test nmake install To build a debugging wxPerl, follow the instructions above passing BUILD=debug DEBUG_RUNTIME_LIBS=0 to wxWidgets makefile and --debug to Makefile.PL. =head2 MinGW 1.1 or later (wxWidgets 2.5.x) wxWidgets 2.5.3 or later is required for wxPerl to work. Get MinGW from http://www.mingw.org/ ; choose the all-in-one package (downloading the individual packages will work but requires you knowing how to install them). MSYS is not required. If you want to compile wxPerl against ActivePerl using MinGW, you ned to first download and install ExtUtils::FakeConfig from http://wxperl.sourceforge.net/ap_mingw/ ; then just replace the "perl Makefile.PL" with "perl -MConfig_m Makefile.PL". If you built Perl from sources, you don't need this additional step. Build wxWidgets as a dll cd z:\path\to\wx\build\msw make -f makefile.gcc SHARED=1 BUILD=release cd ..\..\contrib\src\stc make -f makefile.gcc SHARED=1 BUILD=release # now build wxPerl # get dmake from http://www.cpan.org/authors/id/GSAR/dmake-4.1pl1-win32.zip set WXDIR=z:\path\to\wx set WXWIN=z:\path\to\wx perl Makefile.PL dmake dmake test dmake install To build a debugging wxPerl, follow the instructions above passing BUILD=debug to wxWidgets makefile and --debug to Makefile.PL. =head1 Specifying the installation path If you don't want to install wxPerl as a system module, you must specify a different installation path. With recent ExtUtils::MakeMaker you can do this by using perl Makefile.PL PREFIX=path On older ExtUtils::MakeMaker version the correct incantation might be different. =head1 Using wxPerl on Mac OS X The 'perl' executable shipped with your OS can't be used to run executables that interact with the GUI, hence you need to use the special 'wxPerl' executable created by wxPerl. =head1 FAQ =head2 Problems compiling XRC and/or STC Usually they start like this: STC.c:33:24: wx/stc/stc.h: No such file or directory and go ahead with many compilation errors. This usually means you did not install wxWidgets' 'contrib' libraries; either install them or disable STC/XRC passing --disable-stc --disable-xrc to Makefile.PL. =head2 C++ compiler wxPerl needs a C++ compiler to build. By default it will use the C++ compiler that was used to compile wxWidgets; this can cause problems if Perl was compiled with a C compiler of a different brand. For example if you compile Perl with GCC and wxWidgets with ICC or Perl with Sun C compiler and wxWidgets with G++ you will most likely not be able to compile wxPerl. Exceptions are: under Windows you can use ActivePerl (compiled with MS Visual Studio) and wxWidgets compiled with MinGW by using ExtUtils::FakeConfig, under Solaris a similar tool exists for Sun C Compiler -> GCC/G++ compilation. Wx-0.9923/docs/todo.txt000664000000000000 446312306612226 13126 0ustar00Mark000000000000PRIORITY HIGH: * rewrite docs/* in POD (?) PRIORITY NORMAL: * Treebook, Toolbook, Proprtysheet * Buttonbar * Overload resolution finish it! * store events in a C++ file * autogenerate event definitons * try to have constants inlined where appropriate * wxCalendarCtrl HitTest * wxFontEnumerator virtual functions * wxDocManager::FileHistoryLoad/Save wxDocument CommandProcessor functions wxDocument::Load/Save, investigate * testing tests for all overloaded methods tests for all events tests for all classes creation/deletion * Threads cloning of objects with a DESTROY * configuration system * finish cpp/chkconfig.h * Wx::DataObject Wx::PlDataObject * Decrease compilation time/code bloat: Use precompiled headers where appropriate Move constants out of Constants.xs when they need a separate #include Move #include to the XS requiring them Add tests for wxUSE_XXX, and maybe a wxPERL_USE_XXX * Wx::HtmlWindow AddFilter AddProcessor GetParser Fix inheritance... * Wx::HelpController OnQuit Get/SetFrameParameters * Wx::StyledTextCtrl AddStyledText GetStyledText GetCurLine SendMsg * Wx::PlGridTable Attribute-releated functions Custom data functions PRIORITY LOW: * Wx::HtmlHelpData ? * Wx::App methods CreateLogTarget * Wx::App::new find a better solution yhan just 'croak' if OnInit returns a false value * Wx::PrintData PostScript specific functions overloaded constructors * Wx::PageSetupDialogData overloaded constructors * operator == and != (are they useful/have side effects?) Wx::AcceleratorTable Wx::Bitmap (enable) Wx::Brush Wx::Colour Wx::Cursor Wx::Font Wx::Rect Wx::Region Wx::Point Wx::Size Wx::Icon Wx::Image Wx::Palette Wx::Pen DOCUMENTATTION: * Document Wx::PlValidator, Wx::PlLog, Wx::PlLogPassThrough * Document wxStatusBar::GetFieldRect * Document wxDocTemplate::new * wxFontMapper GetAltForEncoding -- not documented in wxWidgets -- * Wx::MultipleChoiceDialog * Wx::NativeFontInfo CLASSES: wxGLCanvas wxDirCtrl wxMetafileDC wxDCClipper wxBufferedDC wxTextValidator wxGenericValidator wxDDE* wxTCP* wxMimeTypesManager wxEncodingConverter FEATURE REQUESTS * wxAutomationObject Wx-0.9923/Event.xs000664000000000000 4151412306612266 12147 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: Event.xs // Purpose: XS for Wx::EvtHandler, Wx::Event and derived classes // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: Event.xs 3232 2012-03-19 05:38:20Z mdootson $ // Copyright: (c) 2000-2009 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include #include #include #include #include #include // re-include for client data #include "cpp/helpers.h" #undef THIS #include "cpp/e_cback.h" #include "cpp/e_cback.cpp" #include "cpp/event.h" WXPLI_BOOT_ONCE(Wx_Evt); #define boot_Wx_Evt wxPli_boot_Wx_Evt MODULE=Wx_Evt PACKAGE=Wx INCLUDE: XS/EvtHandler.xs MODULE=Wx_Evt PACKAGE=Wx::Event # unimplemented ( and probably will never be: problems with object # cloning/destruction ) # GetObjectType static void wxEvent::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxEvent::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; # void # wxEvent::Destroy() # CODE: # delete THIS; void wxEvent::GetEventObject() PPCODE: // to avoid problems with deletion, only windows are supported wxObject* obj = THIS->GetEventObject(); wxWindow* win = wxDynamicCast( obj, wxWindow ); EXTEND( SP, 1 ); if(win == NULL) PUSHs( &PL_sv_undef ); else PUSHs( wxPli_object_2_sv( aTHX_ NEWSV( 0, 0 ), win ) ); wxEventType wxEvent::GetEventType() int wxEvent::GetId() bool wxEvent::GetSkipped() long wxEvent::GetTimestamp() void wxEvent::SetEventType( type ) wxEventType type ## will likely need to be restricted to wxWindow (for ownership problems) void wxEvent::SetEventObject( object ) wxObject* object void wxEvent::SetId( id ) wxWindowID id void wxEvent::SetTimestamp( timeStamp ) long timeStamp void wxEvent::Skip( skip = true ) bool skip #if WXPERL_W_VERSION_GE( 2, 5, 1 ) bool wxEvent::ShouldPropagate() #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) int wxEvent::StopPropagation() void wxEvent::ResumePropagation( propagationLevel ) int propagationLevel #else #if WXPERL_W_VERSION_GE( 2, 5, 1 ) void wxEvent::SetPropagate( doIt ) bool doIt #endif #endif MODULE=Wx_Evt PACKAGE=Wx::CommandEvent wxCommandEvent* wxCommandEvent::new( type = 0, id = 0 ) wxEventType type wxWindowID id Wx_UserDataCD* wxCommandEvent::GetClientData() CODE: RETVAL = (wxPliUserDataCD*)THIS->GetClientObject(); OUTPUT: RETVAL long wxCommandEvent::GetExtraLong() int wxCommandEvent::GetInt() int wxCommandEvent::GetSelection() wxString wxCommandEvent::GetString() bool wxCommandEvent::IsChecked() bool wxCommandEvent::IsSelection() void wxCommandEvent::SetClientData( data ) Wx_UserDataCD* data CODE: THIS->SetClientObject( data ); void wxCommandEvent::SetExtraLong( extraLong ) long extraLong void wxCommandEvent::SetInt( intCommand ) int intCommand void wxCommandEvent::SetString( string ) wxString string MODULE=Wx_Evt PACKAGE=Wx::ContextMenuEvent wxContextMenuEvent* wxContextMenuEvent::new( type = 0, id = 0, pos = wxDefaultPosition ) wxEventType type wxWindowID id wxPoint pos wxPoint wxContextMenuEvent::GetPosition() void wxContextMenuEvent::SetPosition( pos ) wxPoint pos MODULE=Wx_Evt PACKAGE=Wx::PlEvent SV* wxPlEvent::new( type, id ) wxEventType type wxWindowID id CODE: wxPlEvent* THIS = new wxPlEvent( CLASS, type, id ); RETVAL = newRV_noinc( SvRV( THIS->m_callback.GetSelf() ) ); wxPli_thread_sv_register( aTHX_ "Wx::PlEvent", THIS, RETVAL ); OUTPUT: RETVAL ## // thread OK void wxPlEvent::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::PlEvent", THIS, ST(0) ); if( THIS && wxPli_object_is_deleteable( aTHX_ ST(0) ) ) { THIS->m_callback.DeleteSelf( true ); delete THIS; } MODULE=Wx_Evt PACKAGE=Wx::PlCommandEvent SV* wxPlCommandEvent::new( type, id ) wxEventType type wxWindowID id CODE: wxPlCommandEvent* THIS = new wxPlCommandEvent( CLASS, type, id ); RETVAL = newRV_noinc( SvRV( THIS->m_callback.GetSelf() ) ); wxPli_thread_sv_register( aTHX_ "Wx::PlCommandEvent", THIS, RETVAL ); OUTPUT: RETVAL ## // thread OK void wxPlCommandEvent::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::PlCommandEvent", THIS, ST(0) ); if( THIS && wxPli_object_is_deleteable( aTHX_ ST(0) ) ) { THIS->m_callback.DeleteSelf( true ); delete THIS; } MODULE=Wx_Evt PACKAGE=Wx::PlThreadEvent wxPlThreadEvent* wxPlThreadEvent::new( type, id, data ) wxEventType type wxWindowID id SV* data CODE: RETVAL = new wxPlThreadEvent( aTHX_ CLASS, type, id, data ); OUTPUT: RETVAL int wxPlThreadEvent::_GetData() CODE: RETVAL = THIS ? THIS->_GetData() : 0; OUTPUT: RETVAL SV* wxPlThreadEvent::GetData() CODE: RETVAL = THIS ? THIS->GetData() : &PL_sv_undef; OUTPUT: RETVAL void SetStash( hv_ref ) SV* hv_ref CODE: wxPlThreadEvent::SetStash( hv_ref ); MODULE=Wx_Evt PACKAGE=Wx::ActivateEvent wxActivateEvent* wxActivateEvent::new( type = 0, active = true, id = 0 ) wxEventType type bool active wxWindowID id bool wxActivateEvent::GetActive() MODULE=Wx_Evt PACKAGE=Wx::CloseEvent wxCloseEvent* wxCloseEvent::new( commandEventType = 0, id = 0 ) wxEventType commandEventType wxWindowID id bool wxCloseEvent::CanVeto() bool wxCloseEvent::GetLoggingOff() void wxCloseEvent::SetCanVeto( canVeto ) bool canVeto void wxCloseEvent::SetLoggingOff( loggingOff ) bool loggingOff void wxCloseEvent::Veto( veto = true ) bool veto MODULE=Wx_Evt PACKAGE=Wx::EraseEvent wxEraseEvent* wxEraseEvent::new( id = 0, dc = 0 ) wxWindowID id wxDC* dc wxDC* wxEraseEvent::GetDC() OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); MODULE=Wx_Evt PACKAGE=Wx::FocusEvent wxFocusEvent* wxFocusEvent::new( eventType = 0, id = 0 ) wxEventType eventType wxWindowID id wxWindow* wxFocusEvent::GetWindow() MODULE=Wx_Evt PACKAGE=Wx::IconizeEvent bool wxIconizeEvent::Iconized() CODE: #if WXPERL_W_VERSION_LT( 2, 9, 0 ) RETVAL = THIS->Iconized(); #else RETVAL = THIS->IsIconized(); #endif OUTPUT: RETVAL bool wxIconizeEvent::IsIconized() CODE: #if WXPERL_W_VERSION_LT( 2, 9, 0 ) RETVAL = THIS->Iconized(); #else RETVAL = THIS->IsIconized(); #endif OUTPUT: RETVAL MODULE=Wx_Evt PACKAGE=Wx::KeyEvent wxKeyEvent* wxKeyEvent::new( keyEventType ) wxEventType keyEventType bool wxKeyEvent::AltDown() #if WXPERL_W_VERSION_GE( 2, 5, 3 ) bool wxKeyEvent::CmdDown() #endif bool wxKeyEvent::ControlDown() int wxKeyEvent::GetKeyCode() #ifdef wxHAS_RAW_KEY_CODES int wxKeyEvent::GetRawKeyCode() #endif #if wxUSE_UNICODE && WXPERL_W_VERSION_GE( 2, 5, 3 ) wxChar wxKeyEvent::GetUnicodeKey() #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) int wxKeyEvent::GetModifiers() #endif long wxKeyEvent::GetX() long wxKeyEvent::GetY() bool wxKeyEvent::MetaDown() bool wxKeyEvent::HasModifiers() bool wxKeyEvent::ShiftDown() #if WXPERL_W_VERSION_GE( 2, 9, 3 ) void wxKeyEvent::DoAllowNextEvent() bool wxKeyEvent::IsNextEventAllowed() #endif MODULE=Wx_Evt PACKAGE=Wx::HelpEvent wxHelpEvent* wxHelpEvent::new() wxPoint* wxHelpEvent::GetPosition() CODE: RETVAL = new wxPoint( THIS->GetPosition() ); OUTPUT: RETVAL wxString wxHelpEvent::GetLink() wxString wxHelpEvent::GetTarget() void wxHelpEvent::SetPosition( point ) wxPoint point void wxHelpEvent::SetLink( link ) wxString link void wxHelpEvent::SetTarget( target ) wxString target MODULE=Wx_Evt PACKAGE=Wx::IdleEvent wxIdleEvent* wxIdleEvent::new() bool wxIdleEvent::MoreRequested() void wxIdleEvent::RequestMore( needMore = true ) bool needMore #if WXPERL_W_VERSION_LT( 2, 9, 0 ) bool CanSend( window ) wxWindow* window CODE: RETVAL = wxIdleEvent::CanSend( window ); OUTPUT: RETVAL #endif void SetMode( mode ) wxIdleMode mode CODE: wxIdleEvent::SetMode( mode ); wxIdleMode GetMode() CODE: RETVAL = wxIdleEvent::GetMode(); OUTPUT: RETVAL MODULE=Wx_Evt PACKAGE=Wx::InitDialogEvent wxInitDialogEvent* wxInitDialogEvent::new( id = 0 ) wxWindowID id MODULE=Wx_Evt PACKAGE=Wx::JoystickEvent wxJoystickEvent* wxJoystickEvent::new( eventType = 0, state = 0, joystick = wxJOYSTICK1, change = 0 ) wxEventType eventType int state int joystick int change bool wxJoystickEvent::ButtonDown( button = wxJOY_BUTTON_ANY ) int button bool wxJoystickEvent::ButtonIsDown( button = wxJOY_BUTTON_ANY ) int button bool wxJoystickEvent::ButtonUp( button = wxJOY_BUTTON_ANY ) int button int wxJoystickEvent::GetButtonChange() int wxJoystickEvent::GetButtonState() int wxJoystickEvent::GetJoystick() wxPoint* wxJoystickEvent::GetPosition() CODE: RETVAL = new wxPoint( THIS->GetPosition() ); OUTPUT: RETVAL int wxJoystickEvent::GetZPosition() bool wxJoystickEvent::IsButton() bool wxJoystickEvent::IsMove() bool wxJoystickEvent::IsZMove() MODULE=Wx_Evt PACKAGE=Wx::MenuEvent wxMenuEvent* wxMenuEvent::new( eventType = 0, id = 0 ) wxEventType eventType wxWindowID id int wxMenuEvent::GetMenuId() bool wxMenuEvent::IsPopup() #if WXPERL_W_VERSION_GE( 2, 6, 0 ) wxMenu* wxMenuEvent::GetMenu() #endif MODULE=Wx_Evt PACKAGE=Wx::MaximizeEvent wxMouseEvent* wxMouseEvent::new( id = 0 ) wxWindowID id MODULE=Wx_Evt PACKAGE=Wx::MouseEvent wxMouseEvent* wxMouseEvent::new( eventType = 0 ) wxEventType eventType bool wxMouseEvent::AltDown() bool wxMouseEvent::Button( button = -1 ) int button bool wxMouseEvent::ButtonDClick( button = -1 ) int button bool wxMouseEvent::ButtonDown( button = -1 ) int button bool wxMouseEvent::ButtonUp( button = -1 ) int button #if WXPERL_W_VERSION_GE( 2, 5, 3 ) bool wxMouseEvent::CmdDown() #endif bool wxMouseEvent::ControlDown() bool wxMouseEvent::Dragging() bool wxMouseEvent::Entering() wxPoint* wxMouseEvent::GetPosition() CODE: RETVAL = new wxPoint( THIS->GetPosition() ); OUTPUT: RETVAL void wxMouseEvent::GetPositionXY() PREINIT: long x; long y; PPCODE: THIS->GetPosition( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); wxPoint* wxMouseEvent::GetLogicalPosition( dc ) wxDC* dc CODE: RETVAL = new wxPoint( THIS->GetLogicalPosition( *dc ) ); OUTPUT: RETVAL long wxMouseEvent::GetX() long wxMouseEvent::GetY() int wxMouseEvent::GetWheelRotation() int wxMouseEvent::GetWheelDelta() int wxMouseEvent::GetLinesPerAction() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) int wxMouseEvent::GetWheelAxis() #endif bool wxMouseEvent::IsButton() bool wxMouseEvent::IsPageScroll() bool wxMouseEvent::Leaving() bool wxMouseEvent::LeftDClick() bool wxMouseEvent::LeftDown() bool wxMouseEvent::LeftIsDown() bool wxMouseEvent::LeftUp() bool wxMouseEvent::MetaDown() bool wxMouseEvent::MiddleDClick() bool wxMouseEvent::MiddleDown() bool wxMouseEvent::MiddleIsDown() bool wxMouseEvent::MiddleUp() bool wxMouseEvent::Moving() bool wxMouseEvent::RightDClick() bool wxMouseEvent::RightDown() bool wxMouseEvent::RightIsDown() bool wxMouseEvent::RightUp() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool wxMouseEvent::Aux1DClick() bool wxMouseEvent::Aux1Down() bool wxMouseEvent::Aux1IsDown() bool wxMouseEvent::Aux1Up() bool wxMouseEvent::Aux2DClick() bool wxMouseEvent::Aux2Down() bool wxMouseEvent::Aux2IsDown() bool wxMouseEvent::Aux2Up() #endif bool wxMouseEvent::ShiftDown() int wxMouseEvent::GetButton() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) int wxMouseEvent::GetClickCount() #endif MODULE=Wx_Evt PACKAGE=Wx::MoveEvent wxMoveEvent* wxMoveEvent::new( point, id = 0 ) wxPoint point wxWindowID id wxPoint* wxMoveEvent::GetPosition() CODE: RETVAL = new wxPoint( THIS->GetPosition() ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxRect* wxMoveEvent::GetRect() CODE: RETVAL = new wxRect( THIS->GetRect() ); OUTPUT: RETVAL #endif MODULE=Wx_Evt PACKAGE=Wx::NotifyEvent wxNotifyEvent* wxNotifyEvent::new( eventType = wxEVT_NULL, id = 0 ) wxEventType eventType wxWindowID id bool wxNotifyEvent::IsAllowed() void wxNotifyEvent::Veto() void wxNotifyEvent::Allow() MODULE=Wx_Evt PACKAGE=Wx::PaintEvent wxPaintEvent* wxPaintEvent::new( id = 0 ) wxWindowID id MODULE=Wx_Evt PACKAGE=Wx::SizeEvent wxSizeEvent* wxSizeEvent::new( size, id = 0 ) wxSize size wxWindowID id wxSize* wxSizeEvent::GetSize() CODE: RETVAL = new wxSize( THIS->GetSize() ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxRect* wxSizeEvent::GetRect() CODE: RETVAL = new wxRect( THIS->GetRect() ); OUTPUT: RETVAL #endif MODULE=Wx_Evt PACKAGE=Wx::ScrollEvent int wxScrollEvent::GetOrientation() int wxScrollEvent::GetPosition() MODULE=Wx_Evt PACKAGE=Wx::ScrollWinEvent wxScrollWinEvent* wxScrollWinEvent::new( eventType = 0, pos = 0, orientation = 0 ) wxEventType eventType int pos int orientation int wxScrollWinEvent::GetOrientation() int wxScrollWinEvent::GetPosition() MODULE=Wx_Evt PACKAGE=Wx::SetCursorEvent wxSetCursorEvent* wxSetCursorEvent::new( x = 0, y = 0 ) wxCoord x wxCoord y wxCoord wxSetCursorEvent::GetX() wxCoord wxSetCursorEvent::GetY() void wxSetCursorEvent::SetCursor( cursor ) wxCursor* cursor C_ARGS: *cursor wxCursor* wxSetCursorEvent::GetCursor() CODE: RETVAL = new wxCursor( THIS->GetCursor() ); OUTPUT: RETVAL bool wxSetCursorEvent::HasCursor() MODULE=Wx_Evt PACKAGE=Wx::SysColourChangedEvent wxSysColourChangedEvent* wxSysColourChangedEvent::new() MODULE=Wx_Evt PACKAGE=Wx::UpdateUIEvent bool CanUpdate( window ) wxWindow* window CODE: RETVAL = wxUpdateUIEvent::CanUpdate( window ); OUTPUT: RETVAL wxUpdateUIMode GetMode() CODE: RETVAL = wxUpdateUIEvent::GetMode(); OUTPUT: RETVAL void SetMode( mode ) wxUpdateUIMode mode CODE: wxUpdateUIEvent::SetMode( mode ); long GetUpdateInterval() CODE: RETVAL = wxUpdateUIEvent::GetUpdateInterval(); OUTPUT: RETVAL void ResetUpdateTime() CODE: wxUpdateUIEvent::ResetUpdateTime(); void SetUpdateInterval( interval ) long interval CODE: wxUpdateUIEvent::SetUpdateInterval( interval ); wxUpdateUIEvent* wxUpdateUIEvent::new( commandId = 0 ) wxWindowID commandId void wxUpdateUIEvent::Check( check ) bool check #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void wxUpdateUIEvent::Show( show ) bool show #endif void wxUpdateUIEvent::Enable( enable ) bool enable bool wxUpdateUIEvent::GetChecked() #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool wxUpdateUIEvent::GetShown() #endif bool wxUpdateUIEvent::GetSetEnabled() bool wxUpdateUIEvent::GetSetChecked() #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool wxUpdateUIEvent::GetSetShown() #endif bool wxUpdateUIEvent::GetEnabled() wxString wxUpdateUIEvent::GetText() void wxUpdateUIEvent::SetText( text ) wxString text bool wxUpdateUIEvent::GetSetText() MODULE=Wx_Evt PACKAGE=Wx::NavigationKeyEvent wxNavigationKeyEvent* wxNavigationKeyEvent::new() bool wxNavigationKeyEvent::GetDirection() void wxNavigationKeyEvent::SetDirection(direction) bool direction bool wxNavigationKeyEvent::IsWindowChange() void wxNavigationKeyEvent::SetWindowChange(change) bool change wxWindow* wxNavigationKeyEvent::GetCurrentFocus() void wxNavigationKeyEvent::SetCurrentFocus(focus) wxWindow* focus #if WXPERL_W_VERSION_GE( 2, 5, 4 ) bool wxNavigationKeyEvent::IsFromTab() void wxNavigationKeyEvent::SetFromTab( fromTab ) bool fromTab #endif MODULE=Wx_Evt PACKAGE=Wx::ChildFocusEvent wxChildFocusEvent* wxChildFocusEvent::new( win = NULL ) wxWindow* win wxWindow* wxChildFocusEvent::GetWindow() #if WXPERL_W_VERSION_GE( 2, 7, 0 ) MODULE=Wx_Evt PACKAGE=Wx::ClipboardTextEvent wxClipboardTextEvent* wxClipboardTextEvent::new( type = wxEVT_NULL, id = 0 ) wxEventType type wxWindowID id MODULE=Wx:Evt PACKAGE=Wx::MouseCaptureChangedEvent wxMouseCaptureChangedEvent* wxMouseCaptureChangedEvent::new( id = 0, capturedWindow = NULL ) wxWindowID id wxWindow* capturedWindow wxWindow* wxMouseCaptureChangedEvent::GetCapturedWindow() MODULE=Wx_Evt PACKAGE=Wx::MouseCaptureLostEvent wxMouseCaptureLostEvent* wxMouseCaptureLostEvent::new( eventType = 0 ) wxEventType eventType #endif MODULE=Wx:Evt PACKAGE=Wx::WindowCreateEvent wxWindowCreateEvent* wxWindowCreateEvent::new( window = NULL ) wxWindow* window wxWindow* wxWindowCreateEvent::GetWindow() MODULE=Wx:Evt PACKAGE=Wx::WindowDestroyEvent wxWindowDestroyEvent* wxWindowDestroyEvent::new( window = NULL ) wxWindow* window wxWindow* wxWindowDestroyEvent::GetWindow() MODULE=Wx_Evt Wx-0.9923/ext/000775000000000000 012316265010 11175 5ustar00Mark000000000000Wx-0.9923/ext/aui/000775000000000000 012316265011 11754 5ustar00Mark000000000000Wx-0.9923/ext/aui/AUI.xs000664000000000000 651512306612265 13043 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/aui/AUI.xs // Purpose: XS for Wx::AUI // Author: Mattia Barbon // Modified by: // Created: 11/11/2006 // RCS-ID: $Id: AUI.xs 3421 2012-12-30 06:48:15Z mdootson $ // Copyright: (c) 2006, 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 ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/constants.h" #include "cpp/overload.h" #define wxNullBitmapPtr (wxBitmap*)&wxNullBitmap #undef THIS #include #include // event macros #define SEVT( NAME, ARGS ) wxPli_StdEvent( NAME, ARGS ) #define EVT( NAME, ARGS, ID ) wxPli_Event( NAME, ARGS, ID ) // !package: Wx::Event // !tag: // !parser: sub { $_[0] =~ m<^\s*S?EVT\(\s*(\w+)\s*\,> } #if WXPERL_W_VERSION_LT( 2, 8, 0 ) #define wxEVT_AUI_PANE_BUTTON wxEVT_AUI_PANEBUTTON #define wxEVT_AUI_PANE_CLOSE wxEVT_AUI_PANECLOSE #define wxEVT_AUI_PANE_MAXIMIZE wxEVT_AUI_PANEMAXIMIZE #define wxEVT_AUI_PANE_RESTORE wxEVT_AUI_PANERESTORE #endif static wxPliEventDescription evts[] = { SEVT( EVT_AUI_PANE_BUTTON, 2 ) SEVT( EVT_AUI_PANE_CLOSE, 2 ) SEVT( EVT_AUI_PANE_MAXIMIZE, 2 ) SEVT( EVT_AUI_PANE_RESTORE, 2 ) #if WXPERL_W_VERSION_GE( 2, 9, 4 ) SEVT( EVT_AUI_PANE_ACTIVATED, 2 ) #endif SEVT( EVT_AUI_RENDER, 2 ) EVT( EVT_AUINOTEBOOK_PAGE_CLOSE, 3, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE ) EVT( EVT_AUINOTEBOOK_PAGE_CLOSED, 3, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED ) EVT( EVT_AUINOTEBOOK_PAGE_CHANGED, 3, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED ) EVT( EVT_AUINOTEBOOK_PAGE_CHANGING, 3, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING ) EVT( EVT_AUINOTEBOOK_BUTTON, 3, wxEVT_COMMAND_AUINOTEBOOK_BUTTON ) EVT( EVT_AUINOTEBOOK_BEGIN_DRAG, 3, wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG ) EVT( EVT_AUINOTEBOOK_END_DRAG, 3, wxEVT_COMMAND_AUINOTEBOOK_END_DRAG ) EVT( EVT_AUINOTEBOOK_DRAG_MOTION, 3, wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION ) EVT( EVT_AUINOTEBOOK_ALLOW_DND, 3, wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND ) EVT( EVT_AUINOTEBOOK_DRAG_DONE, 3, wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE ) EVT( EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, 3, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN ) EVT( EVT_AUINOTEBOOK_TAB_MIDDLE_UP, 3, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP ) EVT( EVT_AUINOTEBOOK_TAB_RIGHT_DOWN, 3, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN ) EVT( EVT_AUINOTEBOOK_TAB_RIGHT_UP, 3, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP ) EVT( EVT_AUINOTEBOOK_BG_DCLICK, 3, wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK ) { 0, 0, 0 } }; MODULE=Wx__AUI BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/AuiManager.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/AuiPaneInfo.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/AuiNotebook.xsp MODULE=Wx__AUI PACKAGE=Wx::AUI void SetEvents() CODE: wxPli_set_events( evts ); #include "cpp/ovl_const.cpp" # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__AUI Wx-0.9923/ext/aui/lib/000775000000000000 012316265011 12522 5ustar00Mark000000000000Wx-0.9923/ext/aui/lib/Wx/000775000000000000 012316265011 13120 5ustar00Mark000000000000Wx-0.9923/ext/aui/lib/Wx/AUI.pm000664000000000000 201312306612265 14156 0ustar00Mark000000000000############################################################################# ## Name: ext/aui/lib/Wx/AUI.pm ## Purpose: Wx::AUI and related classes ## Author: Mattia Barbon ## Modified by: ## Created: 11/11/2006 ## RCS-ID: $Id: AUI.pm 3124 2011-11-21 02:44:58Z mdootson $ ## Copyright: (c) 2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::AUI; use strict; our $VERSION = '0.01'; Wx::load_dll( 'adv' ); Wx::load_dll( 'aui' ); Wx::wx_boot( 'Wx::AUI', $VERSION ); SetEvents(); # # properly setup inheritance tree # no strict; package Wx::AuiManager; @ISA = qw(Wx::EvtHandler); package Wx::AuiNotebook; @ISA = qw(Wx::Control); package Wx::AuiManagerEvent; @ISA = qw(Wx::Event); package Wx::AuiNotebookEvent; @ISA = ( Wx::wxVERSION() <= 2.009002 ? qw(Wx::NotifyEvent) : qw(Wx::BookCtrlEvent) ); 1; Wx-0.9923/ext/aui/Makefile.PL000664000000000000 151412306612265 14015 0ustar00Mark000000000000############################################################################# ## Name: ext/aui/Makefile.PL ## Purpose: Makefile.PL for wxAUI ## Author: Mattia Barbon ## Modified by: ## Created: 11/11/2006 ## RCS-ID: $Id: Makefile.PL 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2006, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use Config; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::AUI', VERSION_FROM => 'lib/Wx/AUI.pm', REQUIRE_WX => 2.007002, WX_CORE_LIB => 'aui adv core base', ); Wx-0.9923/ext/aui/t/000775000000000000 012316265011 12217 5ustar00Mark000000000000Wx-0.9923/ext/aui/t/01_load.t000775000000000000 13312306612265 13671 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Test::More tests => 1; use Wx; use_ok( 'Wx::AUI' ); Wx-0.9923/ext/aui/t/02_inheritance.t000775000000000000 30112306612265 15241 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::AUI; test_inheritance_end(); Wx-0.9923/ext/aui/t/03_threads.t000775000000000000 123112306612265 14426 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use Test::More tests => 4; use Wx::AUI; my $app = Wx::App->new( sub { 1 } ); my $auimanager = Wx::AuiManager->new; my $auimanager2 = Wx::AuiManager->new; my $auipaneinfo = Wx::AuiPaneInfo->new; my $auipaneinfo2 = Wx::AuiPaneInfo->new; undef $auimanager2; undef $auipaneinfo2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/aui/t/08_ovl_func.t000775000000000000 373612306612265 14630 0ustar00Mark000000000000#!/usr/bin/perl -w # test that overload dispatch works for # specific functions use strict; use Wx; use Wx::AUI; use lib '../../t'; use Test::More 'tests' => 15; use Tests_Helper qw(test_app :overload); use Fatal qw(open); my $nolog = Wx::LogNull->new; test_app( sub { my $frame = Wx::Frame->new( undef, -1, 'a' ); my $aui = Wx::AuiManager->new( $frame ); my $win1 = Wx::Window->new( $frame, -1 ); my $win2 = Wx::Window->new( $frame, -1 ); my $win3 = Wx::Window->new( $frame, -1 ); test_override { $aui->AddPane( $win1, Wx::AuiPaneInfo->new ) } 'Wx::AuiManager::AddPaneDefault'; test_override { $aui->AddPane( $win2, Wx::AuiPaneInfo->new, [ 0, 0 ] ) } 'Wx::AuiManager::AddPanePoint'; test_override { $aui->AddPane( $win3, Wx::wxLEFT(), 'Title' ) } 'Wx::AuiManager::AddPaneDirection'; test_override { $aui->GetPane( $win1 ) } 'Wx::AuiManager::GetPaneWindow'; test_override { $aui->GetPane( 'Title' ) } 'Wx::AuiManager::GetPaneString'; my $pi = Wx::AuiPaneInfo->new; test_override { $pi->BestSize( [ 100, 100 ] ) } 'Wx::AuiPaneInfo::BestSizeSize'; test_override { $pi->BestSize( 100, 100 ) } 'Wx::AuiPaneInfo::BestSizeWH'; test_override { $pi->MaxSize( [ 100, 100 ] ) } 'Wx::AuiPaneInfo::MaxSizeSize'; test_override { $pi->MaxSize( 100, 100 ) } 'Wx::AuiPaneInfo::MaxSizeWH'; test_override { $pi->MinSize( [ 100, 100 ] ) } 'Wx::AuiPaneInfo::MinSizeSize'; test_override { $pi->MinSize( 100, 100 ) } 'Wx::AuiPaneInfo::MinSizeWH'; test_override { $pi->FloatingSize( [ 100, 100 ] ) } 'Wx::AuiPaneInfo::FloatingSizeSize'; test_override { $pi->FloatingSize( 100, 100 ) } 'Wx::AuiPaneInfo::FloatingSizeWH'; test_override { $pi->FloatingPosition( [ 100, 100 ] ) } 'Wx::AuiPaneInfo::FloatingPositionPoint'; test_override { $pi->FloatingPosition( 100, 100 ) } 'Wx::AuiPaneInfo::FloatingPositionXY'; } ); Wx-0.9923/ext/aui/typemap000664000000000000 142612306612265 13447 0ustar00Mark000000000000############################################################################# ## Name: ext/aui/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 11/11/2006 ## RCS-ID: $Id: typemap 2515 2008-11-30 11:14:49Z mbarbon $ ## Copyright: (c) 2006, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxAuiNotebookEvent * O_WXOBJECT_THR wxAuiManagerEvent * O_WXOBJECT_THR wxAuiManager * O_NON_WXOBJECT_THR const wxAuiManager * O_NON_WXOBJECT_THR wxAuiPaneInfo * O_NON_WXOBJECT_THR wxAuiNotebook * O_WXEVTHANDLER Wx-0.9923/ext/aui/typemap.xsp000664000000000000 153512306612265 14261 0ustar00Mark000000000000############################################################################# ## Name: ext/aui/typemap.xsp ## Purpose: typemap file for xsubppp.pl ## Author: Mattia Barbon ## Modified by: ## Created: 11/11/2006 ## RCS-ID: $Id: typemap.xsp 2143 2007-08-12 19:41:47Z mbarbon $ ## Copyright: (c) 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %typemap{wxAuiManagerEvent *}{simple}; %typemap{wxAuiNotebookEvent *}{simple}; %typemap{wxAuiNotebook *}{simple}; %typemap{wxAuiManager *}{simple}; %typemap{const wxAuiManager *}{simple}; %typemap{wxAuiPaneInfo *}{simple}; %typemap{const wxAuiPaneInfo&}{reference}; %typemap{wxAuiPaneInfo&}{reference}; Wx-0.9923/ext/aui/XS/000775000000000000 012316265011 12306 5ustar00Mark000000000000Wx-0.9923/ext/aui/XS/AuiManager.xsp000664000000000000 2644412306612265 15173 0ustar00Mark000000000000############################################################################# ## Name: ext/aui/XS/AuiManager.xsp ## Purpose: XS++ for Wx::AuiManager ## Author: Mattia Barbon ## Modified by: ## Created: 11/11/2006 ## RCS-ID: $Id: AuiManager.xsp 2971 2010-08-28 13:49:35Z mbarbon $ ## Copyright: (c) 2006-2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include #include "xspp/aui.h" %module{Wx}; %file{xspp/aui.h}; %{ #if WXPERL_W_VERSION_GE( 2, 8, 0 ) #define wxAUI_ART_SASH_SIZE wxAUI_DOCKART_SASH_SIZE #define wxAUI_ART_CAPTION_SIZE wxAUI_DOCKART_CAPTION_SIZE #define wxAUI_ART_GRIPPER_SIZE wxAUI_DOCKART_GRIPPER_SIZE #define wxAUI_ART_PANE_BORDER_SIZE wxAUI_DOCKART_PANE_BORDER_SIZE #define wxAUI_ART_PANE_BUTTON_SIZE wxAUI_DOCKART_PANE_BUTTON_SIZE #define wxAUI_ART_BACKGROUND_COLOUR wxAUI_DOCKART_BACKGROUND_COLOUR #define wxAUI_ART_SASH_COLOUR wxAUI_DOCKART_SASH_COLOUR #define wxAUI_ART_ACTIVE_CAPTION_COLOUR wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR #define wxAUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR #define wxAUI_ART_INACTIVE_CAPTION_COLOUR wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR #define wxAUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR #define wxAUI_ART_ACTIVE_CAPTION_TEXT_COLOUR wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR #define wxAUI_ART_INACTIVE_CAPTION_TEXT_COLOUR wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR #define wxAUI_ART_BORDER_COLOUR wxAUI_DOCKART_BORDER_COLOUR #define wxAUI_ART_GRIPPER_COLOUR wxAUI_DOCKART_GRIPPER_COLOUR #define wxAUI_ART_CAPTION_FONT wxAUI_DOCKART_CAPTION_FONT #define wxAUI_ART_GRADIENT_TYPE wxAUI_DOCKART_GRADIENT_TYPE #else #define wxAUI_DOCKART_SASH_SIZE wxAUI_ART_SASH_SIZE #define wxAUI_DOCKART_CAPTION_SIZE wxAUI_ART_CAPTION_SIZE #define wxAUI_DOCKART_GRIPPER_SIZE wxAUI_ART_GRIPPER_SIZE #define wxAUI_DOCKART_PANE_BORDER_SIZE wxAUI_ART_PANE_BORDER_SIZE #define wxAUI_DOCKART_PANE_BUTTON_SIZE wxAUI_ART_PANE_BUTTON_SIZE #define wxAUI_DOCKART_BACKGROUND_COLOUR wxAUI_ART_BACKGROUND_COLOUR #define wxAUI_DOCKART_SASH_COLOUR wxAUI_ART_SASH_COLOUR #define wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR wxAUI_ART_ACTIVE_CAPTION_COLOUR #define wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR wxAUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR #define wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR wxAUI_ART_INACTIVE_CAPTION_COLOUR #define wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR wxAUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR #define wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR wxAUI_ART_ACTIVE_CAPTION_TEXT_COLOUR #define wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR wxAUI_ART_INACTIVE_CAPTION_TEXT_COLOUR #define wxAUI_DOCKART_BORDER_COLOUR wxAUI_ART_BORDER_COLOUR #define wxAUI_DOCKART_GRIPPER_COLOUR wxAUI_ART_GRIPPER_COLOUR #define wxAUI_DOCKART_CAPTION_FONT wxAUI_ART_CAPTION_FONT #define wxAUI_DOCKART_GRADIENT_TYPE wxAUI_ART_GRADIENT_TYPE #endif double aui_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: aui #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'A': r( wxAUI_DOCK_NONE ); r( wxAUI_DOCK_TOP ); r( wxAUI_DOCK_RIGHT ); r( wxAUI_DOCK_BOTTOM ); r( wxAUI_DOCK_LEFT ); r( wxAUI_DOCK_CENTER ); r( wxAUI_DOCK_CENTRE ); r( wxAUI_MGR_ALLOW_FLOATING ); r( wxAUI_MGR_ALLOW_ACTIVE_PANE ); r( wxAUI_MGR_TRANSPARENT_DRAG ); r( wxAUI_MGR_TRANSPARENT_HINT ); r( wxAUI_MGR_VENETIAN_BLINDS_HINT ); r( wxAUI_MGR_RECTANGLE_HINT ); r( wxAUI_MGR_HINT_FADE ); r( wxAUI_MGR_NO_VENETIAN_BLINDS_FADE ); r( wxAUI_MGR_DEFAULT ); // 2.7.x r( wxAUI_ART_SASH_SIZE ); r( wxAUI_ART_CAPTION_SIZE ); r( wxAUI_ART_GRIPPER_SIZE ); r( wxAUI_ART_PANE_BORDER_SIZE ); r( wxAUI_ART_PANE_BUTTON_SIZE ); r( wxAUI_ART_BACKGROUND_COLOUR ); r( wxAUI_ART_SASH_COLOUR ); r( wxAUI_ART_ACTIVE_CAPTION_COLOUR ); r( wxAUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR ); r( wxAUI_ART_INACTIVE_CAPTION_COLOUR ); r( wxAUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR ); r( wxAUI_ART_ACTIVE_CAPTION_TEXT_COLOUR ); r( wxAUI_ART_INACTIVE_CAPTION_TEXT_COLOUR ); r( wxAUI_ART_BORDER_COLOUR ); r( wxAUI_ART_GRIPPER_COLOUR ); r( wxAUI_ART_CAPTION_FONT ); r( wxAUI_ART_GRADIENT_TYPE ); // 2.8.x r( wxAUI_DOCKART_SASH_SIZE ); r( wxAUI_DOCKART_CAPTION_SIZE ); r( wxAUI_DOCKART_GRIPPER_SIZE ); r( wxAUI_DOCKART_PANE_BORDER_SIZE ); r( wxAUI_DOCKART_PANE_BUTTON_SIZE ); r( wxAUI_DOCKART_BACKGROUND_COLOUR ); r( wxAUI_DOCKART_SASH_COLOUR ); r( wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR ); r( wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR ); r( wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR ); r( wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR ); r( wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR ); r( wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR ); r( wxAUI_DOCKART_BORDER_COLOUR ); r( wxAUI_DOCKART_GRIPPER_COLOUR ); r( wxAUI_DOCKART_CAPTION_FONT ); r( wxAUI_DOCKART_GRADIENT_TYPE ); r( wxAUI_GRADIENT_NONE ); r( wxAUI_GRADIENT_VERTICAL ); r( wxAUI_GRADIENT_HORIZONTAL ); r( wxAUI_BUTTON_STATE_NORMAL ); r( wxAUI_BUTTON_STATE_HOVER ); r( wxAUI_BUTTON_STATE_PRESSED ); r( wxAUI_BUTTON_STATE_DISABLED ); r( wxAUI_BUTTON_STATE_HIDDEN ); r( wxAUI_BUTTON_CLOSE ); r( wxAUI_BUTTON_MAXIMIZE_RESTORE ); r( wxAUI_BUTTON_MINIMIZE ); r( wxAUI_BUTTON_PIN ); r( wxAUI_BUTTON_OPTIONS ); r( wxAUI_BUTTON_WINDOWLIST ); r( wxAUI_BUTTON_LEFT ); r( wxAUI_BUTTON_RIGHT ); r( wxAUI_BUTTON_UP ); r( wxAUI_BUTTON_DOWN ); r( wxAUI_BUTTON_CUSTOM1 ); r( wxAUI_BUTTON_CUSTOM2 ); r( wxAUI_BUTTON_CUSTOM3 ); r( wxAUI_INSERT_PANE ); r( wxAUI_INSERT_ROW ); r( wxAUI_INSERT_DOCK ); r( wxAUI_NB_TOP ); r( wxAUI_NB_LEFT ); r( wxAUI_NB_RIGHT ); r( wxAUI_NB_BOTTOM ); r( wxAUI_NB_TAB_SPLIT ); r( wxAUI_NB_TAB_MOVE ); r( wxAUI_NB_TAB_EXTERNAL_MOVE ); #if WXPERL_W_VERSION_GE( 2, 8, 0 ) r( wxAUI_NB_TAB_FIXED_WIDTH ); #endif r( wxAUI_NB_SCROLL_BUTTONS ); r( wxAUI_NB_WINDOWLIST_BUTTON ); r( wxAUI_NB_CLOSE_BUTTON ); r( wxAUI_NB_CLOSE_ON_ACTIVE_TAB ); r( wxAUI_NB_CLOSE_ON_ALL_TABS ); r( wxAUI_NB_DEFAULT_STYLE ); break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants aui_module( &aui_constant ); %} %file{-}; %name{Wx::AuiManagerEvent} class wxAuiManagerEvent { wxAuiManagerEvent( wxEventType type = wxEVT_NULL ); ## void SetPane( wxAuiPaneInfto* p ); void SetButton( int b ); ## danger! ownership ## void SetDC( wxDC* pdc ); wxAuiPaneInfo& GetPane() %code%{ RETVAL = THIS->GetPane(); %} %cleanup%{ wxPli_object_set_deleteable( aTHX_ ST(0), false ); %}; int GetButton(); ## danger! ownership ## wxDC* GetDC() { return dc; } void Veto( bool veto = true ); bool GetVeto() const; void SetCanVeto( bool can_veto ); bool CanVeto() const; }; %name{Wx::AuiManager} class wxAuiManager { wxAuiManager( wxWindow* managed_wnd = NULL, unsigned int flags = wxAUI_MGR_DEFAULT ); %{ static void wxAuiManager::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxAuiManager() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::AuiManager", THIS, ST(0) ); delete THIS; %}; void UnInit(); void SetFlags( unsigned int flags ); unsigned int GetFlags() const; void SetManagedWindow( wxWindow* managed_wnd ); wxWindow* GetManagedWindow() const; ## void SetArtProvider(wxAuiDockArt* art_provider); ## wxAuiDockArt* GetArtProvider() const; %name{GetPaneWindow} wxAuiPaneInfo& GetPane( wxWindow* window ) %code%{ RETVAL = &THIS->GetPane( window ); %} %cleanup%{ wxPli_object_set_deleteable( aTHX_ ST(0), false ); %}; %name{GetPaneString} wxAuiPaneInfo& GetPane( const wxString& name ) %code%{ RETVAL = &THIS->GetPane( name ); %} %cleanup%{ wxPli_object_set_deleteable( aTHX_ ST(0), false ); %}; %name{AddPaneDefault} bool AddPane( wxWindow* window, const wxAuiPaneInfo& pane_info ); %name{AddPanePoint} bool AddPane( wxWindow* window, const wxAuiPaneInfo& pane_info, const wxPoint& drop_pos ); %name{AddPaneDirection} bool AddPane( wxWindow* window, int direction = wxLEFT, const wxString& caption = wxEmptyString ); bool InsertPane( wxWindow* window, const wxAuiPaneInfo& insert_location, int insert_level = wxAUI_INSERT_PANE ); bool DetachPane( wxWindow* window ); void ClosePane( wxAuiPaneInfo& pane_info ); void MaximizePane( wxAuiPaneInfo& pane_info ); void RestorePane( wxAuiPaneInfo& pane_info ); void RestoreMaximizedPane(); #if WXPERL_W_VERSION_GE( 2, 8, 0 ) void SetDockSizeConstraint( double width_pct, double height_pct ); ## void GetDockSizeConstraint(double* width_pct, double* height_pct) const; #endif wxString SavePaneInfo( wxAuiPaneInfo& pane ); void LoadPaneInfo( wxString pane_part, wxAuiPaneInfo &pane ); wxString SavePerspective(); bool LoadPerspective( const wxString& perspective, bool update = true ); void Update(); void ShowHint( const wxRect& rect ); void HideHint(); }; %{ ## DECLARE_OVERLOAD( wapi, Wx::AuiPaneInfo ) void wxAuiManager::GetPane( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wwin, GetPaneWindow ) MATCH_REDISP( wxPliOvl_s, GetPaneString ) END_OVERLOAD( "Wx::AuiManager::GetPane" ) void wxAuiManager::GetAllPanes() PPCODE: const wxAuiPaneInfoArray& panes = THIS->GetAllPanes(); PUTBACK; wxPli_non_objarray_push( aTHX_ panes, "Wx::AuiPaneInfo" ); SPAGAIN; void wxAuiManager::AddPane( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT( wxPliOvl_wwin_wapi, AddPaneDefault, 2 ) MATCH_REDISP( wxPliOvl_wwin_wapi_wpoi, AddPanePoint ) MATCH_REDISP( wxPliOvl_wwin_n_s, AddPaneDirection ) END_OVERLOAD( "Wx::AuiManager::AddPane" ) %} Wx-0.9923/ext/aui/XS/AuiNotebook.xsp000664000000000000 771412306612265 15360 0ustar00Mark000000000000############################################################################# ## Name: ext/aui/XS/AuiNotebook.xsp ## Purpose: XS++ for Wx::AuiNotebook ## Author: Mattia Barbon ## Modified by: ## Created: 12/11/2006 ## RCS-ID: $Id: AuiNotebook.xsp 2700 2009-12-13 11:25:50Z mbarbon $ ## Copyright: (c) 2006-2007, 2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include %module{Wx}; %name{Wx::AuiNotebookEvent} class wxAuiNotebookEvent { wxAuiNotebookEvent( wxEventType command_type = wxEVT_NULL, int win_id = 0 ); void SetSelection( int s ); int GetSelection() const; void SetOldSelection( int s ); int GetOldSelection() const; void SetDragSource( wxAuiNotebook* s ); wxAuiNotebook* GetDragSource() const; }; %name{Wx::AuiNotebook} class wxAuiNotebook { %name{newDefault} wxAuiNotebook() %code{% RETVAL = new wxAuiNotebook(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxAuiNotebook( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAUI_NB_DEFAULT_STYLE ) %code{% RETVAL = new wxAuiNotebook( parent, id, pos, size, style ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %{ void wxAuiNotebook::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::AuiNotebook::new" ) %} bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0 ); bool AddPage( wxWindow* page, const wxString& caption, bool select = false, const wxBitmap& bitmap = wxNullBitmapPtr ); bool InsertPage( size_t page_idx, wxWindow* page, const wxString& caption, bool select = false, const wxBitmap& bitmap = wxNullBitmapPtr ); bool DeletePage( size_t page ); bool RemovePage( size_t page ); void SetWindowStyleFlag( long style ); bool SetPageText( size_t page, const wxString& text ); #if WXPERL_W_VERSION_GE( 2, 8, 0 ) wxString GetPageText( size_t page ) const; bool SetPageBitmap( size_t page, const wxBitmap& bitmap ); const wxBitmap& GetPageBitmap( size_t index ) const; #endif size_t SetSelection( size_t new_page ); int GetSelection() const; size_t GetPageCount() const; wxWindow* GetPage( size_t page_idx ) const; #if WXPERL_W_VERSION_GE( 2, 8, 0 ) int GetPageIndex( wxWindow* page_wnd ) const; #endif ## void SetArtProvider( wxAuiTabArt* art ); ## wxAuiTabArt* GetArtProvider() const; #if WXPERL_W_VERSION_GE( 2, 8, 0 ) void Split( size_t page, int direction ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) || WXPERL_W_VERSION_GE( 2, 8, 1 ) const wxAuiManager* GetAuiManager() %code{% RETVAL = &THIS->GetAuiManager(); %}; #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) || WXPERL_W_VERSION_GE( 2, 8, 5 ) void AdvanceSelection( bool advance = true ); int GetHeightForPageHeight( int pageHeight ); int GetTabCtrlHeight() const; void SetNormalFont( const wxFont& font ); void SetSelectedFont( const wxFont& font ); void SetMeasuringFont( const wxFont& font ); void SetTabCtrlHeight( int height ); bool ShowWindowMenu(); #endif void SetUniformBitmapSize( const wxSize& size ); }; Wx-0.9923/ext/aui/XS/AuiPaneInfo.xsp000664000000000000 1337712306612265 15321 0ustar00Mark000000000000############################################################################# ## Name: ext/aui/XS/AuiPaneInfo.xsp ## Purpose: XS++ for Wx::AuiPaneInfo ## Author: Mattia Barbon ## Modified by: ## Created: 11/11/2006 ## RCS-ID: $Id: AuiPaneInfo.xsp 2971 2010-08-28 13:49:35Z mbarbon $ ## Copyright: (c) 2006-2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include %module{Wx}; %name{Wx::AuiPaneInfo} class wxAuiPaneInfo { wxAuiPaneInfo(); %{ static void wxAuiPaneInfo::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxAuiPaneInfo() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::AuiPaneInfo", THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; %}; void SafeSet( const wxAuiPaneInfo& source ); bool IsOk() const; bool IsFixed() const; bool IsResizable() const; bool IsShown() const; bool IsFloating() const; bool IsDocked() const; bool IsToolbar() const; bool IsTopDockable() const; bool IsBottomDockable() const; bool IsLeftDockable() const; bool IsRightDockable() const; bool IsFloatable() const; bool IsMovable() const; bool IsDestroyOnClose() const; bool IsMaximized() const; bool HasCaption() const; bool HasGripper() const; bool HasBorder() const; bool HasCloseButton() const; bool HasMaximizeButton() const; bool HasMinimizeButton() const; bool HasPinButton() const; bool HasGripperTop() const; %typemap{wxAuiPaneInfo&}{parsed}{ %cpp_type{%SV*%}; %call_function_code{%$Call%}; %output_code{%$CVar = $PerlVar; SvREFCNT_inc( $PerlVar )%}; }; wxAuiPaneInfo& Window( wxWindow* w ); wxAuiPaneInfo& Name( const wxString& n ); wxAuiPaneInfo& Caption( const wxString& c ); wxAuiPaneInfo& Left(); wxAuiPaneInfo& Right(); wxAuiPaneInfo& Top(); wxAuiPaneInfo& Bottom(); wxAuiPaneInfo& Center(); wxAuiPaneInfo& Centre(); wxAuiPaneInfo& Direction( int direction ); wxAuiPaneInfo& Layer( int layer ); wxAuiPaneInfo& Row( int row ); wxAuiPaneInfo& Position( int pos ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxAuiPaneInfo& DockFixed( bool b = true ); #endif %name{BestSizeSize} wxAuiPaneInfo& BestSize( const wxSize& size ); %name{BestSizeWH} wxAuiPaneInfo& BestSize( int x, int y ); %{ void wxAuiPaneInfo::BestSize( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wsiz, BestSizeSize ) MATCH_REDISP( wxPliOvl_n_n, BestSizeWH ) END_OVERLOAD( Wx::AuiPaneInfo::BestSize ) %} %name{MaxSizeSize} wxAuiPaneInfo& MaxSize( const wxSize& size ); %name{MaxSizeWH} wxAuiPaneInfo& MaxSize( int x, int y ); %{ void wxAuiPaneInfo::MaxSize( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wsiz, MaxSizeSize ) MATCH_REDISP( wxPliOvl_n_n, MaxSizeWH ) END_OVERLOAD( Wx::AuiPaneInfo::MaxSize ) %} %name{MinSizeSize} wxAuiPaneInfo& MinSize( const wxSize& size ); %name{MinSizeWH} wxAuiPaneInfo& MinSize( int x, int y ); %{ void wxAuiPaneInfo::MinSize( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wsiz, MinSizeSize ) MATCH_REDISP( wxPliOvl_n_n, MinSizeWH ) END_OVERLOAD( Wx::AuiPaneInfo::MinSize ) %} %name{FloatingPositionPoint} wxAuiPaneInfo& FloatingPosition( const wxPoint& pos ); %name{FloatingPositionXY} wxAuiPaneInfo& FloatingPosition( int x, int y ); %{ void wxAuiPaneInfo::FloatingPosition( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wsiz, FloatingPositionPoint ) MATCH_REDISP( wxPliOvl_n_n, FloatingPositionXY ) END_OVERLOAD( Wx::AuiPaneInfo::FloatingPosition ) %} %name{FloatingSizeSize} wxAuiPaneInfo& FloatingSize( const wxSize& size ); %name{FloatingSizeWH} wxAuiPaneInfo& FloatingSize( int x, int y ); %{ void wxAuiPaneInfo::FloatingSize( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wsiz, FloatingSizeSize ) MATCH_REDISP( wxPliOvl_n_n, FloatingSizeWH ) END_OVERLOAD( Wx::AuiPaneInfo::FloatingSize ) %} wxAuiPaneInfo& Fixed(); wxAuiPaneInfo& Resizable( bool resizable = true ); wxAuiPaneInfo& Dock(); wxAuiPaneInfo& Float(); wxAuiPaneInfo& Hide(); wxAuiPaneInfo& Show( bool show = true ); wxAuiPaneInfo& CaptionVisible( bool visible = true ); wxAuiPaneInfo& Maximize(); wxAuiPaneInfo& Restore(); wxAuiPaneInfo& PaneBorder( bool visible = true ); wxAuiPaneInfo& Gripper( bool visible = true ); wxAuiPaneInfo& GripperTop( bool attop = true ); wxAuiPaneInfo& CloseButton( bool visible = true ); wxAuiPaneInfo& MaximizeButton( bool visible = true ); wxAuiPaneInfo& MinimizeButton( bool visible = true ); wxAuiPaneInfo& PinButton( bool visible = true ); wxAuiPaneInfo& DestroyOnClose( bool b = true ); wxAuiPaneInfo& TopDockable( bool b = true ); wxAuiPaneInfo& BottomDockable( bool b = true ); wxAuiPaneInfo& LeftDockable( bool b = true ); wxAuiPaneInfo& RightDockable( bool b = true ); wxAuiPaneInfo& Floatable( bool b = true ); wxAuiPaneInfo& Movable( bool b = true ); #if WXPERL_W_VERSION_LT( 2, 8, 0 ) wxAuiPaneInfo& SaveHidden(); wxAuiPaneInfo& RestoreHidden(); #endif wxAuiPaneInfo& Dockable( bool b = true ); wxAuiPaneInfo& DefaultPane(); wxAuiPaneInfo& CentrePane(); wxAuiPaneInfo& CenterPane(); wxAuiPaneInfo& ToolbarPane(); wxAuiPaneInfo& SetFlag( unsigned int flag, bool option_state ); bool HasFlag( unsigned int flag ) const; %typemap{wxAuiPaneInfo&}{reference}; }; Wx-0.9923/ext/calendar/000775000000000000 012316265011 12747 5ustar00Mark000000000000Wx-0.9923/ext/calendar/Calendar.pm000664000000000000 371112306612252 15102 0ustar00Mark000000000000############################################################################# ## Name: ext/calendar/Calendar.pm ## Purpose: Wx::CalendarCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 05/10/2002 ## RCS-ID: $Id: Calendar.pm 3224 2012-03-18 05:19:08Z mdootson $ ## Copyright: (c) 2002, 2005-2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::Calendar; use Wx::DateTime; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::load_dll( 'adv' ); Wx::wx_boot( 'Wx::Calendar', $VERSION ); # # properly setup inheritance tree # no strict; package Wx::CalendarCtrl; @ISA = qw(Wx::Control); package Wx::DatePickerCtrl; @ISA = qw(Wx::Control); package Wx::TimePickerCtrl; @ISA = qw(Wx::Control); package Wx::DateEvent; @ISA = qw(Wx::CommandEvent); package Wx::CalendarEvent; @ISA = qw(Wx::DateEvent); package Wx::Event; use strict; # !parser: sub { $_[0] =~ m/sub (EVT_\w+)/ } # !package: Wx::Event sub EVT_CALENDAR($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_CALENDAR_DOUBLECLICKED, $_[2] ) } sub EVT_CALENDAR_SEL_CHANGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_CALENDAR_SEL_CHANGED, $_[2] ) } sub EVT_CALENDAR_DAY($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_CALENDAR_DAY_CHANGED, $_[2] ) } sub EVT_CALENDAR_MONTH($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_CALENDAR_MONTH_CHANGED, $_[2] ) } sub EVT_CALENDAR_YEAR($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_CALENDAR_YEAR_CHANGED, $_[2] ) } sub EVT_CALENDAR_WEEKDAY_CLICKED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_CALENDAR_WEEKDAY_CLICKED, $_[2] ) } sub EVT_DATE_CHANGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_DATE_CHANGED, $_[2] ) } sub EVT_TIME_CHANGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_TIME_CHANGED, $_[2] ) } 1; # local variables: # mode: cperl # end: Wx-0.9923/ext/calendar/Calendar.xs000664000000000000 264112306612251 15120 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/calendar/Calendar.xs // Purpose: XS for Wx::DateTime // Author: Mattia Barbon // Modified by: // Created: 22/09/2002 // RCS-ID: $Id: Calendar.xs 3224 2012-03-18 05:19:08Z mdootson $ // Copyright: (c) 2002, 2005-2006, 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 ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/constants.h" #include "cpp/overload.h" #define wxDefaultDateTimePtr (wxDateTime*)&wxDefaultDateTime #define wxDefaultValidatorPtr (wxValidator*)&wxDefaultValidator #define wxDateTime__WeekDay wxDateTime::WeekDay #undef THIS MODULE=Wx__Calendar BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/DatePickerCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/CalendarCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/CalendarDateAttr.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/TimePickerCtrl.xsp # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__Calendar Wx-0.9923/ext/calendar/Makefile.PL000664000000000000 153412306612252 15006 0ustar00Mark000000000000############################################################################# ## Name: ext/calendar/Makefile.PL ## Purpose: Makefile.PL for wxCalendarCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 05/10/2002 ## RCS-ID: $Id: Makefile.PL 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2002-2003, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use Config; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::Calendar', VERSION_FROM => 'Calendar.pm', WX_CORE_LIB => 'adv core base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/calendar/t/000775000000000000 012316265011 13212 5ustar00Mark000000000000Wx-0.9923/ext/calendar/t/01_load.t000775000000000000 21612306612251 14661 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::Calendar; print "ok\n"; # local variables: # mode: cperl # end: Wx-0.9923/ext/calendar/t/02_inheritance.t000775000000000000 35712306612251 16242 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::Calendar; test_inheritance_end(); # local variables: # mode: cperl # end: Wx-0.9923/ext/calendar/t/03_threads.t000775000000000000 116412306612251 15421 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use if Wx::wxMOTIF, 'Test::More' => skip_all => 'Hangs under Motif'; use Test::More tests => 4; use Wx::Calendar; my $app = Wx::App->new( sub { 1 } ); my $cda = Wx::CalendarDateAttr->new; my $cda2 = Wx::CalendarDateAttr->new; undef $cda2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/calendar/typemap000664000000000000 156412306612251 14440 0ustar00Mark000000000000############################################################################# ## Name: ext/calendar/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 05/10/2002 ## RCS-ID: $Id: typemap 3224 2012-03-18 05:19:08Z mdootson $ ## Copyright: (c) 2002-2003, 2005, 2008-2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxDateTime__WeekDay T_ENUM wxCalendarDateBorder T_ENUM wxDateEvent * O_WXOBJECT wxCalendarEvent * O_WXOBJECT wxCalendarCtrl * O_WXOBJECT wxDatePickerCtrl * O_WXOBJECT wxTimePickerCtrl * O_WXOBJECT wxDateTime * O_NON_WXOBJECT_THR wxCalendarDateAttr * O_NON_WXOBJECT_THR Wx-0.9923/ext/calendar/XS/000775000000000000 012316265010 13300 5ustar00Mark000000000000Wx-0.9923/ext/calendar/XS/CalendarCtrl.xsp000664000000000000 1366312306612252 16506 0ustar00Mark000000000000############################################################################# ## Name: ext/calendar/XS/CalendarCtrl.xsp ## Purpose: XS++ for Wx::CalenderCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 05/10/2002 ## RCS-ID: $Id: CalendarCtrl.xsp 3224 2012-03-18 05:19:08Z mdootson $ ## Copyright: (c) 2002-2006, 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 ############################################################################# #include #include #include "xspp/calendar.h" %module{Wx}; %file{xspp/calendar.h}; %{ double calendar_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: calendar #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'C': r( wxCAL_SUNDAY_FIRST ); r( wxCAL_MONDAY_FIRST ); r( wxCAL_SHOW_HOLIDAYS ); r( wxCAL_NO_YEAR_CHANGE ); r( wxCAL_NO_MONTH_CHANGE ); r( wxCAL_SHOW_SURROUNDING_WEEKS ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxCAL_SHOW_WEEK_NUMBERS ); #endif r( wxCAL_SEQUENTIAL_MONTH_SELECTION ); r( wxCAL_HITTEST_NOWHERE ); r( wxCAL_HITTEST_HEADER ); r( wxCAL_HITTEST_DAY ); r( wxCAL_HITTEST_DECMONTH ); r( wxCAL_HITTEST_INCMONTH ); r( wxCAL_HITTEST_SURROUNDING_WEEK ); r( wxCAL_BORDER_NONE ); r( wxCAL_BORDER_SQUARE ); r( wxCAL_BORDER_ROUND ); break; case 'E': r( wxEVT_CALENDAR_SEL_CHANGED ); r( wxEVT_CALENDAR_DAY_CHANGED ); r( wxEVT_CALENDAR_MONTH_CHANGED ); r( wxEVT_CALENDAR_YEAR_CHANGED ); r( wxEVT_CALENDAR_DOUBLECLICKED ); r( wxEVT_CALENDAR_WEEKDAY_CLICKED ); #if WXPERL_W_VERSION_GE( 2, 5, 4 ) r( wxEVT_DATE_CHANGED ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 3 ) r( wxEVT_TIME_CHANGED ); #endif break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants calendar_module( &calendar_constant ); %} %file{-}; %typemap{wxDateEvent*}{simple}; %typemap{wxCalendarEvent*}{simple}; %typemap{wxCalendarCtrl*}{simple}; %typemap{wxCalendarDateAttr*}{simple}; %typemap{wxDateTime__WeekDay}{simple}; #if WXPERL_W_VERSION_GE( 2, 5, 4 ) %name{Wx::DateEvent} class wxDateEvent { const wxDateTime& GetDate(); void SetDate(const wxDateTime& date); }; #endif %name{Wx::CalendarEvent} class wxCalendarEvent { #if WXPERL_W_VERSION_LE( 2, 5, 3 ) && WXPERL_W_VERSION_GE( 2, 5, 2 ) void SetDate(const wxDateTime& date); void SetWeekDay(wxDateTime__WeekDay weekDay); #endif #if WXPERL_W_VERSION_LE( 2, 5, 3 ) const wxDateTime& GetDate(); #endif wxDateTime__WeekDay GetWeekDay(); }; %name{Wx::CalendarCtrl} class wxCalendarCtrl { %name{newDefault} wxCalendarCtrl() %code{% RETVAL = new wxCalendarCtrl(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxCalendarCtrl( wxWindow* parent, wxWindowID id = wxID_ANY, const wxDateTime& date = wxDefaultDateTimePtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, const wxString& name = wxCalendarNameStr ) %code{% RETVAL = new wxCalendarCtrl( parent, id, *date, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxDateTime& date = wxDefaultDateTimePtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, const wxString& name = wxCalendarNameStr ); void SetDate( const wxDateTime& date ); const wxDateTime& GetDate(); #if !defined(wxHAS_NATIVE_CALENDARCTRL) void EnableYearChange( bool enable = true ); #endif void EnableMonthChange( bool enable = true ); void EnableHolidayDisplay( bool display = true ); void SetHoliday( size_t day ); #if !defined(wxHAS_NATIVE_CALENDARCTRL) bool SetLowerDateLimit( const wxDateTime& date = wxDefaultDateTimePtr ); const wxDateTime& GetLowerDateLimit(); bool SetUpperDateLimit( const wxDateTime& date = wxDefaultDateTimePtr ); const wxDateTime& GetUpperDateLimit(); #endif bool SetDateRange ( const wxDateTime& lowerdate = wxDefaultDateTimePtr, const wxDateTime& upperdate = wxDefaultDateTimePtr ); void SetHeaderColours( const wxColour& colFg, const wxColour& colBg ); void SetHighlightColours( const wxColour& colFg, const wxColour& colBg ); void SetHolidayColours( const wxColour& colFg, const wxColour& colBg ); const wxColour& GetHeaderColourFg(); const wxColour& GetHeaderColourBg(); const wxColour& GetHighlightColourFg(); const wxColour& GetHighlightColourBg(); const wxColour& GetHolidayColourFg(); const wxColour& GetHolidayColourBg(); wxCalendarDateAttr* GetAttr( size_t day ) %code{% RETVAL = THIS->GetAttr(day); RETVAL = RETVAL ? new wxCalendarDateAttr( *RETVAL ) : NULL; %}; void SetAttr( size_t day, wxCalendarDateAttr* attr ) %code{% THIS->SetAttr( day, attr ? new wxCalendarDateAttr( *attr ) : NULL ); %}; void ResetAttr( size_t day ); }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::CalendarCtrl::new" ) %} Wx-0.9923/ext/calendar/XS/CalendarDateAttr.xsp000664000000000000 334212306612252 17263 0ustar00Mark000000000000############################################################################# ## Name: ext/calendar/XS/CalendarDateAttr.xsp ## Purpose: XS++ for Wx::CalenderDateAttr ## Author: Mattia Barbon ## Modified by: ## Created: 20/04/2003 ## RCS-ID: $Id: CalendarDateAttr.xsp 2567 2009-05-17 14:29:33Z mbarbon $ ## Copyright: (c) 2003, 2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include %module{Wx}; %typemap{wxCalendarDateAttr*}{simple}; %typemap{wxCalendarDateBorder}{simple}; %name{Wx::CalendarDateAttr} class wxCalendarDateAttr { wxCalendarDateAttr(); %{ static void wxCalendarDateAttr::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxCalendarDateAttr() %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::CalendarDateAttr", THIS, ST(0) ); delete THIS; %}; void SetTextColour( const wxColour& colText ); void SetBackgroundColour( const wxColour& colBack ); void SetBorderColour( const wxColour& col ); void SetFont( const wxFont& font ); void SetBorder( wxCalendarDateBorder border ); void SetHoliday( bool holiday ); bool HasTextColour(); bool HasBackgroundColour(); bool HasBorderColour(); bool HasFont(); bool HasBorder(); bool IsHoliday(); const wxColour& GetTextColour(); const wxColour& GetBackgroundColour(); const wxColour& GetBorderColour(); const wxFont& GetFont(); wxCalendarDateBorder GetBorder(); }; Wx-0.9923/ext/calendar/XS/DatePickerCtrl.xsp000664000000000000 741612306612252 16767 0ustar00Mark000000000000############################################################################# ## Name: ext/calendar/XS/DatePickerCtrl.xsp ## Purpose: XS++ for Wx::DatePickerCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 18/03/2005 ## RCS-ID: $Id: DatePickerCtrl.xsp 3012 2011-03-02 21:33:41Z mbarbon $ ## Copyright: (c) 2005-2008, 2010-2011 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if WXPERL_W_VERSION_GE( 2, 5, 4 ) #include #include #include #include "xspp/datectrl.h" %typemap{wxCalendarCtrl*}{simple}; %typemap{wxDatePickerCtrl*}{simple}; %typemap{wxDateTime}{reference}; %module{Wx}; %file{xspp/datectrl.h}; %{ #define wxDP_STYLE wxDP_DEFAULT|wxDP_SHOWCENTURY double datepicker_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: datepicker #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'D': r( wxDP_DEFAULT ); r( wxDP_SPIN ); r( wxDP_DROPDOWN ); r( wxDP_SHOWCENTURY ); r( wxDP_ALLOWNONE ); break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants datepicker_module( &datepicker_constant ); %} %file{-}; %name{Wx::DatePickerCtrl} class wxDatePickerCtrl { %name{newDefault} wxDatePickerCtrl() %code{% RETVAL = new wxDatePickerCtrl(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxDatePickerCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxDateTime& date = wxDefaultDateTimePtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDP_STYLE, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxDatePickerCtrlNameStr) %code{% RETVAL = new wxDatePickerCtrl( parent, id, *date, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxDateTime& dt = wxDefaultDateTimePtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDP_STYLE, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxDatePickerCtrlNameStr); void SetValue(const wxDateTime& dt); wxDateTime GetValue() const; void SetRange(const wxDateTime& dt1, const wxDateTime& dt2); }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::DatePickerCtrl::new" ) void wxDatePickerCtrl::GetRange() PPCODE: wxDateTime dt1, dt2; bool ok = THIS->GetRange( &dt1, &dt2 ); if( !ok ) return; EXTEND( SP, 2 ); PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxDateTime( dt1 ), "Wx::DateTime" ) ); PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxDateTime( dt2 ), "Wx::DateTime" ) ); %} #endif Wx-0.9923/ext/calendar/XS/TimePickerCtrl.xsp000664000000000000 436012306612252 17003 0ustar00Mark000000000000############################################################################# ## Name: ext/calendar/XS/TimePickerCtrl.xsp ## Purpose: XS++ for Wx::TimePickerCtrl ## Author: Mark Dootson ## Modified by: ## Created: 18/03/2012 ## RCS-ID: $Id:$ ## Copyright: (c) 2012, 2010-2011 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_TIMEPICKCTRL #include #include "xspp/timectrl.h" %typemap{wxTimePickerCtrl*}{simple}; %typemap{wxDateTime}{reference}; %module{Wx}; %file{xspp/timectrl.h}; %{ double timepicker_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: timepicker #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'T': r( wxTP_DEFAULT ); break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants timepicker_module( &timepicker_constant ); %} %file{-}; %name{Wx::TimePickerCtrl} class wxTimePickerCtrl : public wxControl { public: wxTimePickerCtrl(wxWindow* parent, wxWindowID id, const wxDateTime& dt = wxDefaultDateTimePtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTP_DEFAULT, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = "timectrl") %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow* parent, wxWindowID id, const wxDateTime& dt = wxDefaultDateTimePtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTP_DEFAULT, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = "timectrl"); virtual wxDateTime GetValue() const; virtual void SetValue(const wxDateTime& dt); }; #endif Wx-0.9923/ext/dataview/000775000000000000 012316265011 13002 5ustar00Mark000000000000Wx-0.9923/ext/dataview/DataView.pm000664000000000000 340112306612244 15125 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/DataView.pm ## Purpose: Wx::DataViewCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2007 ## RCS-ID: $Id: DataView.pm 2402 2008-05-19 21:43:32Z mbarbon $ ## Copyright: (c) 2007-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::DataView; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::load_dll( 'adv' ); Wx::wx_boot( 'Wx::DataView', $VERSION ); SetEvents(); # # properly setup inheritance tree # no strict; package Wx::DataViewCtrl; @ISA = qw(Wx::Control); package Wx::DataViewTreeCtrl; @ISA = qw(Wx::DataViewCtrl); package Wx::DataViewModel; package Wx::DataViewIndexListModel; @ISA = qw(Wx::DataViewModel); package Wx::PlDataViewIndexListModel; @ISA = qw(Wx::DataViewIndexListModel); package Wx::DataViewTreeStore; @ISA = qw(Wx::DataViewModel); package Wx::DataViewRenderer; package Wx::DataViewTextRenderer; @ISA = qw(Wx::DataViewCustomRenderer); package Wx::DataViewDateRenderer; @ISA = qw(Wx::DataViewCustomRenderer); package Wx::DataViewCustomRenderer; @ISA = qw(Wx::DataViewRenderer); package Wx::DataViewToggleRenderer; @ISA = qw(Wx::DataViewCustomRenderer); package Wx::DataViewIconTextRenderer; @ISA = qw(Wx::DataViewCustomRenderer); package Wx::DataViewBitmapRenderer; @ISA = qw(Wx::DataViewCustomRenderer); package Wx::DataViewTextRendererAttr; @ISA = qw(Wx::DataViewTextRenderer); package Wx::DataViewProgressRenderer; @ISA = qw(Wx::DataViewCustomRenderer); package Wx::DataViewEvent; @ISA = qw(Wx::NotifyEvent); 1; Wx-0.9923/ext/dataview/DataView.xs000664000000000000 657612306612244 15163 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/dataview/DataView.xs // Purpose: XS for Wx::DataViewCtrl // Author: Mattia Barbon // Modified by: // Created: 05/11/2007 // RCS-ID: $Id: DataView.xs 2929 2010-06-18 22:22:11Z mbarbon $ // Copyright: (c) 2007-2010 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/overload.h" // re-include for client data #include #include "cpp/helpers.h" #include "cpp/array_helpers.h" #define wxDefaultValidatorPtr (wxValidator*)&wxDefaultValidator #undef THIS #include "cpp/constants.h" #include "cpp/overload.h" #define wxNullIconPtr (wxIcon*) &wxNullIcon // event macros #define SEVT( NAME, ARGS ) wxPli_StdEvent( NAME, ARGS ) #define EVT( NAME, ARGS, ID ) wxPli_Event( NAME, ARGS, ID ) // !package: Wx::Event // !tag: // !parser: sub { $_[0] =~ m<^\s*S?EVT\(\s*(\w+)\s*\,> } static wxPliEventDescription evts[] = { { 0, 0, 0 } }; // TODO XS++ needs a way to move these inside the typemap #include #include typedef wxVector wxVectorVariant; class wxPli_convert_variant { public: bool operator()( pTHX_ wxVariant& dest, SV* src ) const { dest = wxPli_sv_2_wxvariant( aTHX_ src ); return true; } }; MODULE=Wx__DataView BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp -t typemap.xsp XS/DataViewCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp -t typemap.xsp XS/DataViewModel.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp -t typemap.xsp XS/DataViewIndexListModel.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp -t typemap.xsp XS/DataViewColumn.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp -t typemap.xsp XS/DataViewEvent.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp -t typemap.xsp XS/DataViewItem.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp -t typemap.xsp XS/DataViewModelNotifier.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp -t typemap.xsp XS/DataViewRenderer.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp -t typemap.xsp XS/DataViewTreeStore.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp -t typemap.xsp XS/DataViewTreeCtrl.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp -t typemap.xsp ../../interface/wx/dataview/dataviewlistctrl.h INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp -t typemap.xsp ../../interface/wx/dataview/dataviewliststore.h INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp -t typemap.xsp ../../interface/wx/dataview/dataviewvirtuallistmodel.h MODULE=Wx__DataView PACKAGE=Wx::DataView void SetEvents() CODE: wxPli_set_events( evts ); #include "cpp/ovl_const.cpp" # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__DataView Wx-0.9923/ext/dataview/Makefile.PL000664000000000000 153112306612244 15037 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/Makefile.PL ## Purpose: Makefile.PL for wxDataViewCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2007 ## RCS-ID: $Id: Makefile.PL 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2007, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use Config; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::DataView', VERSION_FROM => 'DataView.pm', REQUIRE_WX => 2.009000, WX_CORE_LIB => 'adv core base', ); Wx-0.9923/ext/dataview/t/000775000000000000 012316265010 13244 5ustar00Mark000000000000Wx-0.9923/ext/dataview/t/01_load.t000775000000000000 14512306612244 14717 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::DataView; print "ok\n"; Wx-0.9923/ext/dataview/t/02_inheritance.t000775000000000000 30712306612244 16272 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::DataView; test_inheritance_end(); Wx-0.9923/ext/dataview/t/03_threads.t000775000000000000 136112306612244 15455 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use if Wx::wxMOTIF, 'Test::More' => skip_all => 'Hangs under Motif'; use Test::More tests => 4; use Wx::DataView; my $app = Wx::App->new( sub { 1 } ); my $dvr = Wx::DataViewTextRenderer->new; my $dvr2 = Wx::DataViewTextRenderer->new; my $dvc = Wx::DataViewColumn->new( 'a', $dvr, 0 ); my $dvc2 = Wx::DataViewColumn->new( 'a', $dvr2, 0 ); undef $dvr2; undef $dvc2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/dataview/t/08_ovl_func.t000775000000000000 406112306612244 15643 0ustar00Mark000000000000#!/usr/bin/perl -w # test that overload dispatch works for # specific functions use strict; use Wx; use Wx::DataView; use lib '../../t'; use Test::More 'tests' => 12; use Tests_Helper qw(test_app :overload); my $nolog = Wx::LogNull->new; { package TestModel; use base qw(Wx::PlDataViewIndexListModel); sub GetColumnCount { 1 } sub GetColumnType { 'wxString' } } test_app( sub { my $frame = Wx::Frame->new( undef, -1, 'a' ); my $bmpok = Wx::Bitmap->new( '../../wxpl.ico', Wx::wxBITMAP_TYPE_ICO() ); my $imgok = Wx::Image->new( '../../wxpl.ico', Wx::wxBITMAP_TYPE_ICO() ); my $icook = Wx::GetWxPerlIcon(); my $model = TestModel->new; my $dv = Wx::DataViewCtrl->new( $frame ); $dv->AssociateModel( $model ); test_override { $dv->AppendBitmapColumn( 'a', 0 ) } 'Wx::DataViewCtrl::AppendBitmapColumnLabel'; test_override { $dv->AppendBitmapColumn( $bmpok, 0 ) } 'Wx::DataViewCtrl::AppendBitmapColumnBitmap'; test_override { $dv->AppendDateColumn( 'a', 0 ) } 'Wx::DataViewCtrl::AppendDateColumnLabel'; test_override { $dv->AppendDateColumn( $bmpok, 0 ) } 'Wx::DataViewCtrl::AppendDateColumnBitmap'; test_override { $dv->AppendProgressColumn( 'a', 0 ) } 'Wx::DataViewCtrl::AppendProgressColumnLabel'; test_override { $dv->AppendProgressColumn( $bmpok, 0 ) } 'Wx::DataViewCtrl::AppendProgressColumnBitmap'; test_override { $dv->AppendIconTextColumn( 'a', 0 ) } 'Wx::DataViewCtrl::AppendIconTextColumnLabel'; test_override { $dv->AppendIconTextColumn( $bmpok, 0 ) } 'Wx::DataViewCtrl::AppendIconTextColumnBitmap'; test_override { $dv->AppendTextColumn( 'a', 0 ) } 'Wx::DataViewCtrl::AppendTextColumnLabel'; test_override { $dv->AppendTextColumn( $bmpok, 0 ) } 'Wx::DataViewCtrl::AppendTextColumnBitmap'; test_override { $dv->AppendToggleColumn( 'a', 0 ) } 'Wx::DataViewCtrl::AppendToggleColumnLabel'; test_override { $dv->AppendToggleColumn( $bmpok, 0 ) } 'Wx::DataViewCtrl::AppendToggleColumnBitmap'; } ); Wx-0.9923/ext/dataview/typemap000664000000000000 367212306612244 14477 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2007 ## RCS-ID: $Id: typemap 2938 2010-07-04 12:56:48Z mbarbon $ ## Copyright: (c) 2007, 2009-2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxDataViewCellMode T_ENUM wxAlignment T_ENUM wxDataViewCtrl * O_WXOBJECT wxDataViewTreeCtrl * O_WXOBJECT wxDataViewListCtrl * O_WXOBJECT wxDataViewColumn * O_NON_WXOBJECT_THR const wxDataViewColumn * O_NON_WXOBJECT wxDataViewModel * O_NON_WXOBJECT wxDataViewTreeStore * O_NON_WXOBJECT const wxDataViewTreeStore * O_NON_WXOBJECT wxDataViewItem * O_NON_WXOBJECT wxDataViewItemAttr * O_NON_WXOBJECT wxDataViewIndexListModel* O_NON_WXOBJECT wxPlDataViewIndexListModel* O_NON_WXOBJECT wxDataViewVirtualListModel* O_NON_WXOBJECT wxPlDataViewVirtualListModel * O_NON_WXOBJECT wxDataViewRenderer * O_WXOBJECT_THR wxDataViewEvent * O_WXOBJECT_THR wxDataViewModelNotifier * O_NON_WXOBJECT wxDataViewTextRenderer * O_WXOBJECT_THR wxDataViewTextRendererAttr * O_WXOBJECT wxDataViewProgressRenderer * O_WXOBJECT_THR wxDataViewIconTextRenderer * O_WXOBJECT_THR wxDataViewToggleRenderer * O_WXOBJECT_THR wxDataViewBitmapRenderer * O_WXOBJECT_THR wxDataViewDateRenderer * O_WXOBJECT_THR wxDataViewSpinRenderer * O_WXOBJECT_THR wxDataViewIconText* O_NON_WXOBJECT wxDataViewListStore * O_NON_WXOBJECT const wxDataViewListStore * O_NON_WXOBJECT wxVectorVariant T_VECTORVARIANT INPUT T_VECTORVARIANT wxPli_av_2_arrayany( aTHX_ $arg, & $var, wxPli_convert_variant(), wxPli_vector_allocator, wxVariant>( & $var ) ); Wx-0.9923/ext/dataview/typemap.xsp000664000000000000 505712306612244 15307 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/typemap.xsp ## Purpose: typemap file for xsubppp.pl ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2007 ## RCS-ID: $Id: typemap.xsp 3346 2012-09-16 01:10:42Z mdootson $ ## Copyright: (c) 2007-2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %typemap{wxDataViewCellMode}{simple}; %typemap{wxDataViewCtrl*}{simple}; %typemap{wxDataViewModel*}{simple}; %typemap{wxDataViewModelDisown*}{parsed}{ %cpp_type{%wxDataViewModel*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; %precall_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; %typemap{wxDataViewColumn*}{simple}; %typemap{const wxDataViewColumn*}{simple}; %typemap{wxDataViewColumnDisown*}{parsed}{ %cpp_type{%wxDataViewColumn*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; %precall_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; %typemap{const wxDataViewItem &}{reference}; %typemap{wxDataViewIndexListModel*}{simple}; %typemap{wxDataViewItem&}{reference}; %typemap{wxPlDataViewIndexListModel*}{simple}; %typemap{wxDataViewRenderer*}{simple}; %typemap{wxDataViewRendererDisown*}{parsed}{ %cpp_type{%wxDataViewRenderer*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; %precall_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; %typemap{wxAlignment}{simple}; %typemap{wxDataViewEvent*}{simple}; %typemap{wxDataViewItemAttr*}{simple}; %typemap{wxDataViewModelNotifier*}{simple}; %typemap{wxDataViewTextRenderer*}{simple}; %typemap{wxDataViewTextRendererAttr*}{simple}; %typemap{wxDataViewProgressRenderer*}{simple}; %typemap{wxDataViewIconTextRenderer*}{simple}; %typemap{wxDataViewToggleRenderer*}{simple}; %typemap{wxDataViewBitmapRenderer*}{simple}; %typemap{wxDataViewDateRenderer*}{simple}; %typemap{wxDataViewSpinRenderer*}{simple}; %typemap{wxDataViewIconText*}{simple}; %typemap{wxDataViewTreeStore*}{simple}; %typemap{const wxDataViewTreeStore*}{simple}; %typemap{wxDataViewTreeCtrl*}{simple}; %typemap{wxDataViewListStore*}{simple}; %typemap{const wxDataViewListStore*}{simple}; %typemap{Wx_UserDataO*}{simple}; /* %typemap{Wx_UserDataOwxUIntPtr*}{parsed}{ %cpp_type{%Wx_UserDataO*%}; %precall_code{% reinterpret_cast($CVar); %}; }; */ Wx-0.9923/ext/dataview/XS/000775000000000000 012316265011 13334 5ustar00Mark000000000000Wx-0.9923/ext/dataview/XS/DataViewColumn.xsp000664000000000000 566112306612244 17045 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/XS/DataViewColumn.xsp ## Purpose: XS++ for Wx::DataViewColumn ## Author: Mattia Barbon ## Modified by: ## Created: 25/11/2007 ## RCS-ID: $Id: DataViewColumn.xsp 2573 2009-05-17 16:56:34Z mbarbon $ ## Copyright: (c) 2007, 2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxUSE_DATAVIEWCTRL #include # DECLARE_OVERLOAD( wdvr, Wx::DataViewRenderer ) %module{Wx}; %name{Wx::DataViewColumn} class wxDataViewColumn { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_wdvr_n_n_n_n, new1, 3 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wbmp_wdvr_n_n_n_n, new2, 3 ) END_OVERLOAD( "Wx::DataViewColumn::new" ) %} %name{new1} wxDataViewColumn( const wxString& title, wxDataViewRendererDisown* renderer, unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH, wxAlignment align = wxALIGN_CENTRE, int flags = wxDATAVIEW_COL_RESIZABLE ); %name{new2} wxDataViewColumn( const wxBitmap& bitmap, wxDataViewRendererDisown* renderer, unsigned int model_column, int width = wxDVC_DEFAULT_WIDTH, wxAlignment align = wxALIGN_CENTRE, int flags = wxDATAVIEW_COL_RESIZABLE ); %{ static void wxDataViewColumn::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxDataViewColumn::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::DataViewColumn", THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; %} void SetTitle( const wxString &title ); void SetAlignment( wxAlignment align ); void SetSortable( bool sortable ); void SetReorderable(bool reorderable); void SetResizeable( bool resizeable ); void SetHidden( bool hidden ); void SetSortOrder( bool ascending ); void SetFlags( int flags ); void SetOwner( wxDataViewCtrl* owner ); void SetBitmap( const wxBitmap &bitmap ); void SetMinWidth( int minWidth ); void SetWidth( int width ); wxString GetTitle() const; wxAlignment GetAlignment() const; int GetWidth() const; int GetMinWidth() const; int GetFlags() const; bool IsHidden() const; bool IsReorderable() const; bool IsResizeable() const; bool IsSortable() const; bool IsSortOrderAscending() const; const wxBitmap& GetBitmap() const; unsigned int GetModelColumn() const; wxDataViewCtrl* GetOwner() const; wxDataViewRendererDisown* GetRenderer() const; }; #endif Wx-0.9923/ext/dataview/XS/DataViewCtrl.xsp000664000000000000 2443412306612244 16533 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/XS/DataViewCtrl.xsp ## Purpose: XS++ for Wx::DataViewCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2007 ## RCS-ID: $Id: DataViewCtrl.xsp 2973 2010-08-28 14:23:16Z mbarbon $ ## Copyright: (c) 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 ############################################################################# #if wxUSE_DATAVIEWCTRL #include #include "xspp/dataview.h" %typemap{wxRect&}{reference}; %module{Wx}; %file{xspp/dataview.h}; %{ double dataview_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: dataview #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'D': r( wxDV_SINGLE ); r( wxDV_MULTIPLE ); r( wxDV_NO_HEADER ); r( wxDV_HORIZ_RULES ); r( wxDV_VERT_RULES ); r( wxDV_ROW_LINES ); r( wxDVR_DEFAULT_ALIGNMENT ); r( wxDATAVIEW_CELL_INERT ); r( wxDATAVIEW_CELL_ACTIVATABLE ); r( wxDATAVIEW_CELL_EDITABLE ); r( wxDATAVIEW_CELL_SELECTED ); r( wxDATAVIEW_CELL_PRELIT ); r( wxDATAVIEW_CELL_INSENSITIVE ); r( wxDATAVIEW_CELL_FOCUSED ); r( wxDATAVIEW_COL_RESIZABLE ); r( wxDATAVIEW_COL_SORTABLE ); r( wxDATAVIEW_COL_REORDERABLE ); r( wxDATAVIEW_COL_HIDDEN ); break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants dataview_module( &dataview_constant ); %} %file{-}; %name{Wx::DataViewCtrl} class wxDataViewCtrl { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::DataViewCtrl::new" ) %} %name{newDefault} wxDataViewCtrl() %code{% RETVAL = new wxDataViewCtrl(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxDataViewCtrl( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr ) %code{% RETVAL = new wxDataViewCtrl( parent, id, pos, size, style, *validator ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr ); bool AssociateModel( wxDataViewModel* model ); wxDataViewModel* GetModel() %code{% RETVAL = THIS->GetModel(); if( RETVAL ) RETVAL->IncRef(); %}; bool PrependColumn( wxDataViewColumnDisown* col ); bool AppendColumn( wxDataViewColumnDisown* col ); ## Bitmap %{ void AppendBitmapColumn( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wbmp_n_n_n, AppendBitmapColumnBitmap, 2 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n_n_n, AppendBitmapColumnLabel, 2 ) END_OVERLOAD( "Wx::DataViewCtrl::AppendBitmapColumn" ) %} %name{AppendBitmapColumnLabel} wxDataViewColumnDisown* AppendBitmapColumn( const wxString& label, unsigned int model_column, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 ); %name{AppendBitmapColumnBitmap} wxDataViewColumnDisown* AppendBitmapColumn( const wxBitmap& label, unsigned int model_column, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 ); ## Date %{ void AppendDateColumn( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wbmp_n_n_n, AppendDateColumnBitmap, 2 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n_n_n, AppendDateColumnLabel, 2 ) END_OVERLOAD( "Wx::DataViewCtrl::AppendDateColumn" ) %} %name{AppendDateColumnLabel} wxDataViewColumnDisown* AppendDateColumn( const wxString& label, unsigned int model_column, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 ); %name{AppendDateColumnBitmap} wxDataViewColumnDisown* AppendDateColumn( const wxBitmap& label, unsigned int model_column, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 ); ## Progress %{ void AppendProgressColumn( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wbmp_n_n_n, AppendProgressColumnBitmap, 2 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n_n_n, AppendProgressColumnLabel, 2 ) END_OVERLOAD( "Wx::DataViewCtrl::AppendProgressColumn" ) %} %name{AppendProgressColumnLabel} wxDataViewColumnDisown* AppendProgressColumn( const wxString& label, unsigned int model_column, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 80 ); %name{AppendProgressColumnBitmap} wxDataViewColumnDisown* AppendProgressColumn( const wxBitmap& label, unsigned int model_column, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 80 ); ## IconText %{ void AppendIconTextColumn( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wbmp_n_n_n, AppendIconTextColumnBitmap, 2 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n_n_n, AppendIconTextColumnLabel, 2 ) END_OVERLOAD( "Wx::DataViewCtrl::AppendIconTextColumn" ) %} %name{AppendIconTextColumnLabel} wxDataViewColumnDisown* AppendIconTextColumn( const wxString& label, unsigned int model_column, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 ); %name{AppendIconTextColumnBitmap} wxDataViewColumnDisown* AppendIconTextColumn( const wxBitmap& label, unsigned int model_column, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 ); ## Text %{ void AppendTextColumn( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wbmp_n_n_n, AppendTextColumnBitmap, 2 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n_n_n, AppendTextColumnLabel, 2 ) END_OVERLOAD( "Wx::DataViewCtrl::AppendTextColumn" ) %} %name{AppendTextColumnLabel} wxDataViewColumnDisown* AppendTextColumn( const wxString& label, unsigned int model_column, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 ); %name{AppendTextColumnBitmap} wxDataViewColumnDisown* AppendTextColumn( const wxBitmap& label, unsigned int model_column, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 ); ## Toggle %{ void AppendToggleColumn( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wbmp_n_n_n, AppendToggleColumnBitmap, 2 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n_n_n, AppendToggleColumnLabel, 2 ) END_OVERLOAD( "Wx::DataViewCtrl::AppendToggleColumn" ) %} %name{AppendToggleColumnLabel} wxDataViewColumnDisown* AppendToggleColumn( const wxString& label, unsigned int model_column, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 30 ); %name{AppendToggleColumnBitmap} wxDataViewColumnDisown* AppendToggleColumn( const wxBitmap& label, unsigned int model_column, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 30 ); unsigned int GetColumnCount() const; wxDataViewColumnDisown* GetColumn( unsigned int pos ) const; int GetColumnPosition( const wxDataViewColumn* column ) const; bool DeleteColumn( wxDataViewColumn* column ); bool ClearColumns(); void SetExpanderColumn( wxDataViewColumn* col ); wxDataViewColumnDisown* GetExpanderColumn() const; ## wxDataViewColumnDisown* GetSortingColumn() const; void SetIndent( int indent ); int GetIndent() const; wxDataViewItem& GetSelection() const; void Select( const wxDataViewItem& item ); void Unselect( const wxDataViewItem& item ); bool IsSelected( const wxDataViewItem& item ) const; void SelectAll(); void UnselectAll(); void Expand( const wxDataViewItem& item ); void Collapse( const wxDataViewItem& item ); void EnsureVisible( const wxDataViewItem& item, const wxDataViewColumn* column = NULL ); wxRect& GetItemRect( const wxDataViewItem& item, const wxDataViewColumn* column = NULL ) const; }; #endif Wx-0.9923/ext/dataview/XS/DataViewEvent.xsp000664000000000000 236112306612244 16663 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/XS/DataViewEvent.xsp ## Purpose: XS++ for Wx::DataViewEvent ## Author: Mattia Barbon ## Modified by: ## Created: 25/11/2007 ## RCS-ID: $Id: DataViewEvent.xsp 2314 2008-01-18 21:44:32Z mbarbon $ ## Copyright: (c) 2007-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxUSE_DATAVIEWCTRL #include %module{Wx}; %name{Wx::DataViewEvent} class wxDataViewEvent { wxDataViewEvent( wxEventType type, wxWindowID id ); wxDataViewItem& GetItem() const; void SetItem( const wxDataViewItem& item ); int GetColumn() const; void SetColumn( int col ); wxDataViewModel* GetModel() const; void SetModel( wxDataViewModel *model ); const wxVariant &GetValue() const; void SetValue( const wxVariant &value ); void SetDataViewColumn( wxDataViewColumn* col ); wxDataViewColumnDisown* GetDataViewColumn() const; ## wxPoint GetPosition() const; void SetPosition( int x, int y ); }; #endif Wx-0.9923/ext/dataview/XS/DataViewIndexListModel.xsp000664000000000000 627512306612244 20476 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/XS/DataViewIndexListModel.xsp ## Purpose: XS++ for Wx::DataViewIndexListModel ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2007 ## RCS-ID: $Id: DataViewIndexListModel.xsp 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2007-2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxUSE_DATAVIEWCTRL %module{Wx}; #include #include "xspp/dataviewindexmodel.h" %file{xspp/dataviewindexmodel.h}; %{ #include "cpp/v_cback.h" class wxPlDataViewIndexListModel : public wxDataViewIndexListModel { WXPLI_DECLARE_V_CBACK(); public: wxPlDataViewIndexListModel( const char* package, unsigned int initial_size ) : wxDataViewIndexListModel( initial_size ), m_callback( "Wx::PlDataViewIndexListModel" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } // DEC_V_CBACK_UINT__VOID( GetRowCount ); DEC_V_CBACK_UINT__VOID_const( GetColumnCount ); DEC_V_CBACK_WXSTRING__UINT_const( GetColumnType ); DEC_V_CBACK_VOID__mWXVARIANT_UINT_UINT_const( GetValueByRow ); DEC_V_CBACK_BOOL__WXVARIANT_UINT_UINT( SetValueByRow ); }; DEF_V_CBACK_UINT__VOID_const_pure( wxPlDataViewIndexListModel, wxDataViewIndexListModel, GetColumnCount ); DEF_V_CBACK_WXSTRING__UINT_const_pure( wxPlDataViewIndexListModel, wxDataViewIndexListModel, GetColumnType ); // DEF_V_CBACK_UINT__VOID_pure( wxPlDataViewIndexListModel, // wxDataViewIndexListModel, GetRowCount ); DEF_V_CBACK_VOID__mWXVARIANT_UINT_UINT_const_pure( wxPlDataViewIndexListModel, wxDataViewIndexListModel, GetValueByRow ); DEF_V_CBACK_BOOL__WXVARIANT_UINT_UINT_pure( wxPlDataViewIndexListModel, wxDataViewIndexListModel, SetValueByRow ); %} %file{-}; %name{Wx::DataViewIndexListModel} class wxDataViewIndexListModel { ## unsigned int GetRowCount(); void GetValueByRow( wxVariant &variant, unsigned int row, unsigned int col ) const; bool SetValueByRow( const wxVariant &variant, unsigned int row, unsigned int col ); void RowPrepended(); void RowInserted( unsigned int before ); void RowAppended(); void RowDeleted( unsigned int row ); void RowChanged( unsigned int row ); void RowValueChanged( unsigned int row, unsigned int col ); unsigned int GetRow( const wxDataViewItem &item ) const; wxDataViewItem& GetItem( unsigned int row ) const; void Reset( unsigned int new_size ); }; %name{Wx::PlDataViewIndexListModel} class wxPlDataViewIndexListModel { wxPlDataViewIndexListModel( unsigned int initial_size = 0 ) %code{% RETVAL = new wxPlDataViewIndexListModel( CLASS, initial_size ); %}; }; #endif Wx-0.9923/ext/dataview/XS/DataViewItem.xsp000664000000000000 314712306612244 16503 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/XS/DataViewItem.xsp ## Purpose: XS++ for Wx::DataViewItem ## Author: Mattia Barbon ## Modified by: ## Created: 25/11/2007 ## RCS-ID: $Id: DataViewItem.xsp 3347 2012-09-16 23:17:55Z mdootson $ ## Copyright: (c) 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxUSE_DATAVIEWCTRL #include %module{Wx}; %typemap{IV}{simple}; %name{Wx::DataViewItem} class wxDataViewItem { ## wxDataViewItem( IV id ) ## %code{% RETVAL = new wxDataViewItem( INT2PTR( void*, id ) ); %}; ## FIXME dtor? IV GetID() const %code{% RETVAL = PTR2IV( THIS->GetID() ); %}; bool IsOk() const; }; %name{Wx::DataViewItemAttr} class wxDataViewItemAttr { wxDataViewItemAttr(); ## FIXME dtor? void SetColour( const wxColour& colour ); void SetBold( bool set ); void SetItalic( bool set ); bool HasColour() const; const wxColour& GetColour() const; bool GetBold() const; bool GetItalic() const; #if WXPERL_W_VERSION_GE( 2, 9, 4 ) void SetBackgroundColour(const wxColour& colour); bool HasFont() const; bool HasBackgroundColour() const; wxColour GetBackgroundColour() const; bool IsDefault() const; // Return the font based on the given one with this attribute applied to it. wxFont GetEffectiveFont(const wxFont& font) const; #endif }; #endif Wx-0.9923/ext/dataview/XS/DataViewModel.xsp000664000000000000 275512306612244 16651 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/XS/DataViewModel.xsp ## Purpose: XS++ for Wx::DataViewModel ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2007 ## RCS-ID: $Id: DataViewModel.xsp 2312 2007-12-31 00:34:47Z mbarbon $ ## Copyright: (c) 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxUSE_DATAVIEWCTRL %module{Wx}; #include %name{Wx::DataViewModel} class wxDataViewModel { ~wxDataViewModel() %code%{ THIS->DecRef(); %}; void Resort(); unsigned int GetColumnCount() const; wxString GetColumnType( unsigned int col ); bool SetValue( const wxVariant &variant, const wxDataViewItem &item, unsigned int col ); wxDataViewItem& GetParent( const wxDataViewItem &item ) const; bool IsContainer( const wxDataViewItem &item ) const; bool HasContainerColumns( const wxDataViewItem& item ) const; bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item ); bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item ); bool ItemChanged( const wxDataViewItem &item ); bool ValueChanged( const wxDataViewItem &item, unsigned int col ); bool Cleared(); bool HasDefaultCompare() const; }; #endif Wx-0.9923/ext/dataview/XS/DataViewModelNotifier.xsp000664000000000000 170312306612244 20341 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/XS/DataViewModelNotifier.xsp ## Purpose: XS++ for Wx::DataViewModelNotifier ## Author: Mattia Barbon ## Modified by: ## Created: 25/11/2007 ## RCS-ID: $Id: DataViewModelNotifier.xsp 2314 2008-01-18 21:44:32Z mbarbon $ ## Copyright: (c) 2007-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxUSE_DATAVIEWCTRL #include %module{Wx}; %name{Wx::DataViewModelNotifier} class wxDataViewModelNotifier { ## wxDataViewModelNotifier(); %{ ## // thread KO void wxDataViewModelNotifier::DESTROY() CODE: if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; %} wxDataViewModelDisown* GetOwner(); }; #endif Wx-0.9923/ext/dataview/XS/DataViewRenderer.xsp000664000000000000 717512306612244 17360 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/XS/DataViewRenderer.xsp ## Purpose: XS++ for Wx::DataView*Renderer ## Author: Mattia Barbon ## Modified by: ## Created: 25/11/2007 ## RCS-ID: $Id: DataViewRenderer.xsp 2573 2009-05-17 16:56:34Z mbarbon $ ## Copyright: (c) 2007-2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxUSE_DATAVIEWCTRL #include %module{Wx}; %name{Wx::DataViewRenderer} class wxDataViewRenderer { ## wxDataViewRenderer( const wxString& varianttype, ## wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT ); %{ static void wxDataViewRenderer::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxDataViewRenderer::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; %} wxDataViewColumnDisown* GetOwner(); wxDataViewCellMode GetMode() const; void SetMode( wxDataViewCellMode mode ); wxString GetVariantType() const; }; %name{Wx::DataViewTextRenderer} class wxDataViewTextRenderer { wxDataViewRenderer( const wxString& varianttype = wxT("string"), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT ); }; %name{Wx::DataViewTextRendererAttr} class wxDataViewTextRendererAttr { wxDataViewTextRendererAttr( const wxString &varianttype = wxT("string"), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); }; %name{Wx::DataViewProgressRenderer} class wxDataViewProgressRenderer { wxDataViewProgressRenderer( const wxString& label = wxEmptyString, const wxString& varianttype = wxT("long"), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT ); }; %name{Wx::DataViewIconText} class wxDataViewIconText { wxDataViewIconText( const wxString& text = wxEmptyString, const wxIcon& icon = wxNullIconPtr ); const wxIcon& GetIcon() const; wxString GetText() const; void SetIcon( const wxIcon& icon ); void SetText( const wxString& text ); }; %name{Wx::DataViewIconTextRenderer} class wxDataViewIconTextRenderer { wxDataViewIconTextRenderer( const wxString& varianttype = wxT("wxDataViewIconText"), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT ); }; %name{Wx::DataViewToggleRenderer} class wxDataViewToggleRenderer { wxDataViewToggleRenderer( const wxString& varianttype = wxT("bool"), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT ); }; %name{Wx::DataViewBitmapRenderer} class wxDataViewBitmapRenderer { wxDataViewBitmapRenderer( const wxString& varianttype = wxT("wxBitmap"), wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT ); }; %name{Wx::DataViewDateRenderer} class wxDataViewDateRenderer { wxDataViewDateRenderer( const wxString& varianttype = wxT("datetime"), wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE ); }; %name{Wx::DataViewSpinRenderer} class wxDataViewSpinRenderer { wxDataViewSpinRenderer( int min, int max, wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, int alignment = wxDVR_DEFAULT_ALIGNMENT ); }; #endif Wx-0.9923/ext/dataview/XS/DataViewTreeCtrl.xsp000664000000000000 1120612306612244 17344 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/XS/DataViewTreeCtrl.xsp ## Purpose: XS++ for Wx::DataViewTreeCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 24/12/2007 ## RCS-ID: $Id: DataViewTreeCtrl.xsp 2523 2009-02-04 23:50:57Z mbarbon $ ## Copyright: (c) 2007, 2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxUSE_DATAVIEWCTRL %module{Wx}; #include #include #define wxPLI_DEFAULT_DV_CTRL (wxDV_NO_HEADER|wxDV_ROW_LINES) %name{Wx::DataViewTreeCtrl} class wxDataViewTreeCtrl { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::DataViewTreeCtrl::new" ) %} %name{newDefault} wxDataViewTreeCtrl() %code{% RETVAL = new wxDataViewTreeCtrl(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxDataViewTreeCtrl( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPLI_DEFAULT_DV_CTRL, const wxValidator& validator = wxDefaultValidatorPtr ) %code{% RETVAL = new wxDataViewTreeCtrl( parent, id, pos, size, style, *validator ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPLI_DEFAULT_DV_CTRL, const wxValidator& validator = wxDefaultValidatorPtr ); wxDataViewTreeStore *GetStore(); void SetImageList( wxImageList *imagelist ); wxImageList* GetImageList(); wxDataViewItem& AppendItem( const wxDataViewItem& parent, const wxString &text, int icon = -1, wxPliUserDataCD *data = NULL ); wxDataViewItem& PrependItem( const wxDataViewItem& parent, const wxString &text, int icon = -1, wxPliUserDataCD *data = NULL ); wxDataViewItem& InsertItem( const wxDataViewItem& parent, const wxDataViewItem& previous, const wxString &text, int icon = -1, wxPliUserDataCD *data = NULL ); wxDataViewItem& PrependContainer( const wxDataViewItem& parent, const wxString &text, int icon = -1, int expanded = -1, wxPliUserDataCD *data = NULL ); wxDataViewItem& AppendContainer( const wxDataViewItem& parent, const wxString &text, int icon = -1, int expanded = -1, wxPliUserDataCD *data = NULL ); wxDataViewItem& InsertContainer( const wxDataViewItem& parent, const wxDataViewItem& previous, const wxString &text, int icon = -1, int expanded = -1, wxPliUserDataCD *data = NULL ); wxDataViewItem& GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const; int GetChildCount( const wxDataViewItem& parent ) const; void SetItemText( const wxDataViewItem& item, const wxString &text ); wxString GetItemText( const wxDataViewItem& item ) const; void SetItemIcon( const wxDataViewItem& item, const wxIcon &icon ); const wxIcon &GetItemIcon( const wxDataViewItem& item ) const; void SetItemExpandedIcon( const wxDataViewItem& item, const wxIcon &icon ); const wxIcon &GetItemExpandedIcon( const wxDataViewItem& item ) const; void SetItemData( const wxDataViewItem& item, wxPliUserDataCD *data ); wxPliUserDataCD *GetItemData( const wxDataViewItem& item ) const %code{% RETVAL = (wxPliUserDataCD*) THIS->GetItemData( *item ); %}; void DeleteItem( const wxDataViewItem& item ); void DeleteChildren( const wxDataViewItem& item ); void DeleteAllItems(); }; #endif Wx-0.9923/ext/dataview/XS/DataViewTreeStore.xsp000664000000000000 713512306612244 17522 0ustar00Mark000000000000############################################################################# ## Name: ext/dataview/XS/DataViewTreeStore.xsp ## Purpose: XS++ for Wx::DataViewTreeStore ## Author: Mattia Barbon ## Modified by: ## Created: 24/12/2007 ## RCS-ID: $Id: DataViewTreeStore.xsp 2312 2007-12-31 00:34:47Z mbarbon $ ## Copyright: (c) 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxUSE_DATAVIEWCTRL %module{Wx}; #include %name{Wx::DataViewTreeStore} class wxDataViewTreeStore { wxDataViewTreeStore(); wxDataViewItem& AppendItem( const wxDataViewItem& parent, const wxString& text, const wxIcon& icon = wxNullIconPtr, wxPliUserDataCD* data = NULL ); wxDataViewItem& PrependItem( const wxDataViewItem& parent, const wxString& text, const wxIcon& icon = wxNullIconPtr, wxPliUserDataCD* data = NULL ); wxDataViewItem& InsertItem( const wxDataViewItem& parent, const wxDataViewItem& previous, const wxString &text, const wxIcon &icon = wxNullIconPtr, wxPliUserDataCD *data = NULL ); wxDataViewItem& PrependContainer( const wxDataViewItem& parent, const wxString &text, const wxIcon &icon = wxNullIconPtr, const wxIcon &expanded = wxNullIconPtr, wxPliUserDataCD *data = NULL ); wxDataViewItem& AppendContainer( const wxDataViewItem& parent, const wxString &text, const wxIcon &icon = wxNullIconPtr, const wxIcon &expanded = wxNullIconPtr, wxPliUserDataCD *data = NULL ); wxDataViewItem& InsertContainer( const wxDataViewItem& parent, const wxDataViewItem& previous, const wxString &text, const wxIcon& icon = wxNullIconPtr, const wxIcon& expanded = wxNullIconPtr, wxPliUserDataCD* data = NULL ); wxDataViewItem& GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const; int GetChildCount( const wxDataViewItem& parent ) const; void SetItemText( const wxDataViewItem& item, const wxString& text ); wxString GetItemText( const wxDataViewItem& item ) const; void SetItemIcon( const wxDataViewItem& item, const wxIcon& icon ); const wxIcon& GetItemIcon( const wxDataViewItem& item ) const; void SetItemExpandedIcon( const wxDataViewItem& item, const wxIcon &icon ); const wxIcon& GetItemExpandedIcon( const wxDataViewItem& item ) const; void SetItemData( const wxDataViewItem& item, wxPliUserDataCD* data ); wxPliUserDataCD* GetItemData( const wxDataViewItem& item ) const %code{% RETVAL = (wxPliUserDataCD*) THIS->GetItemData( *item ); %}; void DeleteItem( const wxDataViewItem& item ); void DeleteChildren( const wxDataViewItem& item ); void DeleteAllItems(); }; #endif Wx-0.9923/ext/datetime/000775000000000000 012316265011 12772 5ustar00Mark000000000000Wx-0.9923/ext/datetime/DateTime.pm000664000000000000 140512306612242 15105 0ustar00Mark000000000000############################################################################# ## Name: ext/datetime/DateTime.pm ## Purpose: Wx::DateTime ## Author: Mattia Barbon ## Modified by: ## Created: 22/09/2002 ## RCS-ID: $Id: DateTime.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2002 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::DateTime; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::wx_boot( 'Wx::DateTime', $VERSION ); # # properly setup inheritance tree # no strict; 1; # local variables: # mode: cperl # end: Wx-0.9923/ext/datetime/DateTime.xs000664000000000000 210412306612242 15120 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/datetime/DateTime.xs // Purpose: XS for Wx::DateTime // Author: Mattia Barbon // Modified by: // Created: 22/09/2002 // RCS-ID: $Id: DateTime.xs 2757 2010-01-17 10:26:27Z mbarbon $ // Copyright: (c) 2002, 2006, 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 ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #undef THIS MODULE=Wx__DateTime BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/DateTime.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/DateSpan.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/TimeSpan.xsp # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__DateTime Wx-0.9923/ext/datetime/Makefile.PL000664000000000000 146512306612242 15033 0ustar00Mark000000000000############################################################################# ## Name: ext/datetime/Makefile.PL ## Purpose: Makefile.PL for wxDateTime ## Author: Mattia Barbon ## Modified by: ## Created: 22/09/2002 ## RCS-ID: $Id: Makefile.PL 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2003 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::DateTime', VERSION_FROM => 'DateTime.pm', WX_CORE_LIB => 'base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/datetime/t/000775000000000000 012316265011 13235 5ustar00Mark000000000000Wx-0.9923/ext/datetime/t/01_load.t000775000000000000 22412306612242 14703 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::DateTime; print "ok\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/datetime/t/02_api.t000775000000000000 47112306612242 14542 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Test::More tests => 2; use Wx; use Wx::DateTime; # Test IsValid my $valid = Wx::DateTime::Now(); my $invalid = Wx::DateTime->new(); ok($valid->IsValid, 'Testing Valid Object'); ok(!$invalid->IsValid, 'Testing Invalid Object'); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/datetime/t/03_threads.t000775000000000000 114112306612242 15437 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use if Wx::wxMOTIF, 'Test::More' => skip_all => 'Hangs under Motif'; use Test::More tests => 4; use Wx::DateTime; my $app = Wx::App->new( sub { 1 } ); my $dt = Wx::DateTime->new; my $dt2 = Wx::DateTime->new; undef $dt2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/datetime/typemap000664000000000000 174412306612242 14463 0ustar00Mark000000000000############################################################################# ## Name: ext/datetime/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 22/09/2002 ## RCS-ID: $Id: typemap 2562 2009-05-17 08:57:33Z mbarbon $ ## Copyright: (c) 2002-2004, 2006, 2008-2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxDateTime_t T_ENUM Month T_ENUM Year T_ENUM WeekDay T_ENUM WeekFlags T_ENUM NameFlags T_ENUM Calendar T_ENUM wxDateTime * O_NON_WXOBJECT_THR wxDateSpan * O_NON_WXOBJECT wxTimeSpan * O_NON_WXOBJECT wxDateTime::TimeZone T_TIMEZONE INPUT T_TIMEZONE $var = (wxDateTime::TZ)SvIV($arg); Wx-0.9923/ext/datetime/XS/000775000000000000 012316265011 13324 5ustar00Mark000000000000Wx-0.9923/ext/datetime/XS/DateSpan.xsp000664000000000000 300312306612242 15634 0ustar00Mark000000000000############################################################################# ## Name: ext/datetime/XS/DateSpan.xsp ## Purpose: XS++ for Wx::DateSpan ## Author: Mattia Barbon ## Modified by: ## Created: 10/01/2005 ## RCS-ID: $Id: DateSpan.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2005-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 %module{Wx}; %name{Wx::DateSpan} class wxDateSpan { #wxDateSpan(); #%name{newFromYMWD} wxDateSpan( #~wxDateSpan(); wxDateSpan( int year = 0, int month = 0, int week = 0, int day = 0 ); # these statics return a DateSpan of according size #Day(); #Days( int days ); int GetDays(); int GetMonths(); int GetTotalDays(); int GetWeeks(); int GetYears(); wxDateSpan& Add( wxDateSpan& ds ); wxDateSpan& Multiply( int factor ); #wxDateSpan Negate(); wxDateSpan& Neg(); wxDateSpan& SetDays( int n ); wxDateSpan& SetYears( int n ); wxDateSpan& SetMonths( int n ); wxDateSpan& SetWeeks( int n ); wxDateSpan& Subtract( wxDateSpan& ds ); # operator== # operator!= ## bool operator==(const wxGBPosition& p) const; (sample) }; #%{ # static functions # wxDateSpan::Day # wxDateSpan::Days # wxDateSpan::Month # wxDateSpan::Months # wxDateSpan::Week # wxDateSpan::Weeks # wxDateSpan::Year # wxDateSpan::Years #%} Wx-0.9923/ext/datetime/XS/DateTime.xsp000664000000000000 1640012306612242 15656 0ustar00Mark000000000000############################################################################# ## Name: ext/datetime/XS/DateTime.xsp ## Purpose: XS++ for Wx::DateTime ## Author: Mattia Barbon ## Modified by: ## Created: 22/09/2002 ## RCS-ID: $Id: DateTime.xsp 2983 2010-10-09 01:44:20Z mdootson $ ## Copyright: (c) 2002, 2006, 2009-2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include %module{Wx}; %{ #define wxDateTime__TimeZone wxDateTime::TimeZone #define Month wxDateTime::Month #define WeekDay wxDateTime::WeekDay #define WeekFlags wxDateTime::WeekFlags #define NameFlags wxDateTime::NameFlags #define wxDateTime_t wxDateTime::wxDateTime_t #define Monday_First wxDateTime::Monday_First #define Name_Full wxDateTime::Name_Full #define Name_Abbr wxDateTime::Name_Abbr #define Calendar wxDateTime::Calendar #define Gregorian wxDateTime::Gregorian #define Inv_Year wxDateTime::Inv_Year #define Inv_Month wxDateTime::Inv_Month #define wxDefaultDateTimePtr (wxDateTime*)&wxDefaultDateTime #if WXPERL_W_VERSION_LT( 2, 5, 4 ) #define wxDefaultDateTimeFormat _T("%c") #endif %} %typemap{Month}{simple}; %typemap{WeekDay}{simple}; %typemap{WeekFlags}{simple}; %typemap{wxDateTime_t}{simple}; %typemap{Calendar}{simple}; %typemap{wxDefaultDateTime}{simple}; %typemap{wxDefaultDateTimeFormat}{simple}; %typemap{const wxDateTime::TimeZone&}{parsed}{ %cpp_type{%wxDateTime::TimeZone%}; }; %typemap{wxDateTime&}{parsed}{ %cpp_type{%SV*%}; %call_function_code{%$Call%}; %output_code{%$CVar = $PerlVar; SvREFCNT_inc( $PerlVar )%}; }; %name{Wx::DateTime} class wxDateTime { wxDateTime(); %name{newFromTimeT} wxDateTime( time_t time ); %name{newFromDMY} wxDateTime( wxDateTime_t day, Month month = Inv_Month, int year = Inv_Year, wxDateTime_t hour = 0, wxDateTime_t minute = 0, wxDateTime_t second = 0, wxDateTime_t millisec = 0 ); %{ static void wxDateTime::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxDateTime() %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::DateTime", THIS, ST(0) ); delete THIS; %}; #define wxPL_DATETIME_FORMAT wxT("%c") wxString Format( const wxChar* format = wxPL_DATETIME_FORMAT, const wxDateTime::TimeZone& tz = wxDateTime::Local ); wxString FormatDate(); int GetYear( const wxDateTime::TimeZone& tz = wxDateTime::Local ); Month GetMonth( const wxDateTime::TimeZone& tz = wxDateTime::Local ); wxDateTime_t GetDay( const wxDateTime::TimeZone& tz = wxDateTime::Local ); WeekDay GetWeekDay( const wxDateTime::TimeZone& tz = wxDateTime::Local ); wxDateTime_t GetHour( const wxDateTime::TimeZone& tz = wxDateTime::Local ); wxDateTime_t GetMinute( const wxDateTime::TimeZone& tz = wxDateTime::Local ); wxDateTime_t GetSecond( const wxDateTime::TimeZone& tz = wxDateTime::Local ); wxDateTime_t GetMillisecond( const wxDateTime::TimeZone& tz = wxDateTime::Local ); wxDateTime_t GetDayOfYear( const wxDateTime::TimeZone& tz = wxDateTime::Local ); wxDateTime_t GetWeekOfYear( WeekFlags flags = Monday_First, const wxDateTime::TimeZone& tz = wxDateTime::Local ); wxDateTime_t GetWeekOfMonth( WeekFlags flags = Monday_First, const wxDateTime::TimeZone& tz = wxDateTime::Local ); %name{SetTimeT} wxDateTime& Set( time_t time ); %name{SetJDN} wxDateTime& Set( double jdn ); %name{SetHMS} wxDateTime& Set( wxDateTime_t hour, wxDateTime_t minute = 0, wxDateTime_t second = 0, wxDateTime_t msec = 0 ); %name{Set} wxDateTime& Set( wxDateTime_t day, Month month = Inv_Month, int year = Inv_Year, wxDateTime_t hour, wxDateTime_t minute = 0, wxDateTime_t second = 0, wxDateTime_t msec = 0 ); wxDateTime& SetYear( int year ); wxDateTime& SetMonth( Month month ); wxDateTime& SetDay( wxDateTime_t day ); wxDateTime& SetHour( wxDateTime_t hour ); wxDateTime& SetMinute( wxDateTime_t minute ); wxDateTime& SetSecond( wxDateTime_t second ); wxDateTime& SetMillisecond( wxDateTime_t millisecond ); wxString FormatISODate(); wxString FormatTime(); wxString FormatISOTime(); #if WXPERL_W_VERSION_LT( 2, 9, 0 ) wxString ParseFormat( wxString date, wxString format = wxDefaultDateTimeFormat, const wxDateTime& dateDef = wxDefaultDateTimePtr ); wxString ParseDate( wxString date); wxString ParseDateTime( wxString date); wxString ParseTime( wxString date); wxString ParseRfc822Date( wxString date); #endif wxDateTime& SetToCurrent( ); wxDateTime& ResetTime( ); bool IsEqualTo( const wxDateTime& dt ); bool IsEarlierThan( const wxDateTime& dt ); bool IsLaterThan( const wxDateTime& dt ); bool IsBetween( const wxDateTime& dt1, const wxDateTime& dt2 ); bool IsStrictlyBetween( const wxDateTime& dt1, const wxDateTime& dt2 ); bool IsSameDate( const wxDateTime& dt ); bool IsSameTime( const wxDateTime& dt ); bool IsValid( ); # all Add & Subtract methods for Time and Date parts %name{AddDate} wxDateTime& Add( wxDateSpan& ds ); %name{AddTime} wxDateTime& Add( wxTimeSpan& ds ); # TimeSpan and all needed functions # DateSpan and all needed functions }; %{ void wxDateTime::GetAmPmStrings() PPCODE: wxString am, pm; THIS->GetAmPmStrings( &am, &pm ); SV* ams = wxPli_wxString_2_sv( aTHX_ am, sv_newmortal() ), * pms = wxPli_wxString_2_sv( aTHX_ pm, sv_newmortal() ); EXTEND( SP, 2 ); PUSHs( ams ); PUSHs( pms ); wxDateTime* Today() CODE: RETVAL = new wxDateTime( wxDateTime::Today() ); OUTPUT: RETVAL wxDateTime* Now() CODE: RETVAL = new wxDateTime( wxDateTime::Now() ); OUTPUT: RETVAL wxDateTime* UNow() CODE: RETVAL = new wxDateTime( wxDateTime::UNow() ); OUTPUT: RETVAL bool IsLeapYear( int year, Calendar cal = Gregorian) CODE: RETVAL = wxDateTime::IsLeapYear( year, cal ); OUTPUT: RETVAL wxString GetMonthName( Month month, NameFlags flags = Name_Full ) CODE: RETVAL = wxDateTime::GetMonthName( month, flags ); OUTPUT: RETVAL wxString GetWeekDayName( WeekDay weekday, NameFlags flags = Name_Full ) CODE: RETVAL = wxDateTime::GetWeekDayName( weekday, flags ); OUTPUT: RETVAL wxDateTime_t GetNumberOfDaysInYear( int year = Inv_Year, Calendar cal = Gregorian ) CODE: RETVAL = wxDateTime::GetNumberOfDays( year, cal ); OUTPUT: RETVAL wxDateTime_t GetNumberOfDaysInMonth( Month month, int year = Inv_Year, Calendar cal = Gregorian ) CODE: RETVAL = wxDateTime::GetNumberOfDays( month, year, cal ); OUTPUT: RETVAL int GetCentury( int year = Inv_Year ) CODE: RETVAL = wxDateTime::GetCentury( year ); OUTPUT: RETVAL int GetCurrentYear( Calendar cal = Gregorian ) CODE: RETVAL = wxDateTime::GetCurrentYear( cal ); OUTPUT: RETVAL int GetCurrentMonth( Calendar cal = Gregorian ) CODE: RETVAL = wxDateTime::GetCurrentMonth( cal ); OUTPUT: RETVAL %} Wx-0.9923/ext/datetime/XS/TimeSpan.xsp000664000000000000 254312306612242 15665 0ustar00Mark000000000000############################################################################# ## Name: ext/datetime/XS/TimeSpan.xsp ## Purpose: XS++ for Wx::TimeSpan ## Author: Mattia Barbon ## Modified by: ## Created: 10/01/2005 ## RCS-ID: $Id: TimeSpan.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2005-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 %module{Wx}; %name{Wx::TimeSpan} class wxTimeSpan { wxTimeSpan(); %name{newFromHMS} wxTimeSpan( long hour = 0, long minute = 0, long second = 0, long millisec = 0 ); #~wxTimeSpan(); ### Accessors # wxLongLong GetSeconds(); # wxLongLong GetMinutes(); int GetHours(); int GetDays(); int GetWeeks(); # wxLongLong GetValue(); ### Operations # Add # Subtract # Multiply # Negate # Neg # Abs ### Tests bool IsNull(); bool IsPositive(); bool IsNegative(); bool IsEqualTo( wxTimeSpan& ts ); bool IsLongerThan( wxTimeSpan& ts ); bool IsShorterThan( wxTimeSpan& ts ); # Format # wxString Format( const wxChar* format = wxDefaultTimeSpanFormat ); }; %{ # static functions # Seconds # Second # Minutes # Minute # Hours # Hour # Days # Day # Weeks # Week %}Wx-0.9923/ext/dnd/000775000000000000 012316265011 11743 5ustar00Mark000000000000Wx-0.9923/ext/dnd/cpp/000775000000000000 012316265011 12525 5ustar00Mark000000000000Wx-0.9923/ext/dnd/cpp/dataobject.h000664000000000000 560612306612245 15071 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/dnd/cpp/dataobject.h // Purpose: c++ wrapper for wxPl*DataObject and wxPlDataObjectSimple // Author: Mattia Barbon // Modified by: // Created: 13/08/2001 // RCS-ID: $Id: dataobject.h 3347 2012-09-16 23:17:55Z mdootson $ // Copyright: (c) 2001-2002, 2005, 2012 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include #include "cpp/v_cback.h" #define DEC_V_CBACK_SIZET__VOID_const( METHOD ) \ size_t METHOD() const #define DEC_V_CBACK_BOOL__VOIDP_const( METHOD ) \ bool METHOD( void* ) const #define DEC_V_CBACK_BOOL__SIZET_CVOIDP( METHOD ) \ bool METHOD( size_t, const void* ) class wxPlDataObjectSimple:public wxDataObjectSimple { WXPLI_DECLARE_V_CBACK(); public: wxPlDataObjectSimple( const char* package, const wxDataFormat& format ) :wxDataObjectSimple( format ), m_callback( "Wx::PlDataObjectSimple" ) { m_callback.SetSelf( wxPli_make_object( this, package ) ); } private: // SGI CC warns here, but it is harmless DEC_V_CBACK_SIZET__VOID_const( GetDataSize ); DEC_V_CBACK_BOOL__VOIDP_const( GetDataHere ); DEC_V_CBACK_BOOL__SIZET_CVOIDP( SetData ); }; size_t wxPlDataObjectSimple::GetDataSize() const { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "GetDataSize" ) ) { wxAutoSV ret( aTHX_ wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_SCALAR, NULL ) ); return SvUV( ret ) // wxGTK bug! #if WXPERL_W_VERSION_GE( 2, 6, 2 ) && defined(__WXGTK__) + 1 #endif ; } else return wxDataObjectSimple::GetDataSize(); } bool wxPlDataObjectSimple::GetDataHere( void* param1 ) const { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "GetDataHere" ) ) { wxAutoSV ret( aTHX_ wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_SCALAR, NULL ) ); if( !SvOK( ret ) ) return false; STRLEN len; char* val = SvPV( ret, len ); memcpy( param1, val, len ); return true; } else return wxDataObjectSimple::GetDataHere( param1 ); } bool wxPlDataObjectSimple::SetData( size_t param1, const void* param2 ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "SetData" ) ) { wxAutoSV n( aTHX_ newSVpvn( CHAR_P (const char*)param2, param1 ) ); wxAutoSV ret( aTHX_ wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_SCALAR, "s", (SV*)n )); return SvTRUE( ret ); } else return wxDataObjectSimple::SetData( param1, param2 ); } Wx-0.9923/ext/dnd/cpp/dn_constants.cpp000664000000000000 303612306612245 16014 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/dnd/cpp/dn_constants.cpp // Purpose: constants for Wx::DND // Author: Mattia Barbon // Modified by: // Created: 12/08/2001 // RCS-ID: $Id: dn_constants.cpp 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2001-2003 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/constants.h" #include const int Get = wxDataObjectBase::Get; const int Set = wxDataObjectBase::Set; const int Both = wxDataObjectBase::Both; double dnd_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: dnd #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'B': r( Both ); break; case 'D': #if wxPERL_USE_DRAG_AND_DROP r( wxDragError ); r( wxDragNone ); r( wxDragMove ); r( wxDragCopy ); r( wxDragLink ); r( wxDragCancel ); r( wxDrag_CopyOnly ); r( wxDrag_AllowMove ); r( wxDrag_DefaultMove ); #endif break; case 'G': r( Get ); break; case 'S': r( Set ); break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants dnd_module( &dnd_constant ); Wx-0.9923/ext/dnd/cpp/dropsource.h000664000000000000 434112306612245 15151 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/dnd/cpp/dropsource.h // Purpose: c++ wrapper for wxPliDropSource // Author: Mattia Barbon // Modified by: // Created: 16/08/2001 // RCS-ID: $Id: dropsource.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2001, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include #include "cpp/v_cback.h" class wxPliDropSource:public wxDropSource { WXPLI_DECLARE_V_CBACK(); public: #if defined( __WXMSW__ ) || defined( __WXMAC__ ) wxPliDropSource( const char* package, wxWindow* win, const wxCursor& c1, const wxCursor& c2, const wxCursor& c3 ) :wxDropSource( win, c1, c2, c3 ), m_callback( "Wx::DropSource" ) { m_callback.SetSelf( wxPli_make_object( this, package ) ); } wxPliDropSource( const char* package, wxDataObject& data, wxWindow* win, const wxCursor& c1, const wxCursor& c2, const wxCursor& c3 ) :wxDropSource( data, win, c1, c2, c3 ), m_callback( "Wx::DropSource" ) { m_callback.SetSelf( wxPli_make_object( this, package ) ); } #else wxPliDropSource( const char* package, wxWindow* win, const wxIcon& c1, const wxIcon& c2, const wxIcon& c3 ) :wxDropSource( win, c1, c2, c3 ), m_callback( "Wx::DropSource" ) { m_callback.SetSelf( wxPli_make_object( this, package ) ); } wxPliDropSource( const char* package, wxDataObject& data, wxWindow* win, const wxIcon& c1, const wxIcon& c2, const wxIcon& c3 ) :wxDropSource( data, win, c1, c2, c3 ), m_callback( "Wx::DropSource" ) { m_callback.SetSelf( wxPli_make_object( this, package ) ); } #endif DEC_V_CBACK_BOOL__WXDRAGRESULT( GiveFeedback ); }; DEF_V_CBACK_BOOL__WXDRAGRESULT( wxPliDropSource, wxDropSource, GiveFeedback ); // Local variables: // // mode: c++ // // End: // Wx-0.9923/ext/dnd/cpp/droptarget.h000664000000000000 610012306612245 15132 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/dnd/cpp/droptarget.h // Purpose: c++ wrapper for wxPli*DropTarget // Author: Mattia Barbon // Modified by: // Created: 16/08/2001 // RCS-ID: $Id: droptarget.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2001-2002, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include #include "cpp/v_cback.h" class wxPliDropTarget:public wxDropTarget { WXPLI_DECLARE_V_CBACK(); public: wxPliDropTarget( const char* package, wxDataObject* data = 0 ) :wxDropTarget( data ), m_callback( "Wx::DropTarget" ) { dTHX; // this is necessary because the SV returned to // the perl program _is not_ this one! // so _this_ SV must not delete the object, // this is responsibility of the program's one! SV* sv = wxPli_make_object( this, package ); wxPli_object_set_deleteable( aTHX_ sv, false ); m_callback.SetSelf( sv ); } DEC_V_CBACK_WXDRAGRESULT__WXCOORD_WXCOORD_WXDRAGRESULT( OnData ); DEC_V_CBACK_BOOL__WXCOORD_WXCOORD( OnDrop ); DEC_V_CBACK_VOID__VOID( OnLeave ); DEC_V_CBACK_WXDRAGRESULT__WXCOORD_WXCOORD_WXDRAGRESULT( OnEnter ); DEC_V_CBACK_WXDRAGRESULT__WXCOORD_WXCOORD_WXDRAGRESULT( OnDragOver ); }; DEF_V_CBACK_WXDRAGRESULT__WXCOORD_WXCOORD_WXDRAGRESULT_pure( wxPliDropTarget, wxDropTarget, OnData ); DEF_V_CBACK_BOOL__WXCOORD_WXCOORD( wxPliDropTarget, wxDropTarget, OnDrop ); DEF_V_CBACK_VOID__VOID( wxPliDropTarget, wxDropTarget, OnLeave ); DEF_V_CBACK_WXDRAGRESULT__WXCOORD_WXCOORD_WXDRAGRESULT( wxPliDropTarget, wxDropTarget, OnEnter ); DEF_V_CBACK_WXDRAGRESULT__WXCOORD_WXCOORD_WXDRAGRESULT( wxPliDropTarget, wxDropTarget, OnDragOver ); class wxPliTextDropTarget:public wxTextDropTarget { WXPLI_DECLARE_V_CBACK(); public: wxPliTextDropTarget( const char* package ) :wxTextDropTarget(), m_callback( "Wx::TextDropTarget" ) { dTHX; SV* sv = wxPli_make_object( this, package ); wxPli_object_set_deleteable( aTHX_ sv, false ); m_callback.SetSelf( sv ); } DEC_V_CBACK_BOOL__WXCOORD_WXCOORD_WXSTRING( OnDropText ); }; DEF_V_CBACK_BOOL__WXCOORD_WXCOORD_WXSTRING_pure( wxPliTextDropTarget, wxTextDropTarget, OnDropText ); class wxPliFileDropTarget:public wxFileDropTarget { WXPLI_DECLARE_V_CBACK(); public: wxPliFileDropTarget( const char* package ) :wxFileDropTarget(), m_callback( "Wx::FileDropTarget" ) { dTHX; SV* sv = wxPli_make_object( this, package ); wxPli_object_set_deleteable( aTHX_ sv, false ); m_callback.SetSelf( sv ); } DEC_V_CBACK_BOOL__WXCOORD_WXCOORD_WXARRAYSTRING( OnDropFiles ); }; DEF_V_CBACK_BOOL__WXCOORD_WXCOORD_WXARRAYSTRING_pure( wxPliFileDropTarget, wxFileDropTarget, OnDropFiles ); // Local variables: // // mode: c++ // // End: // Wx-0.9923/ext/dnd/DND.xs000664000000000000 326612306612245 13017 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/dnd/DND.xs // Purpose: XS for Drag'n'Drop and Clipboard // Author: Mattia Barbon // Modified by: // Created: 12/08/2001 // RCS-ID: $Id: DND.xs 3083 2011-07-04 16:44:05Z mdootson $ // Copyright: (c) 2001-2011 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #undef THIS #include #include "cpp/dn_constants.cpp" typedef wxDataObjectBase::Direction Direction; typedef wxDataFormat::NativeFormat NativeFormat; #include MODULE=Wx__DND BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE: XS/DataObject.xs INCLUDE: XS/Clipboard.xs #if wxPERL_USE_DRAG_AND_DROP INCLUDE: XS/DropFiles.xs INCLUDE: XS/DropSource.xs INCLUDE: XS/DropTarget.xs #endif MODULE=Wx__DND PACKAGE=Wx wxDataFormat* wxDF_TEXT() CODE: RETVAL = new wxDataFormat( wxDF_TEXT ); OUTPUT: RETVAL wxDataFormat* wxDF_UNICODETEXT() CODE: RETVAL = new wxDataFormat( wxDF_UNICODETEXT ); OUTPUT: RETVAL wxDataFormat* wxDF_BITMAP() CODE: RETVAL = new wxDataFormat( wxDF_BITMAP ); OUTPUT: RETVAL #if defined(__WXMSW__) wxDataFormat* wxDF_METAFILE() CODE: RETVAL = new wxDataFormat( wxDF_METAFILE ); OUTPUT: RETVAL #endif wxDataFormat* wxDF_FILENAME() CODE: RETVAL = new wxDataFormat( wxDF_FILENAME ); OUTPUT: RETVAL # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__DND Wx-0.9923/ext/dnd/lib/000775000000000000 012316265010 12510 5ustar00Mark000000000000Wx-0.9923/ext/dnd/lib/Wx/000775000000000000 012316265011 13107 5ustar00Mark000000000000Wx-0.9923/ext/dnd/lib/Wx/DND.pm000664000000000000 361012306612245 14136 0ustar00Mark000000000000############################################################################# ## Name: ext/dnd/lib/Wx/DND.pm ## Purpose: Wx::DND pulls in all wxWidgets Drag'n'Drop and Clipboard ## Author: Mattia Barbon ## Modified by: ## Created: 12/08/2001 ## RCS-ID: $Id: DND.pm 3083 2011-07-04 16:44:05Z mdootson $ ## Copyright: (c) 2001-2004, 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::DND; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::wx_boot( 'Wx::DND', $VERSION ); use Wx::DropSource; # # properly setup inheritance tree # no strict; package Wx::DropTarget; package Wx::DropFilesEvent; @ISA = qw(Wx::Event); package Wx::DataObject; package Wx::DataObjectSimple; @ISA = qw(Wx::DataObject); package Wx::PlDataObjectSimple; @ISA = qw(Wx::DataObjectSimple); package Wx::DataObjectComposite;@ISA = qw(Wx::DataObject); package Wx::FileDataObject; @ISA = qw(Wx::DataObjectSimple); package Wx::TextDataObject; @ISA = qw(Wx::DataObjectSimple); package Wx::BitmapDataObject; @ISA = qw(Wx::DataObjectSimple); package Wx::Droptarget; package Wx::PlDropTarget; @ISA = qw(Wx::DropTarget); package Wx::TextDropTarget; @ISA = qw(Wx::DropTarget); package Wx::FileDropTarget; @ISA = qw(Wx::DropTarget); package Wx::URLDataObject; @ISA = qw(Wx::DataObject); use strict; # # constants # package Wx; use vars qw($_df_invalid $_df_bitmap $_df_text $_df_unicodetext $_df_metafile $_df_filename); # !parser: sub { $_[0] =~ m/^\s*\#\s*sub\s+(wx\w+)/ } # !package: Wx # !tag: dnd clipboard # sub wxDF_INVALID # sub wxDF_TEXT # sub wxDF_UNICODETEXT # sub wxDF_BITMAP # sub wxDF_METAFILE # sub wxDF_FILENAME 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/dnd/lib/Wx/DropSource.pm000664000000000000 216012306612245 15615 0ustar00Mark000000000000############################################################################# ## Name: ext/dnd/lib/Wx/DropSource.pm ## Purpose: Wx::DropSource ## Author: Mattia Barbon ## Modified by: ## Created: 17/08/2001 ## RCS-ID: $Id: DropSource.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2003, 2005 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::DropSource; sub new { my $this = shift; if( !Wx::wxMSW() && !Wx::wxMAC() ) { Wx::_match( @_, $Wx::_wwin_wico_wico_wico, 0, 1 ) && return $this->newIconEmpty( @_ ); Wx::_match( @_, $Wx::_wdat_wwin_wico_wico_wico, 1, 1 ) && return $this->newIconData( @_ ); } else { Wx::_match( @_, $Wx::_wwin_wcur_wcur_wcur, 0, 1 ) && return $this->newCursorEmpty( @_ ); Wx::_match( @_, $Wx::_wdat_wwin_wcur_wcur_wcur, 1, 1 ) && return $this->newCursorData( @_ ); } Wx::_croak Wx::_ovl_error; } 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/dnd/Makefile.PL000664000000000000 152012306612245 13777 0ustar00Mark000000000000############################################################################# ## Name: ext/dnd/Makefile.PL ## Purpose: Makefile.PL for Drag'n'Drop and Clipboard ## Author: Mattia Barbon ## Modified by: ## Created: 12/08/2001 ## RCS-ID: $Id: Makefile.PL 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2004 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::DND', VERSION_FROM => 'lib/Wx/DND.pm', WX_CORE_LIB => 'core base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/dnd/t/000775000000000000 012316265011 12206 5ustar00Mark000000000000Wx-0.9923/ext/dnd/t/01_load.t000775000000000000 22112306612245 13654 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::DND; print "ok 1\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/dnd/t/02_inheritance.t000775000000000000 36012306612245 15233 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::DND; test_inheritance_end(); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/dnd/t/03_pldatabject.t000775000000000000 507212306612245 15245 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx qw(wxTheClipboard); use Wx::DND; use lib '../../t'; use Tests_Helper qw(in_frame); use Test::More; BEGIN { if( !Wx::wxMAC ) { plan 'tests' => 9; } else { plan 'tests' => 11; } } my $FORMAT = 'Wx::Perl::MyCustomFormat'; my $silent = 1; in_frame( sub { my $self = shift; my $complex = { x => [ qw(a b c), { 'c' => 'd' } ] }; my $copied = MyDataObject->new( $complex ); wxTheClipboard->Open; wxTheClipboard->Clear; ok( !wxTheClipboard->IsSupported( Wx::DataFormat->newUser( $FORMAT ) ), "clipboard empty" ); $silent = 0; ok( wxTheClipboard->SetData( $copied ), "copying succeeds" ); undef $copied; my $pasted = MyDataObject->new; ok( wxTheClipboard->IsSupported( Wx::DataFormat->newUser( $FORMAT ) ), "format supported" ); # intermittent non-repeatable failure on MSW and GTK # On GTK I see when running tests on a VM accessed by # VNC that doesn't have the focus on the client machine. # I had assumed this was a GTK + Visual Box + VNC # issue - but I recently have seen this on MSW box (no # VNC present, not VM). Can't repeat the problem on MSW. # What to do? The 'undef copied' above looks suspicious # but all the code behind it looks correct to me re ref # counting the Perl SV and not destroying the C++ data. TODO: { local $TODO = 'intermittent failure to GetData on wxMSW and wxGTK'; ok( wxTheClipboard->GetData( $pasted ), "pasting succeeds" ); } isnt( $pasted->GetPerlData, $complex, "Check that identity is not the same" ); TODO: { local $TODO = 'intermittent failure to GetPerlData on wxMSW and wxGTK'; is_deeply( $pasted->GetPerlData, $complex, "Correctly copied" ); wxTheClipboard->Close; } } ); package MyDataObject; use strict; use base qw(Wx::PlDataObjectSimple); use Storable; use Test::More; sub new { my( $class, $data ) = @_; my $self = $class->SUPER::new( Wx::DataFormat->newUser( $FORMAT ) ); $self->{data} = $data; return $self; } sub SetData { my( $self, $serialized ) = @_; $self->{data} = Storable::thaw $serialized; ok( 1, "SetData called" ) unless $silent; return 1; } sub GetDataHere { my( $self ) = @_; ok( 1, "GetDataHere called" ) unless $silent; return Storable::freeze $self->{data}; } sub GetDataSize { my( $self ) = @_; ok( 1, "GetDataSize called" ) unless $silent; return length Storable::freeze $self->{data}; } sub GetPerlData { $_[0]->{data} } 1; Wx-0.9923/ext/dnd/t/04_threads.t000775000000000000 270112306612245 14417 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use Test::More tests => 4; use Wx::DND; my $app = Wx::App->new( sub { 1 } ); my $datafrmt = Wx::DataFormat->newUser( 'MyFormat' ); my $datafrmt2 = Wx::DataFormat->newUser( 'MyFormat' ); my $dosimple = Wx::DataObjectSimple->new( $datafrmt ); my $dosimple2 = Wx::DataObjectSimple->new( $datafrmt ); my $docomposite = Wx::DataObjectComposite->new; my $docomposite2 = Wx::DataObjectComposite->new; my $dotext = Wx::TextDataObject->new( 'Foo' ); my $dotext2 = Wx::TextDataObject->new( 'Foo' ); my $dobitmap = Wx::BitmapDataObject->new; my $dobitmap2 = Wx::BitmapDataObject->new; my $domy = MyDataObject->new( $datafrmt ); my $domy2 = MyDataObject->new( $datafrmt ); my $domy3 = MyDataObject->new( $datafrmt ); my $dropt = Wx::wxMOTIF ? undef : Wx::DropTarget->new; my $dropt2 = Wx::wxMOTIF ? undef : Wx::DropTarget->new; $docomposite->Add( $dotext ); $docomposite->Add( $domy3 ); undef $datafrmt2; undef $dosimple2; undef $domy2; # undef $domy3; # causes a 'scalar leaked' undef $dropt2; undef $dobitmap2; undef $docomposite2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; package MyDataObject; use base qw(Wx::PlDataObjectSimple); Wx-0.9923/ext/dnd/typemap000664000000000000 250612306612245 13434 0ustar00Mark000000000000############################################################################# ## Name: ext/dnd/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 12/08/2001 ## RCS-ID: $Id: typemap 2317 2008-01-18 22:00:14Z mbarbon $ ## Copyright: (c) 2001, 2003-2004, 2006, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP Direction T_ENUM NativeFormat T_ENUM wxDragResult T_ENUM wxDataFormatId T_ENUM wxDataObject * O_NON_WXOBJECT_THR wxFileDataObject * O_NON_WXOBJECT_THR wxTextDataObject * O_NON_WXOBJECT_THR wxBitmapDataObject * O_NON_WXOBJECT_THR wxURLDataObject * O_NON_WXOBJECT_THR wxCustomDataObject * O_NON_WXOBJECT_THR wxDataObjectSimple * O_NON_WXOBJECT_THR wxDataObjectComposite * O_NON_WXOBJECT_THR wxPlDataObjectSimple * O_NON_WXOBJECT_THR wxDataFormat * O_NON_WXOBJECT_THR wxDropFilesEvent * O_NON_WXOBJECT wxClipboard * O_WXOBJECT wxDropSource * O_NON_WXOBJECT wxDropTarget * O_NON_WXOBJECT wxFileDropTarget * O_NON_WXOBJECT wxTextDropTarget * O_NON_WXOBJECT Wx-0.9923/ext/dnd/XS/000775000000000000 012316265011 12275 5ustar00Mark000000000000Wx-0.9923/ext/dnd/XS/Clipboard.xs000664000000000000 326112306612245 14636 0ustar00Mark000000000000############################################################################# ## Name: ext/dnd/XS/Clipboard.xs ## Purpose: XS for Wx::Clipboard ## Author: Mattia Barbon ## Modified by: ## Created: 13/08/2001 ## RCS-ID: $Id: Clipboard.xs 2274 2007-11-10 22:37:30Z mbarbon $ ## Copyright: (c) 2001-2002, 2004, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::Clipboard bool wxClipboard::AddData( data ) wxDataObject* data CODE: wxPli_object_set_deleteable( aTHX_ ST(1), false ); SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away RETVAL = THIS->AddData( data ); OUTPUT: RETVAL void wxClipboard::Clear() void wxClipboard::Close() bool wxClipboard::Flush() bool wxClipboard::GetData( data ) wxDataObject* data CODE: RETVAL = THIS->GetData( *data ); OUTPUT: RETVAL bool wxClipboard::IsOpened() bool wxClipboard::IsSupported( format ) wxDataFormat* format CODE: RETVAL = THIS->IsSupported( *format ); OUTPUT: RETVAL bool wxClipboard::Open() bool wxClipboard::SetData( data ) wxDataObject* data CODE: wxPli_object_set_deleteable( aTHX_ ST(1), false ); SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away RETVAL = THIS->SetData( data ); OUTPUT: RETVAL void wxClipboard::UsePrimarySelection( primary = true ) bool primary #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool wxClipboard::IsUsingPrimarySelection() #endif Wx-0.9923/ext/dnd/XS/DataObject.xs000664000000000000 1654612306612245 14771 0ustar00Mark000000000000############################################################################# ## Name: ext/dnd/XS/DataObject.xs ## Purpose: XS for Wx::*DataObject and Wx::DataFormat ## Author: Mattia Barbon ## Modified by: ## Created: 12/08/2001 ## RCS-ID: $Id: DataObject.xs 2055 2007-06-18 22:05:48Z mbarbon $ ## Copyright: (c) 2001-2004, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include "cpp/dataobject.h" MODULE=Wx PACKAGE=Wx::DataFormat #ifdef __WXGTK20__ wxDataFormat* newNative( dummy, format = wxDF_INVALID ) SV* dummy wxDataFormatId format CODE: RETVAL = new wxDataFormat( format ); OUTPUT: RETVAL #else wxDataFormat* newNative( dummy, format = wxDF_INVALID ) SV* dummy NativeFormat format CODE: RETVAL = new wxDataFormat( format ); OUTPUT: RETVAL #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxDataFormat* newUser( dummy, id ) SV* dummy wxString id CODE: RETVAL = new wxDataFormat( id ); OUTPUT: RETVAL #else wxDataFormat* newUser( dummy, id ) SV* dummy wxChar* id CODE: RETVAL = new wxDataFormat( id ); OUTPUT: RETVAL #endif static void wxDataFormat::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxDataFormat::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::DataFormat", THIS, ST(0) ); delete THIS; wxString wxDataFormat::GetId() void wxDataFormat::SetId( id ) wxString id #if defined( __WXMSW__ ) NativeFormat wxDataFormat::GetType() void wxDataFormat::SetType( type ) NativeFormat type #else wxDataFormatId wxDataFormat::GetType() #if 0 void wxDataFormat::SetType( type ) wxDataFormatId type #endif #endif MODULE=Wx PACKAGE=Wx::DataObject static void wxDataObject::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); # // thread OK void DESTROY( THIS ) wxDataObject* THIS CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); if( THIS && wxPli_object_is_deleteable( aTHX_ ST(0) ) ) { delete THIS; } void wxDataObject::Destroy() CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; void wxDataObject::GetAllFormats( dir = wxDataObjectBase::Get ) Direction dir PPCODE: size_t formats = THIS->GetFormatCount( dir ); size_t i, wanted = formats; wxDataFormat* formats_d = new wxDataFormat[ formats ]; THIS->GetAllFormats( formats_d, dir ); if( GIMME_V == G_SCALAR ) wanted = 1; EXTEND( SP, (IV)wanted ); for( i = 0; i < wanted; ++i ) { PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxDataFormat( formats_d[i] ), "Wx::DataFormat" ) ); } delete [] formats_d; bool wxDataObject::GetDataHere( format, buf ) wxDataFormat* format SV* buf CODE: size_t size = THIS->GetDataSize( *format ); void* buffer = SvGROW( buf, size + 1 ); SvCUR_set( buf, size ); RETVAL = THIS->GetDataHere( *format, buffer ); OUTPUT: RETVAL size_t wxDataObject::GetDataSize( format ) wxDataFormat* format CODE: RETVAL = THIS->GetDataSize( *format ); OUTPUT: RETVAL size_t wxDataObject::GetFormatCount( dir = wxDataObjectBase::Get ) Direction dir wxDataFormat* wxDataObject::GetPreferredFormat( dir = wxDataObjectBase::Get ) Direction dir CODE: RETVAL = new wxDataFormat( THIS->GetPreferredFormat( dir ) ); OUTPUT: RETVAL bool wxDataObject::IsSupported( format, dir = wxDataObjectBase::Get ) wxDataFormat* format Direction dir CODE: RETVAL = THIS->IsSupported( *format, dir ); OUTPUT: RETVAL bool wxDataObject::SetData( format, buf ) wxDataFormat* format SV* buf PREINIT: char* data; STRLEN len; CODE: data = SvPV( buf, len ); RETVAL = THIS->SetData( *format, len, data ); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::DataObjectSimple wxDataObjectSimple* wxDataObjectSimple::new( format = (wxDataFormat*)&wxFormatInvalid ) wxDataFormat* format CODE: RETVAL = new wxDataObjectSimple( *format ); OUTPUT: RETVAL wxDataFormat* wxDataObjectSimple::GetFormat() CODE: RETVAL = new wxDataFormat( THIS->GetFormat() ); OUTPUT: RETVAL void wxDataObjectSimple::SetFormat( format ) wxDataFormat* format CODE: THIS->SetFormat( *format ); MODULE=Wx PACKAGE=Wx::PlDataObjectSimple SV* wxPlDataObjectSimple::new( format = (wxDataFormat*)&wxFormatInvalid ) wxDataFormat* format CODE: wxPlDataObjectSimple* THIS = new wxPlDataObjectSimple( CLASS, *format ); RETVAL = newRV_noinc( SvRV( THIS->m_callback.GetSelf() ) ); wxPli_thread_sv_register( aTHX_ "Wx::PlDataObjectSimple", THIS, RETVAL ); OUTPUT: RETVAL ## // thread OK void wxPlDataObjectSimple::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::PlDataObjectSimple", THIS, ST(0) ); if( THIS && wxPli_object_is_deleteable( aTHX_ ST(0) ) ) { SV* self = THIS->m_callback.GetSelf(); SvROK_off( self ); SvRV( self ) = NULL; delete THIS; } MODULE=Wx PACKAGE=Wx::DataObjectComposite wxDataObjectComposite* wxDataObjectComposite::new() void wxDataObjectComposite::Add( dataObject, preferred = false ) wxDataObjectSimple* dataObject bool preferred CODE: // at this point the data object is owned! wxPli_object_set_deleteable( aTHX_ ST(1), false ); SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away THIS->Add( dataObject, preferred ); #if WXPERL_W_VERSION_GE( 2, 7, 0 ) wxDataFormat* wxDataObjectComposite::GetReceivedFormat() CODE: RETVAL = new wxDataFormat( THIS->GetReceivedFormat() ); OUTPUT: RETVAL #endif MODULE=Wx PACKAGE=Wx::TextDataObject wxTextDataObject* wxTextDataObject::new( text = wxEmptyString ) wxString text size_t wxTextDataObject::GetTextLength() wxString wxTextDataObject::GetText() void wxTextDataObject::SetText( text ) wxString text MODULE=Wx PACKAGE=Wx::BitmapDataObject #if WXPERL_W_VERSION_GE( 2, 5, 1 ) || !defined(__WXMOTIF__) wxBitmapDataObject* wxBitmapDataObject::new( bitmap = (wxBitmap*)&wxNullBitmap ) wxBitmap* bitmap CODE: RETVAL = new wxBitmapDataObject( *bitmap ); OUTPUT: RETVAL wxBitmap* wxBitmapDataObject::GetBitmap() CODE: RETVAL = new wxBitmap( THIS->GetBitmap() ); OUTPUT: RETVAL void wxBitmapDataObject::SetBitmap( bitmap ) wxBitmap* bitmap CODE: THIS->SetBitmap( *bitmap ); #endif MODULE=Wx PACKAGE=Wx::FileDataObject #if !defined(__WXMOTIF__) wxFileDataObject* wxFileDataObject::new() void wxFileDataObject::AddFile( file ) wxString file void wxFileDataObject::GetFilenames() PREINIT: int i, max; PPCODE: const wxArrayString& filenames = THIS->GetFilenames(); max = filenames.GetCount(); EXTEND( SP, max ); for( i = 0; i < max; ++i ) { #if wxUSE_UNICODE SV* tmp = sv_2mortal( newSVpv( filenames[i].mb_str(wxConvUTF8), 0 ) ); SvUTF8_on( tmp ); PUSHs( tmp ); #else PUSHs( sv_2mortal( newSVpv( CHAR_P filenames[i].c_str(), 0 ) ) ); #endif } MODULE=Wx PACKAGE=Wx::URLDataObject wxURLDataObject* wxURLDataObject::new() wxString wxURLDataObject::GetURL() void wxURLDataObject::SetURL( url ) wxString url #endifWx-0.9923/ext/dnd/XS/DropFiles.xs000664000000000000 227212306612245 14627 0ustar00Mark000000000000############################################################################# ## Name: ext/dnd/XS/DropFiles.xs ## Purpose: XS for Wx::DropFilesEvent ## Author: Mattia Barbon ## Modified by: ## Created: 15/08/2001 ## RCS-ID: $Id: DropFiles.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001, 2004 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=wxEvt PACKAGE=Wx::DropFilesEvent void wxDropFilesEvent::GetFiles() PPCODE: wxString* files = THIS->GetFiles(); int i, max = THIS->GetNumberOfFiles(); EXTEND( SP, max ); for( i = 0; i < max; ++i ) { #if wxUSE_UNICODE SV* tmp = sv_2mortal( newSVpv( CHAR_P files[i].mb_str(wxConvUTF8), 0 ) ); SvUTF8_on( tmp ); PUSHs( tmp ); #else PUSHs( sv_2mortal( newSVpv( CHAR_P files[i].c_str(), 0 ) ) ); #endif } int wxDropFilesEvent::GetNumberOfFiles() wxPoint* wxDropFilesEvent::GetPosition() CODE: RETVAL = new wxPoint( THIS->GetPosition() ); OUTPUT: RETVAL Wx-0.9923/ext/dnd/XS/DropSource.xs000664000000000000 571312306612245 15030 0ustar00Mark000000000000############################################################################# ## Name: ext/dnd/XS/DropSource.xs ## Purpose: XS for Wx::DropSource ## Author: Mattia Barbon ## Modified by: ## Created: 16/08/2001 ## RCS-ID: $Id: DropSource.xs 2285 2007-11-11 21:31:54Z mbarbon $ ## Copyright: (c) 2001-2004, 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include "cpp/dropsource.h" MODULE=Wx PACKAGE=Wx::DropSource #!sub GiveFeedback #if defined( __WXMSW__ ) || defined( __WXMAC__ ) wxDropSource* newCursorEmpty( CLASS, win = 0, cursorCopy = (wxCursor*)&wxNullCursor, cursorMove = (wxCursor*)&wxNullCursor, cursorStop = (wxCursor*)&wxNullCursor ) SV* CLASS wxWindow* win wxCursor* cursorCopy wxCursor* cursorMove wxCursor* cursorStop CODE: RETVAL = new wxPliDropSource( wxPli_get_class( aTHX_ CLASS ), win, *cursorCopy, *cursorMove, *cursorStop ); OUTPUT: RETVAL wxDropSource* newCursorData( CLASS, data, win = 0, cursorCopy = (wxCursor*)&wxNullCursor, cursorMove = (wxCursor*)&wxNullCursor, cursorStop = (wxCursor*)&wxNullCursor ) SV* CLASS wxDataObject* data wxWindow* win wxCursor* cursorCopy wxCursor* cursorMove wxCursor* cursorStop CODE: RETVAL = new wxPliDropSource( wxPli_get_class( aTHX_ CLASS ), *data, win, *cursorCopy, *cursorMove, *cursorStop ); OUTPUT: RETVAL #else wxDropSource* newIconEmpty( CLASS, win = 0, iconCopy = (wxIcon*)&wxNullIcon, iconMove = (wxIcon*)&wxNullIcon, iconStop = (wxIcon*)&wxNullIcon ) SV* CLASS wxWindow* win wxIcon* iconCopy wxIcon* iconMove wxIcon* iconStop CODE: RETVAL = new wxPliDropSource( wxPli_get_class( aTHX_ CLASS ), win, *iconCopy, *iconMove, *iconStop ); OUTPUT: RETVAL wxDropSource* newIconData( CLASS, data, win = 0, iconCopy = (wxIcon*)&wxNullIcon, iconMove = (wxIcon*)&wxNullIcon, iconStop = (wxIcon*)&wxNullIcon ) SV* CLASS wxDataObject* data wxWindow* win wxIcon* iconCopy wxIcon* iconMove wxIcon* iconStop CODE: RETVAL = new wxPliDropSource( wxPli_get_class( aTHX_ CLASS ), *data, win, *iconCopy, *iconMove, *iconStop ); OUTPUT: RETVAL #endif wxDragResult wxDropSource::DoDragDrop( flags = wxDrag_CopyOnly ) int flags void wxDropSource::SetData( data ) wxDataObject* data CODE: THIS->SetData( *data ); wxDataObject* wxDropSource::GetDataObject() CODE: RETVAL = THIS->GetDataObject(); OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); void wxDropSource::SetCursor( res, cursor ) wxDragResult res wxCursor* cursor CODE: THIS->SetCursor( res, *cursor ); Wx-0.9923/ext/dnd/XS/DropTarget.xs000664000000000000 547512306612245 15023 0ustar00Mark000000000000############################################################################# ## Name: ext/dnd/XS/DropTarget.xs ## Purpose: XS for Wx::*DropTarget ## Author: Mattia Barbon ## Modified by: ## Created: 16/08/2001 ## RCS-ID: $Id: DropTarget.xs 2285 2007-11-11 21:31:54Z mbarbon $ ## Copyright: (c) 2001-2002, 2004, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include "cpp/droptarget.h" MODULE=Wx PACKAGE=Wx::DropTarget #!sub OnData SV* wxDropTarget::new( data = 0 ) wxDataObject* data CODE: wxPliDropTarget* retval = new wxPliDropTarget( CLASS, data ); RETVAL = newRV_noinc( SvRV( retval->m_callback.GetSelf() ) ); wxPli_thread_sv_register( aTHX_ "Wx::DropTarget", retval, RETVAL ); OUTPUT: RETVAL static void wxDropTarget::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void DESTROY( THIS ) wxDropTarget* THIS CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::DropTarget", THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; void wxDropTarget::GetData() void wxDropTarget::SetDataObject( data ) wxDataObject* data CODE: wxPli_object_set_deleteable( aTHX_ ST(1), false ); SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away THIS->SetDataObject( data ); # callbacks # wxDragResult # wxDropTarget::OnData( x, y, def ) # wxCoord x # wxCoord y # wxDragResult def # CODE: # RETVAL = THIS->wxDropTarget::OnData( x, y, def ); # OUTPUT: # RETVAL wxDragResult wxDropTarget::OnEnter( x, y, def ) wxCoord x wxCoord y wxDragResult def CODE: RETVAL = THIS->wxDropTarget::OnEnter( x, y, def ); OUTPUT: RETVAL wxDragResult wxDropTarget::OnDragOver( x, y, def ) wxCoord x wxCoord y wxDragResult def CODE: RETVAL = THIS->wxDropTarget::OnDragOver( x, y, def ); OUTPUT: RETVAL bool wxDropTarget::OnDrop( x, y ) wxCoord x wxCoord y CODE: RETVAL = THIS->wxDropTarget::OnDrop( x, y ); OUTPUT: RETVAL void wxDropTarget::OnLeave() CODE: THIS->wxDropTarget::OnLeave(); MODULE=Wx PACKAGE=Wx::TextDropTarget SV* wxTextDropTarget::new() CODE: wxPliTextDropTarget* retval = new wxPliTextDropTarget( CLASS ); RETVAL = retval->m_callback.GetSelf(); SvREFCNT_inc( RETVAL ); OUTPUT: RETVAL #!sub OnDropText MODULE=Wx PACKAGE=Wx::FileDropTarget SV* wxFileDropTarget::new() CODE: wxPliFileDropTarget* retval = new wxPliFileDropTarget( CLASS ); RETVAL = retval->m_callback.GetSelf(); SvREFCNT_inc( RETVAL ); OUTPUT: RETVAL #!sub OnDropFiles Wx-0.9923/ext/docview/000775000000000000 012316265011 12636 5ustar00Mark000000000000Wx-0.9923/ext/docview/cpp/000775000000000000 012316265011 13420 5ustar00Mark000000000000Wx-0.9923/ext/docview/cpp/docview.h000664000000000000 13212312306612244 15356 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/docview/cpp/docview.h // Purpose: c++ wrapper for the wx Document/View Framework // Author: Simon Flack // Modified by: // Created: 28/08/2002 // RCS-ID: $Id: docview.h 2172 2007-08-17 22:56:36Z mbarbon $ // Copyright: (c) 2002-2004, 2005-2007 Simon Flack // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include #if wxUSE_MDI_ARCHITECTURE && wxUSE_DOC_VIEW_ARCHITECTURE #include "wx/docmdi.h" #endif #include "cpp/v_cback.h" // --- Wx::Document ---------------------------------------------------- class wxPliDocument : public wxDocument { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliDocument ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPliDocument, "Wx::Document", true ); DEC_V_CBACK_BOOL__VOID( Close ); DEC_V_CBACK_BOOL__VOID( Save ); DEC_V_CBACK_BOOL__VOID( SaveAs ); DEC_V_CBACK_BOOL__VOID( Revert ); // see helpers.h - wxPliInputStream #if wxUSE_STD_IOSTREAM wxSTD ostream& SaveObject( wxSTD ostream& ); wxSTD istream& LoadObject( wxSTD istream& ); #else wxOutputStream& SaveObject( wxOutputStream& ); wxInputStream& LoadObject( wxInputStream& ); #endif DEC_V_CBACK_BOOL__WXSTRING( OnSaveDocument ); DEC_V_CBACK_BOOL__WXSTRING( OnOpenDocument ); DEC_V_CBACK_BOOL__VOID( OnNewDocument ); DEC_V_CBACK_BOOL__VOID( OnCloseDocument ); DEC_V_CBACK_BOOL__VOID( OnSaveModified ); bool OnCreate( const wxString&, long ); // ??? OnCreateCommandProcessor/GetCommandProcessor/SetCommandProcessor ??? DEC_V_CBACK_VOID__VOID( OnChangedViewList ); DEC_V_CBACK_BOOL__VOID( DeleteContents ); // ??? Draw() ??? bool IsModified() const; void Modify( bool ); bool AddView( wxView* ); bool RemoveView( wxView* ); void UpdateAllViews( wxView* sender=NULL, wxObject* = NULL); DEC_V_CBACK_VOID__VOID( NotifyClosing ); DEC_V_CBACK_BOOL__VOID( DeleteAllViews ); wxDocManager *GetDocumentManager() const; wxDocTemplate *GetDocumentTemplate() const; void SetDocumentTemplate( wxDocTemplate* ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEC_V_CBACK_WXSTRING__VOID_const( GetUserReadableName ); #else DEC_V_CBACK_BOOL__mWXSTRING_const( GetPrintableName ); #endif wxWindow *GetDocumentWindow() const; }; DEF_V_CBACK_BOOL__VOID( wxPliDocument, wxDocument, Close ); DEF_V_CBACK_BOOL__VOID( wxPliDocument, wxDocument, Save ); DEF_V_CBACK_BOOL__VOID( wxPliDocument, wxDocument, SaveAs ); DEF_V_CBACK_BOOL__VOID( wxPliDocument, wxDocument, Revert ); #if wxUSE_STD_IOSTREAM wxSTD ostream& wxPliDocument::SaveObject( wxSTD ostream& stream ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "SaveObject" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "o", &stream ); } return wxDocument::SaveObject( stream ); } wxSTD istream& wxPliDocument::LoadObject( wxSTD istream& stream ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "LoadObject" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "o", &stream ); } return wxDocument::LoadObject( stream ); } #else wxOutputStream& wxPliDocument::SaveObject( wxOutputStream& stream ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "SaveObject" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "o", &stream ); } return wxDocument::SaveObject( stream ); } wxInputStream& wxPliDocument::LoadObject( wxInputStream& stream ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "LoadObject" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "o", &stream ); } return wxDocument::LoadObject( stream ); } #endif DEF_V_CBACK_BOOL__WXSTRING( wxPliDocument, wxDocument, OnSaveDocument ); DEF_V_CBACK_BOOL__WXSTRING( wxPliDocument, wxDocument, OnOpenDocument ); DEF_V_CBACK_BOOL__VOID( wxPliDocument, wxDocument, OnNewDocument ); DEF_V_CBACK_BOOL__VOID( wxPliDocument, wxDocument, OnCloseDocument ); DEF_V_CBACK_BOOL__VOID( wxPliDocument, wxDocument, OnSaveModified ); bool wxPliDocument::OnCreate( const wxString& path, long flags ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnCreate" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "Pl", &path, flags); bool val = SvTRUE( ret ); SvREFCNT_dec( ret ); return val; } return wxDocument::OnCreate( path, flags ); } DEF_V_CBACK_VOID__VOID( wxPliDocument, wxDocument, OnChangedViewList ); DEF_V_CBACK_BOOL__VOID( wxPliDocument, wxDocument, DeleteContents ); DEF_V_CBACK_BOOL__VOID_const( wxPliDocument, wxDocument, IsModified ); void wxPliDocument::Modify( bool mod ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "Modify" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "b", mod ); } wxDocument::Modify( mod ); } bool wxPliDocument::AddView( wxView *view) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "AddView" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "O", view ); bool val = SvTRUE( ret ); SvREFCNT_dec( ret ); return val; } return wxDocument::AddView( view ); } bool wxPliDocument::RemoveView( wxView *view ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "RemoveView" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "O", view ); bool val = SvTRUE( ret ); SvREFCNT_dec( ret ); return val; } return wxDocument::RemoveView( view ); } void wxPliDocument::UpdateAllViews( wxView *sender, wxObject *hint) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "UpdateAllViews" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "OO", sender, hint); } wxDocument::UpdateAllViews( sender, hint ); } DEF_V_CBACK_VOID__VOID( wxPliDocument, wxDocument, NotifyClosing ); DEF_V_CBACK_BOOL__VOID( wxPliDocument, wxDocument, DeleteAllViews ); wxDocManager *wxPliDocument::GetDocumentManager() const { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "GetDocumentManager" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, NULL ); wxDocManager* retval = (wxDocManager*)wxPli_sv_2_object( aTHX_ ret, "Wx::DocManager" ); SvREFCNT_dec( ret ); return retval; } return wxDocument::GetDocumentManager(); } wxDocTemplate *wxPliDocument::GetDocumentTemplate() const { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "GetDocumentTemplate" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, NULL ); wxDocTemplate* retval = (wxDocTemplate*)wxPli_sv_2_object( aTHX_ ret, "Wx::DocTemplate" ); SvREFCNT_dec( ret ); return retval; } return wxDocument::GetDocumentTemplate(); } void wxPliDocument::SetDocumentTemplate( wxDocTemplate *temp ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "SetDocumentTemplate" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "O", temp ); } wxDocument::SetDocumentTemplate( temp ); } #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEF_V_CBACK_WXSTRING__VOID_const( wxPliDocument, wxDocument, GetUserReadableName ); #else DEF_V_CBACK_BOOL__mWXSTRING_const( wxPliDocument, wxDocument, GetPrintableName ); #endif wxWindow *wxPliDocument::GetDocumentWindow() const { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "GetDocumentWindow" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, NULL ); wxWindow* retval = (wxWindow*) wxPli_sv_2_object( aTHX_ ret, "Wx::Window" ); SvREFCNT_dec( ret ); return retval; } return wxDocument::GetDocumentWindow(); } WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliDocument, wxDocument ); // --- Wx::View ------------------------------------------------- class wxPliView : public wxView { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliView ); WXPLI_DECLARE_V_CBACK(); public: wxPliView( const char* package ) : wxView(), m_callback( "Wx::View" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true); } ~wxPliView(); void OnActivateView( bool, wxView*, wxView* ); void OnPrint( wxDC*, wxObject* ); void OnUpdate( wxView* sender, wxObject* hint=(wxObject*) NULL ); DEC_V_CBACK_VOID__VOID( OnClosingDocument ); DEC_V_CBACK_VOID__VOID( OnChangeFilename ); bool OnCreate( wxDocument*, long ); bool Close( bool deleteWindow = true ); bool OnClose( bool ); // bool ProcessEvent(wxEvent&); void Activate( bool ); virtual void OnDraw(wxDC* dc); #if wxUSE_PRINTING_ARCHITECTURE wxPrintout* OnCreatePrintout(); #endif }; wxPliView::~wxPliView() {} void wxPliView::OnDraw( wxDC* dc ) { } void wxPliView::OnActivateView( bool activate, wxView* activeView, wxView* deactiveView) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnActivateView" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "bOO", activate, activeView, deactiveView); return; } wxView::OnActivateView( activate, activeView, deactiveView); } void wxPliView::OnPrint( wxDC* dc, wxObject* info) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnPrint" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "OO", dc, info ); return; } wxView::OnPrint( dc, info); } void wxPliView::OnUpdate( wxView* sender, wxObject* hint ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnUpdate" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "OO", sender, hint ); return; } wxView::OnUpdate( sender, hint ); } DEF_V_CBACK_VOID__VOID( wxPliView, wxView, OnClosingDocument ); DEF_V_CBACK_VOID__VOID( wxPliView, wxView, OnChangeFilename ); bool wxPliView::OnCreate( wxDocument* doc, long flags ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnCreate" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR,"Ol", doc, flags ); bool val = SvTRUE( ret ); SvREFCNT_dec( ret ); return val; } return wxView::OnCreate( doc, flags ); } DEF_V_CBACK_BOOL__BOOL( wxPliView, wxView, Close ); DEF_V_CBACK_BOOL__BOOL( wxPliView, wxView, OnClose ); void wxPliView::Activate( bool activate ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "Activate" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "b", activate ); return; } wxView::Activate( activate ); } #if wxUSE_PRINTING_ARCHITECTURE wxPrintout* wxPliView::OnCreatePrintout() { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnCreatePrintout" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, NULL); wxPrintout* retval = (wxPrintout*)wxPli_sv_2_object( aTHX_ ret, "Wx::Printout" ); SvREFCNT_dec( ret ); return retval; } return wxView::OnCreatePrintout( ); } #endif WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliView, wxView ); // --- Wx::DocTemplate ------------------------------------------------- class wxPliDocTemplate : public wxDocTemplate { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliDocTemplate ); WXPLI_DECLARE_V_CBACK(); public: wxPliDocTemplate( const char* package, wxDocManager* manager, const wxString& descr, const wxString& filter, const wxString& dir, const wxString& ext, const wxString& docTypeName, const wxString& viewTypeName, wxClassInfo* docClassInfo, wxClassInfo* viewClassInfo, long flags, const wxString& docClassName = wxEmptyString, const wxString& viewClassName = wxEmptyString ) : wxDocTemplate( manager, descr, filter, dir, ext, docTypeName, viewTypeName, docClassInfo, viewClassInfo, flags ), m_callback( "Wx::DocTemplate" ), m_docClassName( docClassName ), m_viewClassName( viewClassName ), m_plDocClassInfo( NULL ), m_plViewClassInfo( NULL ) { m_hasDocClassInfo = docClassInfo != 0 || !docClassName.empty(); m_hasViewClassInfo = viewClassInfo != 0 || !viewClassName.empty(); m_callback.SetSelf( wxPli_make_object( this, package ), true); if( !docClassName.empty() ) { #if wxUSE_EXTENDED_RTTI m_plDocClassInfo = new wxPliClassInfo( sm_docParents, docClassName, sizeof(wxPliDocument), &fake_constructor, NULL ); #else m_plDocClassInfo = new wxClassInfo( docClassName, &wxDocument::ms_classInfo, NULL, sizeof(wxPliDocument), &fake_constructor ); #endif m_docClassInfo = m_plDocClassInfo; } if( !viewClassName.empty() ) { #if wxUSE_EXTENDED_RTTI m_plViewClassInfo = new wxPliClassInfo( sm_viewParents, viewClassName, sizeof(wxPliView), &fake_constructor, NULL ); #else m_plViewClassInfo = new wxClassInfo( viewClassName, &wxView::ms_classInfo, NULL, sizeof(wxPliView), &fake_constructor ); #endif m_viewClassInfo = m_plViewClassInfo; } } ~wxPliDocTemplate() { delete m_plViewClassInfo; delete m_plDocClassInfo; } wxDocument *CreateDocument( const wxString& path, long flags = 0); wxView *CreateView( wxDocument*, long ); DEC_V_CBACK_WXSTRING__VOID_const( GetViewName ); DEC_V_CBACK_WXSTRING__VOID_const( GetDocumentName ); private: static wxString sm_className; static wxObject* fake_constructor(); static SV* CallConstructor( const wxString& className ); #if wxUSE_EXTENDED_RTTI static const wxClassInfo* sm_docParents[]; static const wxClassInfo* sm_viewParents[]; #endif private: wxString m_docClassName, m_viewClassName; wxClassInfo *m_plDocClassInfo, *m_plViewClassInfo; bool m_hasDocClassInfo, m_hasViewClassInfo; DEC_V_CBACK_BOOL__WXSTRING( FileMatchesTemplate ); }; wxString wxPliDocTemplate::sm_className; #if wxUSE_EXTENDED_RTTI const wxClassInfo* wxPliDocTemplate::sm_docParents[] = { &wxDocument::ms_classInfo, NULL }; const wxClassInfo* wxPliDocTemplate::sm_viewParents[] = { &wxView::ms_classInfo, NULL }; #endif wxObject* wxPliDocTemplate::fake_constructor() { dTHX; SV* obj = CallConstructor( sm_className ); wxObject* doc = (wxDocument*)wxPli_sv_2_object( aTHX_ obj, "Wx::Object" ); SvREFCNT_dec( obj ); return doc; } SV* wxPliDocTemplate::CallConstructor( const wxString& className ) { dTHX; dSP; ENTER; SAVETMPS; char buffer[WXPL_BUF_SIZE]; #if wxUSE_UNICODE wxConvUTF8.WC2MB( buffer, className, WXPL_BUF_SIZE - 4 ); #else strcpy( buffer, className.c_str() ); #endif SV* sv = newSVpv( CHAR_P buffer, 0 ); PUSHMARK(SP); XPUSHs( sv_2mortal( sv ) ); PUTBACK; int count = call_method( "new", G_SCALAR ); if( count != 1 ) croak( "Constructor must return exactly 1 value" ); SPAGAIN; SV* obj = POPs; SvREFCNT_inc( obj ); PUTBACK; FREETMPS; LEAVE; return obj; } wxDocument *wxPliDocTemplate::CreateDocument( const wxString& path, long flags ) { dTHX; wxDocument* doc = 0; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "CreateDocument" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "Pl", &path, flags ); doc = (wxDocument*) wxPli_sv_2_object( aTHX_ ret, "Wx::Document" ); SvREFCNT_dec( ret ); } else { sm_className = m_docClassName; if( m_hasDocClassInfo ) return wxDocTemplate::CreateDocument( path, flags ); } return doc; } wxView *wxPliDocTemplate::CreateView( wxDocument* doc, long flags ) { dTHX; wxView* view = 0; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "CreateView" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "Ol", doc, flags ); view = (wxView*) wxPli_sv_2_object( aTHX_ ret, "Wx::View" ); SvREFCNT_dec( ret ); } else { sm_className = m_viewClassName; if( m_hasViewClassInfo ) return wxDocTemplate::CreateView( doc, flags ); } return view; } DEF_V_CBACK_WXSTRING__VOID_const( wxPliDocTemplate, wxDocTemplate, GetViewName ); DEF_V_CBACK_WXSTRING__VOID_const( wxPliDocTemplate, wxDocTemplate, GetDocumentName ); DEF_V_CBACK_BOOL__WXSTRING( wxPliDocTemplate, wxDocTemplate, FileMatchesTemplate ); WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliDocTemplate, wxDocTemplate ); // --- Wx::DocManager ------------------------------------------------- class wxPliDocManager : public wxDocManager { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliDocManager ); WXPLI_DECLARE_V_CBACK(); public: wxPliDocManager( const char* package, long flags = wxDEFAULT_DOCMAN_FLAGS, bool initialize = true) : wxDocManager(flags, initialize), m_callback( "Wx::DocManager" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true); } ~wxPliDocManager(); // bool ProcessEvent( wxEvent& ); DEC_V_CBACK_VOID__VOID( OnOpenFileFailure ); wxDocument* CreateDocument( const wxString& path, long flags = 0 ); wxView* CreateView( wxDocument* doc, long flags = 0 ); void DeleteTemplate( wxDocTemplate* temp, long flags = 0 ); bool FlushDoc( wxDocument* ); wxDocTemplate* MatchTemplate( const wxString& ); wxDocTemplate* SelectDocumentPath( wxDocTemplate** templates, int noTemplates, wxString& path, long flags, bool save=false); wxDocTemplate* SelectDocumentType( wxDocTemplate** templates, int noTemplates, bool sort=false); wxDocTemplate* SelectViewType( wxDocTemplate** templates, int noTemplates, bool sort=false ); wxDocTemplate* FindTemplateForPath( const wxString& ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) void ActivateView( wxView*, bool activate = true); #else void ActivateView( wxView*, bool activate = true, bool deleting = false); #endif // wxView* GetCurrentView() const; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEC_V_CBACK_WXSTRING__VOID( MakeNewDocumentName ); #else DEC_V_CBACK_BOOL__mWXSTRING( MakeDefaultName ); #endif wxString MakeFrameTitle( wxDocument* ); wxFileHistory* OnCreateFileHistory(); wxFileHistory* GetFileHistory(); void AddFileToHistory( const wxString& ); void RemoveFileFromHistory( int ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) size_t GetHistoryFilesCount() const; #else int GetNoHistoryFiles() const; #endif wxString GetHistoryFile( int ) const; void FileHistoryUseMenu( wxMenu* ); void FileHistoryRemoveMenu( wxMenu* ); #if wxUSE_CONFIG // FileHistoryLoad()/Save() #endif void FileHistoryAddFilesToMenu(); void FileHistoryAddFilesToMenu( wxMenu* ); }; wxPliDocManager::~wxPliDocManager() {} wxDocument* wxPliDocManager::CreateDocument( const wxString& path, long flags ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "CreateDocument" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "Pl", &path, flags ); wxDocument* retval = (wxDocument*)wxPli_sv_2_object( aTHX_ ret, "Wx::Document" ); SvREFCNT_dec( ret ); return retval; } return wxDocManager::CreateDocument( path, flags ); } wxView* wxPliDocManager::CreateView( wxDocument* doc, long flags ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "CreateView" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "Ol", doc, flags ); wxView* retval = (wxView*)wxPli_sv_2_object( aTHX_ ret, "Wx::View" ); SvREFCNT_dec( ret ); return retval; } return wxDocManager::CreateView( doc, flags ); } void wxPliDocManager::DeleteTemplate( wxDocTemplate* temp, long flags ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "DeleteTemplate" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "Ol", &temp, flags ); return; } wxDocManager::DeleteTemplate( temp, flags ); } bool wxPliDocManager::FlushDoc( wxDocument* doc ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "FlushDoc" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "O", doc ); bool val = SvTRUE( ret ); SvREFCNT_dec( ret ); return val; } return wxDocManager::FlushDoc( doc ); } wxDocTemplate* wxPliDocManager::MatchTemplate( const wxString& path ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "MatchTemplate" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "P", &path ); wxDocTemplate* retval = (wxDocTemplate*)wxPli_sv_2_object( aTHX_ ret, "Wx::DocTemplate" ); SvREFCNT_dec( ret ); return retval; } return wxDocManager::MatchTemplate(path); } wxDocTemplate* wxPliDocManager::SelectDocumentPath( wxDocTemplate** templates, int noTemplates, wxString& path, long flags, bool save) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "SelectDocumentPath" ) ) { dSP; ENTER; SAVETMPS; // Create a perl arrayref from the list of wxDocTemplates int i; AV* arrTemplates = newAV(); for (i = 0; i < noTemplates ; i++) { SV* svval = wxPli_object_2_sv( aTHX_ sv_newmortal(), templates[i] ); av_store( arrTemplates, i, svval ); SvREFCNT_inc( svval ); } SV* template_aref = sv_2mortal( newRV_noinc( (SV*)arrTemplates ) ); PUSHMARK( SP ); wxPli_push_arguments( aTHX_ &SP, "sSiPlb", m_callback.GetSelf(), template_aref, noTemplates, &path, flags, save ); PUTBACK; SV* method = sv_2mortal( newRV_inc( (SV*) m_callback.GetMethod() ) ); int items = call_sv( method, G_ARRAY ); SPAGAIN; SV* tmp; if( items == 2 ) { tmp = POPs; WXSTRING_INPUT( path, wxString, tmp ); // Set the selected path } else if( items == 1 ) { // valid if user alter the path } else { croak( "wxPliDocManager::SelectDocumentPath() expected 1" " or 2 values, got %i", items ); } tmp = POPs; wxDocTemplate* retval = (wxDocTemplate*)wxPli_sv_2_object( aTHX_ tmp, "Wx::DocTemplate" ); PUTBACK; FREETMPS; LEAVE; return retval; //return the doctemplate } return wxDocManager::SelectDocumentPath( templates, noTemplates, path, save ); } wxDocTemplate* wxPliDocManager::SelectDocumentType( wxDocTemplate** templates, int noTemplate, bool sort) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "SelectDocumentType" ) ) { SV *ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "Oib", templates, noTemplate, sort ); wxDocTemplate* retval = (wxDocTemplate*)wxPli_sv_2_object( aTHX_ ret, "Wx::DocTemplate" ); SvREFCNT_dec( ret ); return retval; } return wxDocManager::SelectDocumentType(templates, noTemplate, sort); } wxDocTemplate* wxPliDocManager::SelectViewType( wxDocTemplate** templates, int noTemplate, bool sort ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "SelectViewType" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "Oib", templates, noTemplate, sort ); wxDocTemplate* retval = (wxDocTemplate*)wxPli_sv_2_object( aTHX_ ret, "Wx::DocTemplate" ); SvREFCNT_dec( ret ); return retval; } return wxDocManager::SelectViewType(templates, noTemplate, sort); } wxDocTemplate* wxPliDocManager::FindTemplateForPath( const wxString& path ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "FindTemplateForPath" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "P", &path ); wxDocTemplate* retval = (wxDocTemplate*)wxPli_sv_2_object( aTHX_ ret, "Wx::DocTemplate" ); SvREFCNT_dec( ret ); return retval; } return wxDocManager::FindTemplateForPath( path ); } #if WXPERL_W_VERSION_GE( 2, 5, 1 ) void wxPliDocManager::ActivateView( wxView* view, bool activate) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "ActivateView" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "Ob", view, activate ); return; } wxDocManager::ActivateView( view, activate ); } #else void wxPliDocManager::ActivateView( wxView* view, bool activate, bool deleting) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "ActivateView" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "Obb", view, activate, deleting ); return; } wxDocManager::ActivateView( view, activate, deleting ); } #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEF_V_CBACK_WXSTRING__VOID( wxPliDocManager, wxDocManager, MakeNewDocumentName ); #else DEF_V_CBACK_BOOL__mWXSTRING( wxPliDocManager, wxDocManager, MakeDefaultName ); #endif wxString wxPliDocManager::MakeFrameTitle( wxDocument* doc ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "MakeFrameTitle" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "O", doc ); wxString retval; WXSTRING_INPUT( retval, wxString, ret ); SvREFCNT_dec( ret ); return retval; } return wxDocManager::MakeFrameTitle( doc ); } DEF_V_CBACK_VOID__VOID( wxPliDocManager, wxDocManager, OnOpenFileFailure ); wxFileHistory* wxPliDocManager::OnCreateFileHistory() { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnCreateFileHistory" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_NOARGS, NULL ); wxFileHistory* retval = (wxFileHistory*)wxPli_sv_2_object( aTHX_ ret, "Wx::FileHistory" ); SvREFCNT_dec( ret ); return retval; } return wxDocManager::OnCreateFileHistory( ); } wxFileHistory* wxPliDocManager::GetFileHistory() { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "GetFileHistory" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_NOARGS, NULL ); wxFileHistory* retval = (wxFileHistory*)wxPli_sv_2_object( aTHX_ ret, "Wx::FileHistory" ); SvREFCNT_dec( ret ); return retval; } return wxDocManager::GetFileHistory( ); } void wxPliDocManager::AddFileToHistory( const wxString& file ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "AddFileToHistory" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "P", &file); return; } wxDocManager::AddFileToHistory( file ); } void wxPliDocManager::RemoveFileFromHistory( int i ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "RemoveFileFromHistory" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "i", i); return; } wxDocManager::RemoveFileFromHistory( i ); } #if WXPERL_W_VERSION_GE( 2, 5, 1 ) size_t wxPliDocManager::GetHistoryFilesCount() const #else int wxPliDocManager::GetNoHistoryFiles() const #endif { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #if WXPERL_W_VERSION_GE( 2, 5, 1 ) "GetHistoryFilesCount" ) ) #else "GetNoHistoryFiles" ) ) #endif { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_NOARGS, NULL); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) int retval = (int)SvIV( ret ); #else size_t retval = (size_t)SvIV( ret ); #endif SvREFCNT_dec( ret ); return retval; } #if WXPERL_W_VERSION_GE( 2, 5, 1 ) return wxDocManager::GetHistoryFilesCount(); #else return wxDocManager::GetNoHistoryFiles(); #endif } wxString wxPliDocManager::GetHistoryFile( int i ) const { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "GetHistoryFile" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "i", i); wxString retval; WXSTRING_INPUT( retval, wxString, ret ); SvREFCNT_dec( ret ); return retval; } return wxDocManager::GetHistoryFile( i ); } void wxPliDocManager::FileHistoryUseMenu( wxMenu* menu ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "FileHistoryUseMenu" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "O", menu); return; } wxDocManager::FileHistoryUseMenu( menu ); } void wxPliDocManager::FileHistoryRemoveMenu( wxMenu* menu ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "FileHistoryRemoveMenu" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "O", menu); return; } wxDocManager::FileHistoryRemoveMenu( menu ); } #if wxUSE_CONFIG // FileHistoryLoad()/Save() #endif void wxPliDocManager::FileHistoryAddFilesToMenu() { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "FileHistoryAddFilesToMenu" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_NOARGS|G_DISCARD, NULL); return; } wxDocManager::FileHistoryAddFilesToMenu( ); } void wxPliDocManager::FileHistoryAddFilesToMenu( wxMenu* menu ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "FileHistoryAddFilesToMenu" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "O", menu); return; } wxDocManager::FileHistoryAddFilesToMenu( menu ); } WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliDocManager, wxDocManager ); // --- Wx::DocChildFrame ------------------------------------------------- class wxPliDocChildFrame : public wxDocChildFrame { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliDocChildFrame ); WXPLI_DECLARE_V_CBACK(); public: wxPliDocChildFrame(const char* package, wxDocument* doc, wxView* view, wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr) : wxDocChildFrame(doc, view, parent, id, title, pos, size, style, name), m_callback( "Wx::DocChildFrame" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true); } ~wxPliDocChildFrame(); }; wxPliDocChildFrame::~wxPliDocChildFrame() {} WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliDocChildFrame, wxDocChildFrame ); // --- Wx::DocParentFrame ------------------------------------------------- class wxPliDocParentFrame : public wxDocParentFrame { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliDocParentFrame ); WXPLI_DECLARE_V_CBACK(); public: wxPliDocParentFrame(const char* package, wxDocManager* manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr) : wxDocParentFrame(manager, parent, id, title, pos, size, style, name), m_callback( "Wx::DocParentFrame" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true); } ~wxPliDocParentFrame(); }; wxPliDocParentFrame::~wxPliDocParentFrame() {} WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliDocParentFrame, wxDocParentFrame ); // --- Wx::DocMDIChildFrame ------------------------------------------------- #if wxUSE_MDI_ARCHITECTURE && wxUSE_DOC_VIEW_ARCHITECTURE class wxPliDocMDIChildFrame : public wxDocMDIChildFrame { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliDocMDIChildFrame ); WXPLI_DECLARE_V_CBACK(); public: wxPliDocMDIChildFrame(const char* package, wxDocument* doc, wxView* view, wxMDIParentFrame* frame, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr) : wxDocMDIChildFrame(doc, view, frame, id, title, pos, size, style, name), m_callback( "Wx::DocMDIChildFrame" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true); } ~wxPliDocMDIChildFrame(); }; wxPliDocMDIChildFrame::~wxPliDocMDIChildFrame() {} WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliDocMDIChildFrame, wxDocMDIChildFrame ); // --- Wx::DocMDIParentFrame ------------------------------------------------- class wxPliDocMDIParentFrame : public wxDocMDIParentFrame { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliDocMDIParentFrame ); WXPLI_DECLARE_V_CBACK(); public: wxPliDocMDIParentFrame(const char* package, wxDocManager* manager, wxFrame *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr) : wxDocMDIParentFrame(manager, parent, id, title, pos, size, style, name), m_callback( "Wx::DocMDIParentFrame" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true); } ~wxPliDocMDIParentFrame(); }; wxPliDocMDIParentFrame::~wxPliDocMDIParentFrame() {} WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliDocMDIParentFrame, wxDocMDIParentFrame ); #endif // --- Wx::FileHistory ------------------------------------------------- class wxPliFileHistory : public wxFileHistory { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliFileHistory ); WXPLI_DECLARE_V_CBACK(); public: wxPliFileHistory(const char* package, int maxfiles = 9) : wxFileHistory( maxfiles ), m_callback( "Wx::FileHistory" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true); } ~wxPliFileHistory(); void AddFileToHistory( const wxString& ); void RemoveFileFromHistory( int ); int GetMaxFiles() const; void UseMenu( wxMenu* ); void RemoveMenu( wxMenu* ); #if wxUSE_CONFIG void Load( wxConfigBase& ); void Save( wxConfigBase& ); #endif void AddFilesToMenu(); void AddFilesToMenu( wxMenu* ); wxString GetHistoryFile( int ) const; #if WXPERL_W_VERSION_GE( 2, 5, 1 ) size_t GetCount() const; #else int GetCount() const; #endif wxList& GetMenus() const; }; wxPliFileHistory::~wxPliFileHistory() {} void wxPliFileHistory::AddFileToHistory( const wxString& file ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "AddFileToHistory" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "P", &file ); return; } wxFileHistory::AddFileToHistory( file ); } void wxPliFileHistory::RemoveFileFromHistory( int i ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "RemoveFileFromHistory" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "i", i ); return; } wxFileHistory::RemoveFileFromHistory( i ); } int wxPliFileHistory::GetMaxFiles() const { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "GetMaxFiles" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, NULL); int retval = (int)SvIV( ret ); SvREFCNT_dec( ret ); return retval; } return wxFileHistory::GetMaxFiles(); } void wxPliFileHistory::UseMenu( wxMenu* menu ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "UseMenu" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "O", menu ); return; } wxFileHistory:UseMenu( menu ); } void wxPliFileHistory::RemoveMenu( wxMenu* menu ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "RemoveMenu" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "O", menu ); return; } wxFileHistory::UseMenu( menu ); } #if wxUSE_CONFIG void wxPliFileHistory::Load( wxConfigBase& config ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "Load" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "o", &config, "Wx::ConfigBase"); return; } wxFileHistory::Load( config ); } void wxPliFileHistory::Save( wxConfigBase& config ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "Save" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "o", &config, "Wx::ConfigBase" ); return; } wxFileHistory::Save( config ); } #endif void wxPliFileHistory::AddFilesToMenu() { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "AddFilesToMenu" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD|G_NOARGS, NULL ); return; } wxFileHistory::AddFilesToMenu(); } void wxPliFileHistory::AddFilesToMenu( wxMenu* menu ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "AddFilesToMenu" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "O", menu ); return; } wxFileHistory::AddFilesToMenu( menu ); } wxString wxPliFileHistory::GetHistoryFile( int i ) const { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "GetHistoryFile" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "i", i ); wxString retval; WXSTRING_INPUT( retval, wxString, ret ); SvREFCNT_dec( ret ); return retval; } return wxFileHistory::GetHistoryFile( i ); } #if WXPERL_W_VERSION_GE( 2, 5, 1 ) size_t wxPliFileHistory::GetCount() const #else int wxPliFileHistory::GetCount() const #endif { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "GetCount" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_NOARGS, NULL ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) int retval = (int)SvIV( ret ); #else size_t retval = (size_t)SvIV( ret ); #endif SvREFCNT_dec( ret ); return retval; } return wxFileHistory::GetCount(); } WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliFileHistory, wxFileHistory ); Wx-0.9923/ext/docview/cpp/dv_constants.cpp000664000000000000 265412306612244 16723 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/docview/cpp/dv_constants.cpp // Purpose: constants for Wx::DocView // Author: Simon Flack // Created: 11/09/2002 // RCS-ID: $Id: dv_constants.cpp 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2002-2005 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/constants.h" double docview_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: docview #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); // if( strlen( name ) >= 7 ) // fl = name[6]; // else // fl = 0; switch( fl ) { case 'D': r( wxDEFAULT_TEMPLATE_FLAGS ); r( wxDEFAULT_DOCMAN_FLAGS ); r( wxDOC_SDI ); r( wxDOC_MDI ); r( wxDOC_NEW ); r( wxDOC_SILENT ); break; case 'T': r( wxTEMPLATE_VISIBLE ); r( wxTEMPLATE_INVISIBLE ); break; case 'M': r( wxMAX_FILE_HISTORY ); break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants docview_module( &docview_constant ); Wx-0.9923/ext/docview/DocView.xs000664000000000000 246012306612244 14637 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/docview/DocView.xs // Purpose: XS for wxWidgets Document/View Framework // Author: Simon Flack // Modified by: // Created: 11/09/2002 // RCS-ID: $Id: DocView.xs 2757 2010-01-17 10:26:27Z mbarbon $ // Copyright: (c) 2002, 2004, 2007-2010 Simon Flack // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/docview.h" #undef THIS #include MODULE=Wx__DocView BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE: XS/DocManager.xs INCLUDE: XS/DocTemplate.xs INCLUDE: XS/Document.xs INCLUDE: XS/View.xs INCLUDE: XS/FileHistory.xs INCLUDE: XS/DocParentFrame.xs INCLUDE: XS/DocChildFrame.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/CommandProcessor.xsp #if wxUSE_MDI_ARCHITECTURE && wxUSE_DOC_VIEW_ARCHITECTURE INCLUDE: XS/DocMDIParentFrame.xs INCLUDE: XS/DocMDIChildFrame.xs #endif #include "cpp/dv_constants.cpp" # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__DocView Wx-0.9923/ext/docview/lib/000775000000000000 012316265010 13403 5ustar00Mark000000000000Wx-0.9923/ext/docview/lib/Wx/000775000000000000 012316265010 14001 5ustar00Mark000000000000Wx-0.9923/ext/docview/lib/Wx/DocView.pm000664000000000000 302012306612244 15756 0ustar00Mark000000000000############################################################################# ## Name: ext/docview/lib/Wx/DocView.pm ## Purpose: Wx::DocView ## Author: Simon Flack ## Modified by: ## Created: 11/09/2002 ## RCS-ID: $Id: DocView.pm 2188 2007-08-20 19:21:29Z mbarbon $ ## Copyright: (c) 2002, 2004, 2007 Simon Flack ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::DocView; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::wx_boot( 'Wx::DocView', $VERSION ); # # properly setup inheritance tree # no strict; package Wx::Printout; # avoid warning package Wx::MDIChildFrame; # avoid warning package Wx::MDIParentFrame; # avoid warning package Wx::DocManager; @ISA = qw(Wx::EvtHandler); package Wx::View; @ISA = qw(Wx::EvtHandler); package Wx::Document; @ISA = qw(Wx::EvtHandler); package Wx::DocPrintout; @ISA = qw(Wx::Printout); package Wx::DocChildFrame; @ISA = qw(Wx::Frame); package Wx::DocParentFrame; @ISA = qw(Wx::Frame); package Wx::DocMDIChildFrame; @ISA = qw(Wx::MDIChildFrame); package Wx::DocMDIParentFrame; @ISA = qw(Wx::MDIParentFrame); package Wx::PlCommand; @ISA = qw(Wx::Command); 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/docview/Makefile.PL000664000000000000 156012306612244 14675 0ustar00Mark000000000000############################################################################# ## Name: ext/docview/Makefile.PL ## Purpose: Makefile.PL for wxWidgets Document / View Framework ## Author: Simon Flack ## Modified by: ## Created: 11/09/2002 ## RCS-ID: $Id: Makefile.PL 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2002-2004, 2007, 2010 Simon Flack ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::DocView', VERSION_FROM => 'lib/Wx/DocView.pm', WX_CORE_LIB => 'core base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/docview/t/000775000000000000 012316265011 13101 5ustar00Mark000000000000Wx-0.9923/ext/docview/t/01_load.t000775000000000000 22212306612244 14547 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::DocView; print "ok\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/docview/t/02_inheritance.t000775000000000000 40212306612244 16122 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::DocView; use Wx::MDI; test_inheritance_end(); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/docview/t/03_threads.t000775000000000000 123112306612244 15305 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use Test::More tests => 4; use Wx::DocView; my $app = Wx::App->new( sub { 1 } ); my $cp = Wx::CommandProcessor->new; my $pc = Wx::PlCommand->new; my $cp2 = Wx::CommandProcessor->new; my $pc2 = Wx::PlCommand->new; undef $cp2; $pc2->Destroy; # having it DTRT on undef is tricky my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/docview/t/04_cmdproc.t000775000000000000 214312306612244 15306 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Test::More tests => 18; use Wx; use Wx::DocView; my %did = (); my $cp = Wx::CommandProcessor->new; my $cmd = CP1->new( 0, 'first' ); ok( $cp->Submit( $cmd ) ); undef $cmd; is( $did{first}, 1 ); ok( !$cp->CanUndo ); ok( $cp->Submit( CP1->new( 1, 'first' ) ) ); is( $did{first}, 2 ); ok( $cp->CanUndo ); ok( !$cp->Submit( CP2->new ) ); ok( $cp->Submit( CP1->new( 1, 'second' ) ) ); is( $did{second}, 1 ); ok( $cp->CanUndo ); # check ownership my @cmds = $cp->GetCommands; is_deeply( [ map $_->GetName, @cmds ], [ qw(first first second) ] ); undef @cmds; ok( $cp->Undo ); is( $did{second}, 0 ); ok( $cp->Undo ); is( $did{first}, 1 ); ok( $cp->Redo ); is( $did{first}, 2 ); undef $cp; { package CP1; use base qw(Wx::PlCommand); sub Do { my( $self ) = @_; ++$did{$self->GetName}; return 1; } sub Undo { my( $self ) = @_; --$did{$self->GetName}; return 1; } } { package CP2; use base qw(Wx::PlCommand); sub Do { main::ok( 1, __PACKAGE__ . '::Do' ); return 0; } } Wx-0.9923/ext/docview/typemap000664000000000000 210012306612244 14314 0ustar00Mark000000000000############################################################################# ## Name: ext/docview/typemap ## Purpose: typemap ## Author: Simon Flack ## Modified by: ## Created: 11/09/2002 ## RCS-ID: $Id: typemap 2195 2007-08-21 21:36:52Z mbarbon $ ## Copyright: (c) 2002, 2004, 2007 Simon Flack ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxDocument * O_WXOBJECT wxView * O_WXOBJECT wxDocTemplate * O_WXOBJECT wxDocManager * O_WXOBJECT wxDocChildFrame * O_WXOBJECT wxDocParentFrame * O_WXOBJECT wxDocMDIChildFrame * O_WXOBJECT wxDocMDIParentFrame * O_WXOBJECT wxMDIParentFrame * O_WXOBJECT wxDocPrintout * O_WXOBJECT wxPrintout * O_WXOBJECT wxCommand * O_WXOBJECT_THR wxPlCommand * O_WXOBJECT_THR wxCommandProcessor * O_WXOBJECT_THR wxFileHistory * O_WXOBJECT Wx-0.9923/ext/docview/XS/000775000000000000 012316265011 13170 5ustar00Mark000000000000Wx-0.9923/ext/docview/XS/CommandProcessor.xsp000664000000000000 1061712306612244 17312 0ustar00Mark000000000000############################################################################# ## Name: ext/docview/XS/CommandProcessor.xsp ## Purpose: XS++ for wxCommand and wxCommandProcessor ## Author: Mattia Barbon ## Modified by: ## Created: 20/08/2007 ## RCS-ID: $Id: CommandProcessor.xsp 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2007, 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 #include #include "cpp/v_cback.h" %typemap{wxCommand*}{simple}; %typemap{wxPlCommand*}{simple}; %typemap{wxCommandProcessor*}{simple}; %file{xspp/cmdproc.h}; %{ class wxPlCommand : public wxCommand { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlCommand ); WXPLI_DECLARE_V_CBACK(); public: wxPlCommand( const char* package, bool canUndoIt, const wxString& name ); bool base_CanUndo() const { return wxCommand::CanUndo(); } DEC_V_CBACK_BOOL__VOID( Do ); DEC_V_CBACK_BOOL__VOID( Undo ); DEC_V_CBACK_BOOL__VOID_const( CanUndo ); }; inline wxPlCommand::wxPlCommand( const char* package, bool canUndoIt, const wxString& name ) : wxCommand( canUndoIt, name ), m_callback( "Wx::Command" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } DEF_V_CBACK_BOOL__VOID_pure( wxPlCommand, wxCommand, Do ); DEF_V_CBACK_BOOL__VOID_pure( wxPlCommand, wxCommand, Undo ); DEF_V_CBACK_BOOL__VOID_const( wxPlCommand, wxCommand, CanUndo ); WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlCommand, wxCommand ); %} %file{-}; #include "xspp/cmdproc.h" %name{Wx::Command} class wxCommand { %{ static void wxCommand::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxCommand::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; %} void Destroy() %code{% wxPli_detach_object( aTHX_ ST(0) ); delete THIS; %}; bool Do(); bool Undo(); bool CanUndo() const; wxString GetName() const; }; %name{Wx::PlCommand} class wxPlCommand { wxCommand( bool canUndoIt = false, const wxString& name = wxEmptyString ) %code{% RETVAL = new wxPlCommand( CLASS, canUndoIt, name ); %}; %name{CanUndo} bool base_CanUndo(); }; %name{Wx::CommandProcessor} class wxCommandProcessor { wxCommandProcessor( int maxCommands = -1 ); %{ static void wxCommandProcessor::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxCommandProcessor::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; %} bool Submit( wxCommand *command, bool storeIt = true ) %code{% wxPli_object_set_deleteable( aTHX_ ST(1), false ); RETVAL = THIS->Submit( command, storeIt ); %}; void Store( wxCommand *command ) %code{% wxPli_object_set_deleteable( aTHX_ ST(1), false ); THIS->Store( command ); %}; bool Undo(); bool Redo(); bool CanUndo() const; bool CanRedo() const; void Initialize(); void SetMenuStrings(); wxString GetUndoMenuLabel() const; wxString GetRedoMenuLabel() const; #if wxUSE_MENUS void SetEditMenu( wxMenu* menu ); wxMenu* GetEditMenu() const; #endif // wxUSE_MENUS %{ void wxCommandProcessor::GetCommands() PPCODE: const wxList& cmds = THIS->GetCommands(); PUTBACK; wxPli_objlist_push( aTHX_ cmds ); SPAGAIN; for( int i = cmds.GetCount() - 0; i >= 0; --i ) wxPli_object_set_deleteable( aTHX_ SP[-i], false ); %} wxCommand* GetCurrentCommand() const; int GetMaxCommands() const; void ClearCommands(); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) bool IsDirty() const; void MarkAsSaved(); #endif const wxString& GetUndoAccelerator() const; const wxString& GetRedoAccelerator() const; void SetUndoAccelerator( const wxString& accel ); void SetRedoAccelerator( const wxString& accel ); }; Wx-0.9923/ext/docview/XS/DocChildFrame.xs000664000000000000 251312306612244 16254 0ustar00Mark000000000000############################################################################# ## Name: ext/docview/XS/DocChildFrame.xs ## Purpose: XS for wxDocChildFrame (Document/View framwork) ## Author: Simon Flack ## Modified by: ## Created: 11/09/2002 ## RCS-ID: $Id: DocChildFrame.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001, 2004 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 PACKAGE=Wx::DocChildFrame wxDocChildFrame * wxDocChildFrame::new(doc, view, frame, id, title, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wxFrameNameStr) wxDocument* doc wxView* view wxFrame* frame wxWindowID id wxString title wxPoint pos wxSize size long style wxString name CODE: RETVAL=new wxPliDocChildFrame(CLASS, doc, view, frame, id, title, pos, size, style, name); OUTPUT: RETVAL wxDocument * wxDocChildFrame::GetDocument() wxView * wxDocChildFrame::GetView() void wxDocChildFrame::SetDocument( doc ) wxDocument* doc void wxDocChildFrame::SetView( view ) wxView* view bool wxDocChildFrame::Destroy() ## Some event stuff missing here Wx-0.9923/ext/docview/XS/DocManager.xs000664000000000000 2151412306612244 15652 0ustar00Mark000000000000############################################################################# ## Name: ext/docview/XS/DocManager.xs ## Purpose: XS for wxDocument ( Document / View Framework ) ## Author: Simon Flack ## Modified by: ## Created: 11/09/2002 ## RCS-ID: $Id: DocManager.xs 2453 2008-08-31 11:09:40Z mbarbon $ ## Copyright: (c) 2002-2008 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 PACKAGE=Wx::DocManager wxDocManager* wxDocManager::new( flags = wxDEFAULT_DOCMAN_FLAGS, initialize = true ) long flags bool initialize CODE: RETVAL=new wxPliDocManager(CLASS, flags, initialize); OUTPUT: RETVAL bool wxDocManager::Clear( force ) bool force bool wxDocManager::Initialize() wxFileHistory* wxDocManager::OnCreateFileHistory() wxFileHistory* wxDocManager::GetFileHistory() void wxDocManager::SetMaxDocsOpen(n) int n int wxDocManager::GetMaxDocsOpen() SV* wxDocManager::GetDocuments() CODE: AV* arrDocs = wxPli_objlist_2_av( aTHX_ THIS->GetDocuments() ); RETVAL = newRV_noinc( (SV*)arrDocs ); OUTPUT: RETVAL SV* wxDocManager::GetTemplates() CODE: AV* arrDocs = wxPli_objlist_2_av( aTHX_ THIS->GetTemplates() ); RETVAL = newRV_noinc( (SV*)arrDocs ); OUTPUT: RETVAL wxString wxDocManager::GetLastDirectory() void wxDocManager::SetLastDirectory( dir ) wxString dir void wxDocManager::OnFileClose( event ) wxCommandEvent* event CODE: THIS->OnFileClose( *event ); void wxDocManager::OnFileCloseAll( event ) wxCommandEvent* event CODE: THIS->OnFileCloseAll( *event ); void wxDocManager::OnFileNew( event ) wxCommandEvent* event CODE: THIS->OnFileNew( *event ); void wxDocManager::OnFileOpen( event ) wxCommandEvent* event CODE: THIS->OnFileOpen( *event ); void wxDocManager::OnFileRevert( event ) wxCommandEvent* event CODE: THIS->OnFileRevert( *event ); void wxDocManager::OnFileSave( event ) wxCommandEvent* event CODE: THIS->OnFileSave( *event ); void wxDocManager::OnFileSaveAs( event ) wxCommandEvent* event CODE: THIS->OnFileSaveAs( *event ); void wxDocManager::OnPrint( event ) wxCommandEvent* event CODE: THIS->OnPrint( *event ); #if WXPERL_W_VERSION_LE( 2, 5, 2 ) void wxDocManager::OnPrintSetup( event ) wxCommandEvent* event CODE: THIS->OnPrintSetup( *event ); #endif void wxDocManager::OnPreview( event ) wxCommandEvent* event CODE: THIS->OnPreview( *event ); void wxDocManager::OnUndo( event ) wxCommandEvent* event CODE: THIS->OnUndo( *event ); void wxDocManager::OnRedo( event ) wxCommandEvent* event CODE: THIS->OnRedo( *event ); void wxDocManager::OnUpdateFileOpen( event ) wxUpdateUIEvent* event CODE: THIS->OnUpdateFileOpen( *event ); #if WXPERL_W_VERSION_LT( 2, 9, 0 ) void wxDocManager::OnUpdateFileClose( event ) wxUpdateUIEvent* event CODE: THIS->OnUpdateFileClose( *event ); void wxDocManager::OnUpdateFileRevert( event ) wxUpdateUIEvent* event CODE: THIS->OnUpdateFileRevert( *event ); #endif void wxDocManager::OnUpdateFileNew( event ) wxUpdateUIEvent* event CODE: THIS->OnUpdateFileNew( *event ); void wxDocManager::OnUpdateFileSave( event ) wxUpdateUIEvent* event CODE: THIS->OnUpdateFileSave( *event ); #if WXPERL_W_VERSION_LT( 2, 9, 0 ) void wxDocManager::OnUpdateFileSaveAs( event ) wxUpdateUIEvent* event CODE: THIS->OnUpdateFileSaveAs( *event ); #endif void wxDocManager::OnUpdateUndo( event ) wxUpdateUIEvent* event CODE: THIS->OnUpdateUndo( *event ); void wxDocManager::OnUpdateRedo( event ) wxUpdateUIEvent* event CODE: THIS->OnUpdateRedo( *event ); #if WXPERL_W_VERSION_LT( 2, 9, 0 ) void wxDocManager::OnUpdatePrint( event ) wxUpdateUIEvent* event CODE: THIS->OnUpdatePrint( *event ); #endif #if WXPERL_W_VERSION_LE( 2, 5, 2 ) void wxDocManager::OnUpdatePrintSetup( event ) wxUpdateUIEvent* event CODE: THIS->OnUpdatePrintSetup( *event ); #endif #if WXPERL_W_VERSION_LT( 2, 9, 0 ) void wxDocManager::OnUpdatePreview( event ) wxUpdateUIEvent* event CODE: THIS->OnUpdatePreview( *event ); #endif wxView * wxDocManager::GetCurrentView() wxDocument * wxDocManager::CreateDocument( path, flags = 0 ) wxString path long flags wxView * wxDocManager::CreateView( doc, flags = 0 ) wxDocument* doc long flags void wxDocManager::DeleteTemplate( temp, flags = 0 ) wxDocTemplate* temp long flags bool wxDocManager::FlushDoc( doc ) wxDocument* doc wxDocument * wxDocManager::GetCurrentDocument() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxString wxDocManager::MakeNewDocumentName() #else bool wxDocManager::MakeDefaultName( name ) wxString name #endif wxString wxDocManager::MakeFrameTitle( doc ) wxDocument* doc wxDocTemplate * wxDocManager::MatchTemplate( path ) wxString path void wxDocManager::AddFileToHistory( file ) wxString file void wxDocManager::RemoveFileFromHistory( i ) int i wxString wxDocManager::GetHistoryFile( i ) int i void wxDocManager::FileHistoryUseMenu( menu ) wxMenu* menu void wxDocManager::FileHistoryRemoveMenu( menu ) wxMenu* menu #if wxUSE_CONFIG ## Need wxConfigBase& in typemap void wxDocManager::FileHistoryLoad( config ) wxConfigBase* config C_ARGS: *config void wxDocManager::FileHistorySave( config ) wxConfigBase* config C_ARGS: *config #endif void wxDocManager::FileHistoryAddFilesToMenu( ... ) CASE: items == 1 CODE: THIS->FileHistoryAddFilesToMenu(); CASE: items == 2 INPUT: wxMenu* menu = NO_INIT CODE: THIS->FileHistoryAddFilesToMenu( menu ); CASE: CODE: croak( "Usage: Wx::FileHistory::AddfilesToMenu(THIS [, menu ] )" ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) size_t wxDocManager::GetHistoryFilesCount() #else int wxDocManager::GetNoHistoryFiles() #endif wxDocTemplate * wxDocManager::FindTemplateForPath( path ) wxString path wxDocTemplate * wxDocManager::SelectDocumentPath( templates, noTemplates, path, flags, save = false) AV* templates int noTemplates wxString path long flags bool save PREINIT: int tmpl_n; int i; wxDocTemplate **pltemplates; wxDocTemplate *thistemplate; CODE: tmpl_n = av_len(templates) + 1; pltemplates = new wxDocTemplate *[ tmpl_n ]; for(i = 0; i < tmpl_n; i++) { SV** pltemplate = av_fetch( (AV*) templates, i, 0 ); wxDocTemplate* thistemplate = (wxDocTemplate *) wxPli_sv_2_object( aTHX_ *pltemplate, "Wx::DocTemplate" ); pltemplates[i] = thistemplate; } RETVAL = THIS->SelectDocumentPath(pltemplates, noTemplates, path, flags, save); delete[] pltemplates; OUTPUT: RETVAL wxDocTemplate * wxDocManager::SelectDocumentType( templates, noTemplates, sort = false) AV* templates int noTemplates bool sort PREINIT: int tmpl_n; int i; wxDocTemplate **pltemplates; wxDocTemplate *thistemplate; CODE: tmpl_n = av_len(templates) + 1; pltemplates = new wxDocTemplate *[ tmpl_n ]; for(i = 0; i < tmpl_n; i++) { SV** pltemplate = av_fetch( (AV*) templates, i, 0 ); wxDocTemplate* thistemplate = (wxDocTemplate *) wxPli_sv_2_object( aTHX_ *pltemplate, "Wx::DocTemplate" ); pltemplates[i] = thistemplate; } RETVAL = THIS->SelectDocumentType(pltemplates, noTemplates, sort); delete[] pltemplates; OUTPUT: RETVAL wxDocTemplate * wxDocManager::SelectViewType( templates, noTemplates, sort = false) AV* templates int noTemplates bool sort PREINIT: int tmpl_n; int i; wxDocTemplate **pltemplates; wxDocTemplate *thistemplate; CODE: tmpl_n = av_len(templates) + 1; pltemplates = new wxDocTemplate *[ tmpl_n ]; for(i = 0; i < tmpl_n; i++) { SV** pltemplate = av_fetch( (AV*) templates, i, 0 ); wxDocTemplate* thistemplate = (wxDocTemplate *) wxPli_sv_2_object( aTHX_ *pltemplate, "Wx::DocTemplate" ); pltemplates[i] = thistemplate; } RETVAL = THIS->SelectViewType(pltemplates, noTemplates, sort); delete[] pltemplates; OUTPUT: RETVAL void wxDocManager::AssociateTemplate( temp ) wxDocTemplate* temp void wxDocManager::DisassociateTemplate( temp ) wxDocTemplate* temp void wxDocManager::AddDocument( doc ) wxDocument* doc void wxDocManager::RemoveDocument( doc ) wxDocument* doc bool wxDocManager::CloseDocuments( force = true ) bool force #if WXPERL_W_VERSION_GE( 2, 5, 1 ) void wxDocManager::ActivateView( view, activate = true ) wxView* view bool activate #else void wxDocManager::ActivateView( view, activate = true, deleting = false ) wxView* view bool activate bool deleting #endifWx-0.9923/ext/docview/XS/DocMDIChildFrame.xs000664000000000000 257112306612244 16612 0ustar00Mark000000000000############################################################################# ## Name: ext/docview/XS/DocMDIChildFrame.xs ## Purpose: XS for wxDocMDIChildFrame (Document/View framework) ## Author: Simon Flack ## Modified by: ## Created: 11/09/2002 ## RCS-ID: $Id: DocMDIChildFrame.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001, 2004 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 PACKAGE=Wx::DocMDIChildFrame wxDocMDIChildFrame * wxDocMDIChildFrame::new(doc, view, frame, id, title, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wxFrameNameStr) wxDocument* doc wxView* view wxMDIParentFrame* frame wxWindowID id wxString title wxPoint pos wxSize size long style wxString name CODE: RETVAL=new wxPliDocMDIChildFrame(CLASS, doc, view, frame, id, title, pos, size, style, name); OUTPUT: RETVAL wxDocument * wxDocMDIChildFrame::GetDocument() wxView * wxDocMDIChildFrame::GetView() void wxDocMDIChildFrame::SetDocument( doc ) wxDocument* doc void wxDocMDIChildFrame::SetView( view ) wxView* view bool wxDocMDIChildFrame::Destroy() ## Some event stuff missing here Wx-0.9923/ext/docview/XS/DocMDIParentFrame.xs000664000000000000 221612306612244 17014 0ustar00Mark000000000000############################################################################# ## Name: ext/docview/XS/DocMDIParentFrame.xs ## Purpose: XS for wxDocMDIParentFrame (Document/View Framework) ## Author: Simon Flack ## Modified by: ## Created: 11/09/2002 ## RCS-ID: $Id: DocMDIParentFrame.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001, 2004, 2006 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 PACKAGE=Wx::DocMDIParentFrame wxDocMDIParentFrame * wxDocMDIParentFrame::new( manager, frame, id, title, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wxFrameNameStr) wxDocManager* manager wxFrame* frame wxWindowID id wxString title wxPoint pos wxSize size long style wxString name CODE: RETVAL=new wxPliDocMDIParentFrame(CLASS, manager, frame, id, title, pos, size, style, name); OUTPUT: RETVAL wxDocManager* wxDocMDIParentFrame::GetDocumentManager() Wx-0.9923/ext/docview/XS/DocParentFrame.xs000664000000000000 222212306612244 16457 0ustar00Mark000000000000############################################################################# ## Name: ext/docview/XS/DocParentFrame.xs ## Purpose: XS for wxDocParentFrame (Document/View Framework) ## Author: Simon Flack ## Modified by: ## Created: 11/09/2002 ## RCS-ID: $Id: DocParentFrame.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001, 2004 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 PACKAGE=Wx::DocParentFrame wxDocParentFrame * wxDocParentFrame::new( manager, frame, id, title, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wxFrameNameStr) wxDocManager* manager wxFrame* frame wxWindowID id wxString title wxPoint pos wxSize size long style wxString name CODE: RETVAL=new wxPliDocParentFrame(CLASS, manager, frame, id, title, pos, size, style, name); OUTPUT: RETVAL ## Some event stuff missing here wxDocManager* wxDocParentFrame::GetDocumentManager() Wx-0.9923/ext/docview/XS/DocTemplate.xs000664000000000000 620012306612244 16026 0ustar00Mark000000000000############################################################################# ## Name: ext/docview/XS/DocTemplate.xs ## Purpose: XS for wxDocTemplate (Document/View Framework) ## Author: Simon Flack ## Modified by: ## Created: 11/09/2002 ## RCS-ID: $Id: DocTemplate.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001, 2004 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 PACKAGE=Wx::DocTemplate wxDocTemplate * wxDocTemplate::new(manager, descr, filter, dir, ext, docTypeName, viewTypeName, docClassInfo = NULL, viewClassInfo = NULL, flags = wxDEFAULT_TEMPLATE_FLAGS) wxDocManager* manager wxString descr wxString filter wxString dir wxString ext wxString docTypeName wxString viewTypeName SV* docClassInfo SV* viewClassInfo long flags PREINIT: wxClassInfo *docCInfo = 0, *viewCInfo = 0; wxString docClassName, viewClassName; bool hasDocInfo, hasViewInfo; CODE: if( docClassInfo ) { hasDocInfo = SvROK( docClassInfo ); if( hasDocInfo ) { docCInfo = (wxClassInfo*)wxPli_sv_2_object( aTHX_ docClassInfo, "Wx::ClassInfo" ); } else { WXSTRING_INPUT( docClassName, wxString, docClassInfo ); } } if( viewClassInfo ) { hasViewInfo = SvROK( viewClassInfo ); if( hasViewInfo ) { viewCInfo = (wxClassInfo*)wxPli_sv_2_object( aTHX_ viewClassInfo, "Wx::ClassInfo" ); } else { WXSTRING_INPUT( viewClassName, wxString, viewClassInfo ); } } RETVAL = new wxPliDocTemplate( CLASS, manager, descr, filter, dir, ext, docTypeName, viewTypeName, docCInfo, viewCInfo, flags, docClassName, viewClassName ); OUTPUT: RETVAL wxDocument * wxDocTemplate::CreateDocument( path, flags ) wxString path long flags wxView * wxDocTemplate::CreateView( doc, flags ) wxDocument* doc long flags wxString wxDocTemplate::GetDefaultExtension() wxString wxDocTemplate::GetDescription() wxString wxDocTemplate::GetDirectory() wxDocManager * wxDocTemplate::GetDocumentManager() void wxDocTemplate::SetDocumentManager( manager ) wxDocManager* manager wxString wxDocTemplate::GetFileFilter() long wxDocTemplate::GetFlags() wxString wxDocTemplate::GetViewName() wxString wxDocTemplate::GetDocumentName() void wxDocTemplate::SetFileFilter( filter ) wxString filter void wxDocTemplate::SetDirectory( dir ) wxString dir void wxDocTemplate::SetDescription( descr ) wxString descr void wxDocTemplate::SetDefaultExtension( ext ) wxString ext void wxDocTemplate::SetFlags( flags ) long flags bool wxDocTemplate::IsVisible() bool wxDocTemplate::FileMatchesTemplate( path ) wxString path Wx-0.9923/ext/docview/XS/Document.xs000664000000000000 533712306612244 15415 0ustar00Mark000000000000############################################################################# ## Name: ext/docview/XS/Document.xs ## Purpose: XS for wxDocument (Document/View Framework) ## Author: Simon Flack ## Modified by: ## Created: 11/09/2002 ## RCS-ID: $Id: Document.xs 2188 2007-08-20 19:21:29Z mbarbon $ ## Copyright: (c) 2001, 2004, 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::Document wxDocument* wxDocument::new() CODE: RETVAL=new wxPliDocument( CLASS ); OUTPUT: RETVAL bool wxDocument::DeleteContents() bool wxDocument::Close() bool wxDocument::OnCloseDocument() void wxDocument::NotifyClosing() SV* wxDocument::GetViews() CODE: AV* arrViews = wxPli_objlist_2_av( aTHX_ THIS->GetViews() ); RETVAL = newRV_noinc( (SV*)arrViews ); OUTPUT: RETVAL bool wxDocument::DeleteAllViews() wxView* wxDocument::GetFirstView() wxDocManager* wxDocument::GetDocumentManager() wxDocTemplate* wxDocument::GetDocumentTemplate() wxString wxDocument::GetDocumentName() bool wxDocument::OnNewDocument() bool wxDocument::Save() bool wxDocument::SaveAs() bool wxDocument::OnSaveDocument( file ) wxString file bool wxDocument::OnOpenDocument( file ) wxString file bool wxDocument::GetDocumentSaved() void wxDocument::SetDocumentSaved( saved ) bool saved bool wxDocument::Revert() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxString wxDocument::GetUserReadableName() #else bool wxDocument::GetPrintableName( buf ) wxString buf #endif wxWindow* wxDocument::GetDocumentWindow() wxCommandProcessor* wxDocument::OnCreateCommandProcessor() void wxDocument::SetCommandProcessor( processor ) wxCommandProcessor* processor CODE: wxPli_object_set_deleteable( aTHX_ ST(1), false ); THIS->SetCommandProcessor( processor ); bool wxDocument::OnSaveModified() bool wxDocument::IsModified( ) void wxDocument::Modify( modify ) bool modify bool wxDocument::AddView( view ) wxView* view bool wxDocument::RemoveView( view ) wxView* view bool wxDocument::OnCreate( path, flags ) wxString path long flags void wxDocument::OnChangedViewList() void wxDocument::UpdateAllViews(sender = NULL, hint = NULL) wxView* sender wxObject* hint void wxDocument::SetFilename(filename, notifyViews = false) wxString filename bool notifyViews wxString wxDocument::GetFilename() void wxDocument::SetTitle( title ) wxString title wxString wxDocument::GetTitle() void wxDocument::SetDocumentName( name ) wxString name void wxDocument::SetDocumentTemplate( templ ) wxDocTemplate* templ Wx-0.9923/ext/docview/XS/FileHistory.xs000664000000000000 374412306612244 16100 0ustar00Mark000000000000############################################################################# ## Name: ext/docview/XS/FileHistory.xs ## Purpose: XS for wxFileHistory (Document/View Framework) ## Author: Simon Flack ## Modified by: ## Created: 11/09/2002 ## RCS-ID: $Id: FileHistory.xs 2285 2007-11-11 21:31:54Z mbarbon $ ## Copyright: (c) 2002, 2004, 2006-2007 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 PACKAGE=Wx::FileHistory wxFileHistory * wxFileHistory::new( maxFiles = 9 ) int maxFiles CODE: RETVAL=new wxPliFileHistory(CLASS, maxFiles ); OUTPUT: RETVAL void wxFileHistory::AddFileToHistory( file ) wxString file void wxFileHistory::RemoveFileFromHistory( i ) int i int wxFileHistory::GetMaxFiles() void wxFileHistory::UseMenu( menu ) wxMenu* menu void wxFileHistory::RemoveMenu( menu ) wxMenu* menu ## Work out the config stuff void wxFileHistory::Load( config ) wxConfigBase* config C_ARGS: *config void wxFileHistory::Save( config ) wxConfigBase* config C_ARGS: *config void wxFileHistory::AddFilesToMenu( ... ) CASE: items == 1 CODE: THIS->AddFilesToMenu(); CASE: items == 2 INPUT: wxMenu* menu = NO_INIT CODE: THIS->AddFilesToMenu( menu ); CASE: CODE: croak( "Usage: Wx::FileHistory::AddfilesToMenu(THIS [, menu ] )" ); wxString wxFileHistory::GetHistoryFile( i ) int i int wxFileHistory::GetCount() #if WXPERL_W_VERSION_LT( 2, 5, 1 ) int wxFileHistory::GetNoHistoryFiles() #endif SV* wxFileHistory::GetMenus() CODE: AV* aMenus = wxPli_objlist_2_av( aTHX_ THIS->GetMenus() ); RETVAL = newRV_noinc( (SV*)aMenus ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 8, 3 ) void wxFileHistory::SetBaseId( baseId ) wxWindowID baseId wxWindowID wxFileHistory::GetBaseId() #endif Wx-0.9923/ext/docview/XS/View.xs000664000000000000 313312306612244 14541 0ustar00Mark000000000000############################################################################# ## Name: ext/docview/XS/View.xs ## Purpose: XS for wxView (Document/View Framework) ## Author: Simon Flack ## Modified by: ## Created: 11/09/2002 ## RCS-ID: $Id: View.xs 2285 2007-11-11 21:31:54Z mbarbon $ ## Copyright: (c) 2002-2004, 2007 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 PACKAGE=Wx::View wxView* wxView::new() CODE: RETVAL=new wxPliView( CLASS ); OUTPUT: RETVAL void wxView::Activate( activate ) bool activate bool wxView::Close( deleteWindow = 1 ) bool deleteWindow wxDocument * wxView::GetDocument() wxDocManager * wxView::GetDocumentManager() wxWindow * wxView::GetFrame() void wxView::SetFrame( frame ) wxWindow* frame wxString wxView::GetViewName() void wxView::OnActivateView( activate = 0, activeView, deactiveView ) bool activate wxView* activeView wxView* deactiveView void wxView::OnChangeFilename() bool wxView::OnClose( deleteWindow = 0 ) bool deleteWindow bool wxView::OnCreate( doc, flags = 0 ) wxDocument* doc long flags #if wxPERL_USE_PRINTING_ARCHITECTURE wxPrintout* wxView::OnCreatePrintout() #endif void wxView::OnUpdate( sender, hint = NULL ) wxView* sender wxObject* hint void wxView::SetDocument( doc ) wxDocument* doc void wxView::SetViewName( name ) wxString name #!sub OnDraw #!sub OnClosingDocument Wx-0.9923/ext/filesys/000775000000000000 012316265011 12654 5ustar00Mark000000000000Wx-0.9923/ext/filesys/cpp/000775000000000000 012316265011 13436 5ustar00Mark000000000000Wx-0.9923/ext/filesys/cpp/fshandler.h000664000000000000 634312306612264 15650 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/filesys/cpp/fshandler.h // Purpose: C++ classes for Wx::PlFSFile and Wx::PlFileSystemHandler // Author: Mattia Barbon // Modified by: // Created: 17/04/2002 // RCS-ID: $Id: fshandler.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2002, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #ifndef _WXPERL_FS_FSHANDLER_H #define _WXPERL_FS_FSHANDLER_H #include #include "cpp/streams.h" #include "cpp/v_cback.h" class wxPlFSFile:public wxFSFile { public: wxPlFSFile( SV* fh, const wxString& loc, const wxString& mimetype, const wxString& anchor ) : wxFSFile( wxPliInputStream_ctor( fh ), loc, mimetype, anchor, wxDateTime() ) { } }; class wxPlFileSystemHandler:public wxFileSystemHandler { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlFileSystemHandler ); WXPLI_DECLARE_V_CBACK(); public: wxPlFileSystemHandler( const char* package ) : m_callback( "Wx::PlFileSystemHandler" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } DEC_V_CBACK_BOOL__WXSTRING( CanOpen ); DEC_V_CBACK_WXSTRING__WXSTRING_INT( FindFirst ); DEC_V_CBACK_WXSTRING__VOID( FindNext ); DEC_V_CBACK_WXFSFILEP__WXFILESYSTEM_WXSTRING( OpenFile ); }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlFileSystemHandler, wxFileSystemHandler ); DEF_V_CBACK_WXSTRING__VOID_pure( wxPlFileSystemHandler, wxFileSystemHandler, FindNext ); DEF_V_CBACK_BOOL__WXSTRING_pure( wxPlFileSystemHandler, wxFileSystemHandler, CanOpen ); wxString wxPlFileSystemHandler::FindFirst( const wxString& file, int flags ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "FindFirst" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "Pi", &file, flags ); wxString val; WXSTRING_INPUT( val, wxString, ret ); SvREFCNT_dec( ret ); return val; } return wxEmptyString; } #include wxFSFile* wxPlFileSystemHandler::OpenFile( wxFileSystem& parent, const wxString& name ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OpenFile" ) ) { SV* fs = wxPli_object_2_sv( aTHX_ sv_newmortal(), &parent ); SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR, "sP", fs, &name ); wxFSFile* val = (wxFSFile*)wxPli_sv_2_object( aTHX_ ret, "Wx::FSFile" ); sv_setiv( SvRV( fs ), 0 ); if( SvROK( ret ) ) sv_setiv( SvRV( ret ), 0 ); SvREFCNT_dec( ret ); return val; } return 0; } #endif // local variables: // mode: c++ // end: Wx-0.9923/ext/filesys/FS.xs000664000000000000 265012306612264 13630 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/filesys/FS.xs // Purpose: XS for Wx::FileSystem and related classes // Author: Mattia Barbon // Modified by: // Created: 28/04/2001 // RCS-ID: $Id: FS.xs 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2001-2002, 2004, 2006 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/constants.h" #undef THIS #if WXPERL_W_VERSION_GE( 2, 7, 2 ) #include double fs_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: filesystem #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'F': r( wxFS_READ ); r( wxFS_SEEKABLE ); break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants fs_module( &fs_constant ); #endif MODULE=Wx__FS BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE: XS/FileSystem.xs INCLUDE: XS/FileSystemHandler.xs INCLUDE: XS/FSFile.xs # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__FS Wx-0.9923/ext/filesys/lib/000775000000000000 012316265010 13421 5ustar00Mark000000000000Wx-0.9923/ext/filesys/lib/Wx/000775000000000000 012316265010 14017 5ustar00Mark000000000000Wx-0.9923/ext/filesys/lib/Wx/FS.pm000664000000000000 240612306612264 14755 0ustar00Mark000000000000############################################################################# ## Name: ext/filesys/lib/Wx/FS.pm ## Purpose: Wx::FS ( pulls in all Wx::FileSystem stuff ) ## Author: Mattia Barbon ## Modified by: ## Created: 28/04/2001 ## RCS-ID: $Id: FS.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2002, 2004, 2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::FS; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::load_dll( 'net' ); Wx::wx_boot( 'Wx::FS', $VERSION ); # # properly setup inheritance tree # no strict; package Wx::FileSystemHandler; package Wx::InternetFSHandler; @ISA = qw(Wx::FileSystemHandler); package Wx::PlFileSystemHandler; @ISA = qw(Wx::FileSystemHandler); package Wx::PlFSFile; @ISA = qw(Wx::FSFile); package Wx::ArchiveFSHandler; @ISA = qw(Wx::FileSystemHandler); package Wx::ZipFSHandler; @ISA = Wx::wxVERSION() < 2.007002 ? qw(Wx::FileSystemHandler) : qw(Wx::ArchiveFSHandler); use strict; 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/filesys/Makefile.PL000664000000000000 152312306612265 14715 0ustar00Mark000000000000############################################################################# ## Name: ext/filesys/Makefile.PL ## Purpose: Makefile.PL for wxFileSystem and related classes ## Author: Mattia Barbon ## Modified by: ## Created: 28/04/2001 ## RCS-ID: $Id: Makefile.PL 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2004 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::FS', VERSION_FROM => 'lib/Wx/FS.pm', WX_CORE_LIB => 'net core base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/filesys/t/000775000000000000 012316265011 13117 5ustar00Mark000000000000Wx-0.9923/ext/filesys/t/01_load.t000775000000000000 21612306612264 14572 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::FS; print "ok\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/filesys/t/02_inheritance.t000775000000000000 35712306612264 16153 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::FS; test_inheritance_end(); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/filesys/t/03_threads.t000775000000000000 132512306612264 15331 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use if Wx::wxMOTIF, 'Test::More' => skip_all => 'Hangs under Motif'; use Test::More tests => 4; use Wx::FS; my $app = Wx::App->new( sub { 1 } ); my $fs = Wx::FileSystem->new; my $fs2 = Wx::FileSystem->new; my $fsfile = $fs->OpenFile( 't/03_threads.t' ); my $fsfile2 = $fs->OpenFile( 't/02_inheritance.t' ); undef $fs2; undef $fsfile2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/filesys/typemap000664000000000000 157712306612264 14355 0ustar00Mark000000000000############################################################################# ## Name: ext/filesys/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 28/04/2001 ## RCS-ID: $Id: typemap 2317 2008-01-18 22:00:14Z mbarbon $ ## Copyright: (c) 2001-2004, 2006, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxFileSystem * O_WXOBJECT_THR wxFileSystemHandler * O_WXOBJECT wxPlFileSystemHandler * O_WXOBJECT wxFSFile * O_NON_WXOBJECT_THR wxPlFSFile * O_NON_WXOBJECT_THR wxInternetFSHandler * O_WXOBJECT wxZipFSHandler * O_WXOBJECT wxMemoryFSHandler * O_WXOBJECT wxArchiveFSHandler * O_WXOBJECT Wx-0.9923/ext/filesys/XS/000775000000000000 012316265010 13205 5ustar00Mark000000000000Wx-0.9923/ext/filesys/XS/FileSystem.xs000664000000000000 375612306612265 15747 0ustar00Mark000000000000############################################################################# ## Name: ext/filesys/XS/FileSystem.xs ## Purpose: XS for Wx::FileSystem ## Author: Mattia Barbon ## Modified by: ## Created: 28/04/2001 ## RCS-ID: $Id: FileSystem.xs 2299 2007-11-25 17:30:04Z mbarbon $ ## Copyright: (c) 2001-2002, 2004, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::FileSystem wxFileSystem* wxFileSystem::new() static void wxFileSystem::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxFileSystem::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::FileSystem", THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; void AddHandler( handler ) wxFileSystemHandler* handler CODE: wxFileSystem::AddHandler( handler ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool HasHandlerForPath( location ) wxString location CODE: RETVAL = wxFileSystem::HasHandlerForPath( location ); OUTPUT: RETVAL #endif void wxFileSystem::ChangePathTo( location, is_dir = false ) wxString location bool is_dir wxString wxFileSystem::GetPath() wxString wxFileSystem::FindFirst( wildcard, flags = 0 ) wxString wildcard int flags wxString wxFileSystem::FindNext() #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxString wxFileSystem::FindFileInPath( path, file ) wxString path wxString file CODE: bool ret = THIS->FindFileInPath( &RETVAL, path, file ); if( !ret ) XSRETURN_UNDEF; OUTPUT: RETVAL #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxFSFile* wxFileSystem::OpenFile( location, flags = wxFS_READ ) wxString location int flags #else wxFSFile* wxFileSystem::OpenFile( location ) wxString location #endif Wx-0.9923/ext/filesys/XS/FileSystemHandler.xs000664000000000000 570612306612265 17242 0ustar00Mark000000000000############################################################################# ## Name: ext/filesys/XS/FileSystemHandler.xs ## Purpose: XS for Wx::FileSystemhandler ## Author: Mattia Barbon ## Modified by: ## Created: 28/04/2001 ## RCS-ID: $Id: FileSystemHandler.xs 2393 2008-05-14 20:54:52Z mbarbon $ ## Copyright: (c) 2001-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include #include #include #undef THIS MODULE=Wx PACKAGE=Wx::FileSystemHandler #if 0 // protected! wxString wxFileSystemHandler::GetAnchor( location ) wxString location wxString wxFileSystemHandler::GetLeftLocation( location ) wxString location wxString wxFileSystemHandler::GetMimeTypeFromExt( location ) wxString location wxString wxFileSystemHandler::GetProtocol( location ) wxString location wxString wxFileSystemHandler::GetRightLocation( location ) wxString location #endif MODULE=Wx PACKAGE=Wx::InternetFSHandler #if wxUSE_FS_INET wxInternetFSHandler* wxInternetFSHandler::new() #endif MODULE=Wx PACKAGE=Wx::ZipFSHandler wxZipFSHandler* wxZipFSHandler::new() MODULE=Wx PACKAGE=Wx::ArchiveFSHandler #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxArchiveFSHandler* wxArchiveFSHandler::new() #endif MODULE=Wx PACKAGE=Wx::MemoryFSHandler wxMemoryFSHandler* wxMemoryFSHandler::new() void AddImageFile( name, image, type ) wxString name wxImage* image wxBitmapType type CODE: wxMemoryFSHandler::AddFile( name, *image, type ); void AddBitmapFile( name, bitmap, type ) wxString name wxBitmap* bitmap wxBitmapType type CODE: wxMemoryFSHandler::AddFile( name, *bitmap, type ); void AddTextFile( name, string ) wxString name wxString string CODE: wxMemoryFSHandler::AddFile( name, string ); void AddBinaryFile( name, scalar ) wxString name SV* scalar PREINIT: STRLEN len; char* data = SvPV( scalar, len ); CODE: wxMemoryFSHandler::AddFile( name, data, len ); #if WXPERL_W_VERSION_GE( 2, 8, 5 ) void AddTextFileWithMimeType( name, string, mimetype ) wxString name wxString string wxString mimetype CODE: wxMemoryFSHandler::AddFileWithMimeType( name, string, mimetype ); void AddBinaryFileWithMimeType( name, scalar, mimetype ) wxString name SV* scalar wxString mimetype PREINIT: STRLEN len; char* data = SvPV( scalar, len ); CODE: wxMemoryFSHandler::AddFileWithMimeType( name, data, len, mimetype ); #endif void RemoveFile( name ) wxString name CODE: wxMemoryFSHandler::RemoveFile( name ); MODULE=Wx PACKAGE=Wx::PlFileSystemHandler #include "cpp/fshandler.h" wxPlFileSystemHandler* wxPlFileSystemhandler::new() CODE: RETVAL = new wxPlFileSystemHandler( CLASS ); OUTPUT: RETVAL Wx-0.9923/ext/filesys/XS/FSFile.xs000664000000000000 251112306612265 14757 0ustar00Mark000000000000############################################################################# ## Name: ext/filesys/XS/FSFile.xs ## Purpose: XS for Wx::FileSystem ## Author: Mattia Barbon ## Modified by: ## Created: 28/04/2001 ## RCS-ID: $Id: FSFile.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2002, 2004, 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 MODULE=Wx PACKAGE=Wx::FSFile static void wxFSFile::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxFSFile::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; wxString wxFSFile::GetAnchor() wxString wxFSFile::GetLocation() wxString wxFSFile::GetMimeType() # wxDateTime # wxFSFile::GetModificationTime() wxInputStream* wxFSFile::GetStream() MODULE=Wx PACKAGE=Wx::FSFile #include "cpp/fshandler.h" wxPlFSFile* wxPlFSFile::new( fh, loc, mimetype, anchor ) SV* fh wxString loc wxString mimetype wxString anchor CODE: RETVAL = new wxPlFSFile( fh, loc, mimetype, anchor ); OUTPUT: RETVAL Wx-0.9923/ext/grid/000775000000000000 012316265011 12123 5ustar00Mark000000000000Wx-0.9923/ext/grid/cpp/000775000000000000 012316265011 12705 5ustar00Mark000000000000Wx-0.9923/ext/grid/cpp/editor.h000664000000000000 3044712313610371 14454 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/grid/cpp/editor.h // Purpose: wxPlGridCellEditor // Author: Mattia Barbon // Modified by: // Created: 28/05/2003 // RCS-ID: $Id: editor.h 2533 2009-03-08 19:03:35Z mbarbon $ // Copyright: (c) 2003-2005, 2009 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/v_cback.h" #if WXPERL_W_VERSION_GE( 2, 9, 5 ) #include #endif #include #include "cpp/helpers.h" #define DEC_V_CBACK_BOOL__INT_INT_cWXGRID_WXSTRING_WXSTRINGp( METHOD ) \ bool METHOD( int, int, const wxGrid*, const wxString&, wxString* ) #define DEF_V_CBACK_BOOL__INT_INT_cWXGRID_WXSTRING_WXSTRINGp_pure( CLASS, BASE, METHOD )\ bool CLASS::METHOD( int p1, int p2, const wxGrid* p3, const wxString& p4, wxString* p5 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, \ "iiOP", p1, p2, p3, &p4 ) ); \ WXSTRING_INPUT( *p5, const char *, ret ); \ return SvOK( ret ); \ } else \ return false; \ } #define DEC_V_CBACK_VOID__INT_INT_WXGRID_pure( METHOD ) \ void METHOD( int, int, wxGrid* ) #define DEF_V_CBACK_VOID__INT_INT_WXGRID_pure( CLASS, BASE, METHOD ) \ void CLASS::METHOD( int param1, int param2, wxGrid* param3 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR|G_DISCARD, \ "iiO", param1, param2, param3 ); \ } \ } #define DEC_V_CBACK_BOOL__INT_INT_WXGRID_pure( METHOD ) \ bool METHOD( int, int, wxGrid* ) #define DEF_V_CBACK_BOOL__INT_INT_WXGRID_pure( CLASS, BASE, METHOD ) \ bool CLASS::METHOD( int param1, int param2, wxGrid* param3 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, \ "iiO", param1, param2, \ param3 ); \ bool bret = SvTRUE( ret ); \ SvREFCNT_dec( ret ); \ return bret; \ } \ return false; \ } #define DEC_V_CBACK_BOOL__WXKEYEVENT( METHOD ) \ bool METHOD( wxKeyEvent& event ) #define DEF_V_CBACK_BOOL__WXKEYEVENT( CLASS, BASE, METHOD ) \ bool CLASS::METHOD( wxKeyEvent& param1 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ SV* evt = wxPli_object_2_sv( aTHX_ newSViv( 0 ), ¶m1 ); \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, \ "S", evt ); \ bool val = SvTRUE( ret ); \ sv_setiv( SvRV( evt ), 0 ); \ SvREFCNT_dec( evt ); \ SvREFCNT_dec( ret ); \ return val; \ } else \ return BASE::METHOD( param1 ); \ } #define DEC_V_CBACK_VOID__WXKEYEVENT( METHOD ) \ void METHOD( wxKeyEvent& event ) #define DEF_V_CBACK_VOID__WXKEYEVENT( CLASS, BASE, METHOD ) \ void CLASS::METHOD( wxKeyEvent& param1 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ SV* evt = wxPli_object_2_sv( aTHX_ newSViv( 0 ), ¶m1 ); \ wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR|G_DISCARD, \ "S", evt ); \ sv_setiv( SvRV( evt ), 0 ); \ SvREFCNT_dec( evt ); \ } else \ BASE::METHOD( param1 ); \ } class wxPlGridCellEditor : public wxGridCellEditor { public: wxPliVirtualCallback m_callback; public: wxPlGridCellEditor( const char* package ) : m_callback( "Wx::PlGridCellEditor" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } void Create( wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "Create" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "OiO", parent, id, evtHandler ); } } void SetSize( const wxRect& rect ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "SetSize" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "o", new wxRect( rect ), "Wx::Rect" ); } else wxGridCellEditor::SetSize( rect ); } void Show( bool show, wxGridCellAttr* attr ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "Show" ) ) { ENTER; SAVETMPS; SV* attr_sv = wxPli_non_object_2_sv( aTHX_ sv_newmortal(), &attr, "Wx::GridCellAttr" ); wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "bs", show, attr_sv ); wxPli_detach_object( aTHX_ attr_sv ); FREETMPS; LEAVE; } else wxGridCellEditor::Show( show, attr ); } #if WXPERL_W_VERSION_LT( 2, 9, 5 ) void PaintBackground( const wxRect& rect, wxGridCellAttr* attr ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "PaintBackground" ) ) { ENTER; SAVETMPS; SV* attr_sv = wxPli_non_object_2_sv( aTHX_ sv_newmortal(), &attr, "Wx::GridCellAttr" ); wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "os", new wxRect( rect ), attr_sv ); wxPli_detach_object( aTHX_ attr_sv ); FREETMPS; LEAVE; } else wxGridCellEditor::PaintBackground( rect, attr ); } #else virtual void PaintBackground( wxDC& dc, const wxRect& rect, const wxGridCellAttr& attr ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "PaintBackground" ) ) { ENTER; SAVETMPS; SV* attr_sv = wxPli_non_object_2_sv( aTHX_ sv_newmortal(), &attr, "Wx::GridCellAttr" ); SV* dc_sv = wxPli_object_2_sv( aTHX_ sv_newmortal(), &dc ); SV* rect_sv = wxPli_non_object_2_sv( aTHX_ sv_newmortal(), (void*)&rect, "Wx::Rect" ); wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "sss", dc_sv, rect_sv, attr_sv ); wxPli_detach_object( aTHX_ attr_sv ); wxPli_detach_object( aTHX_ dc_sv ); wxPli_detach_object( aTHX_ rect_sv ); FREETMPS; LEAVE; } else wxGridCellEditor::PaintBackground( dc, rect, attr ); } #endif virtual wxGridCellEditor* Clone() const { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "Clone" ) ) { SV* ret = wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_SCALAR, NULL ); wxGridCellEditor* clone = (wxGridCellEditor*)wxPli_sv_2_object( aTHX_ ret, "Wx::GridCellEditor" ); SvREFCNT_dec( ret ); return clone; } return 0; } virtual wxString GetValue() const { return wxEmptyString; } DEC_V_CBACK_VOID__INT_INT_WXGRID_pure( BeginEdit ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEC_V_CBACK_VOID__INT_INT_WXGRID_pure( ApplyEdit ); DEC_V_CBACK_BOOL__INT_INT_cWXGRID_WXSTRING_WXSTRINGp( EndEdit ); #else DEC_V_CBACK_BOOL__INT_INT_WXGRID_pure( EndEdit ); #endif DEC_V_CBACK_VOID__VOID( Reset ); DEC_V_CBACK_VOID__VOID( Destroy ); DEC_V_CBACK_VOID__VOID( StartingClick ); DEC_V_CBACK_BOOL__WXKEYEVENT( IsAcceptedKey ); DEC_V_CBACK_VOID__WXKEYEVENT( StartingKey ); DEC_V_CBACK_VOID__WXKEYEVENT( HandleReturn ); }; DEF_V_CBACK_VOID__INT_INT_WXGRID_pure( wxPlGridCellEditor, wxGridCellEditor, BeginEdit ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEF_V_CBACK_VOID__INT_INT_WXGRID_pure( wxPlGridCellEditor, wxGridCellEditor, ApplyEdit ); DEF_V_CBACK_BOOL__INT_INT_cWXGRID_WXSTRING_WXSTRINGp_pure( wxPlGridCellEditor, wxGridCellEditor, EndEdit ); #else DEF_V_CBACK_BOOL__INT_INT_WXGRID_pure( wxPlGridCellEditor, wxGridCellEditor, EndEdit ); #endif DEF_V_CBACK_VOID__VOID_pure( wxPlGridCellEditor, wxGridCellEditor, Reset ); DEF_V_CBACK_VOID__VOID( wxPlGridCellEditor, wxGridCellEditor, Destroy ); DEF_V_CBACK_VOID__VOID( wxPlGridCellEditor, wxGridCellEditor, StartingClick ); DEF_V_CBACK_BOOL__WXKEYEVENT( wxPlGridCellEditor, wxGridCellEditor, IsAcceptedKey ); DEF_V_CBACK_VOID__WXKEYEVENT( wxPlGridCellEditor, wxGridCellEditor, StartingKey ); DEF_V_CBACK_VOID__WXKEYEVENT( wxPlGridCellEditor, wxGridCellEditor, HandleReturn ); Wx-0.9923/ext/grid/cpp/gr_constants.cpp000664000000000000 333312306612237 16204 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/grid/cpp/gr_constants.cpp // Purpose: constants for Wx::Grid // Author: Mattia Barbon // Modified by: // Created: 04/12/2001 // RCS-ID: $Id: gr_constants.cpp 2170 2007-08-17 22:53:11Z mbarbon $ // Copyright: (c) 2001-2004, 2007 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/constants.h" double grid_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: grid #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'G': r( wxGRIDTABLE_REQUEST_VIEW_GET_VALUES ); r( wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES ); r( wxGRIDTABLE_NOTIFY_ROWS_INSERTED ); r( wxGRIDTABLE_NOTIFY_ROWS_APPENDED ); r( wxGRIDTABLE_NOTIFY_ROWS_DELETED ); r( wxGRIDTABLE_NOTIFY_COLS_INSERTED ); r( wxGRIDTABLE_NOTIFY_COLS_APPENDED ); r( wxGRIDTABLE_NOTIFY_COLS_DELETED ); // !export: wxGridSelectCells wxGridSelectRows wxGridSelectColumns if( strEQ( name, "wxGridSelectCells" ) ) return wxGrid::wxGridSelectCells; if( strEQ( name, "wxGridSelectRows" ) ) return wxGrid::wxGridSelectRows; if( strEQ( name, "wxGridSelectColumns" ) ) return wxGrid::wxGridSelectColumns; break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants grid_module( &grid_constant ); Wx-0.9923/ext/grid/cpp/renderer.h000664000000000000 720212306612237 14752 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/grid/cpp/renderer.h // Purpose: wxPlGridCellRenderer // Author: Mattia Barbon // Modified by: // Created: 28/05/2003 // RCS-ID: $Id: renderer.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2003-2005 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/v_cback.h" #include #include #include "cpp/helpers.h" class wxPlGridCellRenderer : public wxGridCellRenderer { public: wxPliVirtualCallback m_callback; public: wxPlGridCellRenderer( const char* package ) : m_callback( "Wx::PlGridCellRenderer" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } virtual void Draw( wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, const wxRect& rect, int row, int col, bool isSelected ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "Draw" ) ) { ENTER; SAVETMPS; SV* attr_sv = wxPli_non_object_2_sv( aTHX_ sv_newmortal(), &attr, "Wx::GridCellAttr" ); SV* dc_sv = wxPli_object_2_sv( aTHX_ sv_newmortal(), &dc ); SV* rect_sv = wxPli_non_object_2_sv( aTHX_ sv_newmortal(), (void*)&rect, "Wx::Rect" ); wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_DISCARD|G_SCALAR, "Osssiib", &grid, attr_sv, dc_sv, rect_sv, row, col, isSelected ); wxPli_detach_object( aTHX_ attr_sv ); wxPli_detach_object( aTHX_ dc_sv ); wxPli_detach_object( aTHX_ rect_sv ); FREETMPS; LEAVE; } } virtual wxSize GetBestSize( wxGrid& grid, wxGridCellAttr& attr, wxDC& dc, int row, int col ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "GetBestSize" ) ) { ENTER; SAVETMPS; SV* attr_sv = wxPli_non_object_2_sv( aTHX_ sv_newmortal(), &attr, "Wx::GridCellAttr" ); SV* dc_sv = wxPli_object_2_sv( aTHX_ sv_newmortal(), &dc ); SV* ret = wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_SCALAR, "Ossii", &grid, attr_sv, dc_sv, row, col ); wxSize size = *(wxSize*)wxPli_sv_2_object( aTHX_ ret, "Wx::Size" ); SvREFCNT_dec( ret ); wxPli_detach_object( aTHX_ attr_sv ); wxPli_detach_object( aTHX_ dc_sv ); FREETMPS; LEAVE; return size; } return wxDefaultSize; } virtual wxGridCellRenderer *Clone() const { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "Clone" ) ) { SV* ret = wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_SCALAR, NULL ); wxGridCellRenderer* clone = (wxGridCellRenderer*)wxPli_sv_2_object( aTHX_ ret, "Wx::GridCellRenderer" ); SvREFCNT_dec( ret ); return clone; } return 0; } }; // local variables: // mode: c++ // end: Wx-0.9923/ext/grid/Grid.xs000664000000000000 1007012306612237 13467 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/grid/Grid.xs // Purpose: XS for Wx::Grid // Author: Mattia Barbon // Modified by: // Created: 04/12/2001 // RCS-ID: $Id: Grid.xs 3316 2012-07-14 02:05:19Z mdootson $ // Copyright: (c) 2001-2004, 2006-2011 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #undef THIS #include #include #include #define wxGridCellAttr__wxAttrKind wxGridCellAttr::wxAttrKind inline wxGridCellAttr* convert_GridCellAttrOut(pTHX_ SV* value) { wxGridCellAttr* attr = (wxGridCellAttr*)wxPli_sv_2_object( aTHX_ value, "Wx::GridCellAttr" ); attr->IncRef(); return attr; } typedef wxGrid::wxGridSelectionModes wxGridSelectionModes; typedef wxGridCellAttr::wxAttrKind wxAttrKind; // event macros #define SEVT( NAME, ARGS ) wxPli_StdEvent( NAME, ARGS ) #define EVT( NAME, ARGS, ID ) wxPli_Event( NAME, ARGS, ID ) // !package: Wx::Event // !tag: // !parser: sub { $_[0] =~ m<^\s*S?EVT\(\s*(\w+)\s*\,> } static wxPliEventDescription evts[] = { EVT( EVT_GRID_CMD_CELL_LEFT_CLICK, 3, wxEVT_GRID_CELL_LEFT_CLICK ) EVT( EVT_GRID_CMD_CELL_RIGHT_CLICK, 3, wxEVT_GRID_CELL_RIGHT_CLICK ) EVT( EVT_GRID_CMD_CELL_LEFT_DCLICK, 3, wxEVT_GRID_CELL_LEFT_DCLICK ) EVT( EVT_GRID_CMD_CELL_RIGHT_DCLICK, 3, wxEVT_GRID_CELL_RIGHT_DCLICK ) EVT( EVT_GRID_CMD_LABEL_LEFT_CLICK, 3, wxEVT_GRID_LABEL_LEFT_CLICK ) EVT( EVT_GRID_CMD_LABEL_RIGHT_CLICK, 3, wxEVT_GRID_LABEL_RIGHT_CLICK ) EVT( EVT_GRID_CMD_LABEL_LEFT_DCLICK, 3, wxEVT_GRID_LABEL_LEFT_DCLICK ) EVT( EVT_GRID_CMD_LABEL_RIGHT_DCLICK, 3, wxEVT_GRID_LABEL_RIGHT_DCLICK ) EVT( EVT_GRID_CMD_ROW_SIZE, 3, wxEVT_GRID_ROW_SIZE ) EVT( EVT_GRID_CMD_COL_SIZE, 3, wxEVT_GRID_COL_SIZE ) EVT( EVT_GRID_CMD_RANGE_SELECT, 3, wxEVT_GRID_RANGE_SELECT ) #if WXPERL_W_VERSION_LT( 2, 9, 0 ) EVT( EVT_GRID_CMD_CELL_CHANGE, 3, wxEVT_GRID_CELL_CHANGE ) #else EVT( EVT_GRID_CMD_CELL_CHANGED, 3, wxEVT_GRID_CELL_CHANGED ) EVT( EVT_GRID_CMD_CELL_CHANGING, 3, wxEVT_GRID_CELL_CHANGING ) #endif EVT( EVT_GRID_CMD_SELECT_CELL, 3, wxEVT_GRID_SELECT_CELL ) EVT( EVT_GRID_CMD_EDITOR_SHOWN, 3, wxEVT_GRID_EDITOR_SHOWN ) EVT( EVT_GRID_CMD_EDITOR_HIDDEN, 3, wxEVT_GRID_EDITOR_HIDDEN ) EVT( EVT_GRID_CMD_EDITOR_CREATED, 3, wxEVT_GRID_EDITOR_CREATED ) EVT( EVT_GRID_CMD_CELL_BEGIN_DRAG, 3, wxEVT_GRID_CELL_BEGIN_DRAG ) SEVT( EVT_GRID_CELL_LEFT_CLICK, 2 ) SEVT( EVT_GRID_CELL_RIGHT_CLICK, 2 ) SEVT( EVT_GRID_CELL_LEFT_DCLICK, 2 ) SEVT( EVT_GRID_CELL_RIGHT_DCLICK, 2 ) SEVT( EVT_GRID_LABEL_LEFT_CLICK, 2 ) SEVT( EVT_GRID_LABEL_RIGHT_CLICK, 2 ) SEVT( EVT_GRID_LABEL_LEFT_DCLICK, 2 ) SEVT( EVT_GRID_LABEL_RIGHT_DCLICK, 2 ) SEVT( EVT_GRID_ROW_SIZE, 2 ) SEVT( EVT_GRID_COL_SIZE, 2 ) SEVT( EVT_GRID_RANGE_SELECT, 2 ) #if WXPERL_W_VERSION_LT( 2, 9, 0 ) SEVT( EVT_GRID_CELL_CHANGE, 2 ) #else SEVT( EVT_GRID_CELL_CHANGING, 2 ) SEVT( EVT_GRID_CELL_CHANGED, 2 ) #endif SEVT( EVT_GRID_SELECT_CELL, 2 ) SEVT( EVT_GRID_EDITOR_SHOWN, 2 ) SEVT( EVT_GRID_EDITOR_HIDDEN, 2 ) SEVT( EVT_GRID_EDITOR_CREATED, 2 ) SEVT( EVT_GRID_CELL_BEGIN_DRAG, 2 ) { 0, 0, 0 } }; MODULE=Wx__Grid BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE: XS/Grid.xs INCLUDE: XS/GridCellAttr.xs INCLUDE: XS/GridEvent.xs INCLUDE: XS/GridCellRenderer.xs INCLUDE: XS/GridCellEditor.xs INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp ../../interface/wx/grid/gridtablebase.h INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/GridTableMessage.xsp MODULE=Wx__Grid PACKAGE=Wx::Grid void SetEvents() CODE: wxPli_set_events( evts ); #include "cpp/gr_constants.cpp" # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__Grid Wx-0.9923/ext/grid/lib/000775000000000000 012316265011 12671 5ustar00Mark000000000000Wx-0.9923/ext/grid/lib/Wx/000775000000000000 012316265011 13267 5ustar00Mark000000000000Wx-0.9923/ext/grid/lib/Wx/Grid.pm000664000000000000 1034012306612237 14615 0ustar00Mark000000000000############################################################################# ## Name: ext/grid/lib/Wx/Grid.pm ## Purpose: Wx::Grid (pulls in all Wx::Grid* stuff) ## Author: Mattia Barbon ## Modified by: ## Created: 04/12/2001 ## RCS-ID: $Id: Grid.pm 3316 2012-07-14 02:05:19Z mdootson $ ## Copyright: (c) 2001-2002, 2004-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::Grid; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::load_dll( 'adv' ); Wx::wx_boot( 'Wx::Grid', $VERSION ); SetEvents(); # # properly setup inheritance tree # no strict; package Wx::Grid; @ISA = qw(Wx::ScrolledWindow); package Wx::GridWindow; @ISA = qw(Wx::Grid); package Wx::GridEvent; @ISA = qw(Wx::NotifyEvent); package Wx::GridSizeEvent; @ISA = qw(Wx::NotifyEvent); package Wx::GridRangeSelectEvent; @ISA = qw(Wx::NotifyEvent); package Wx::GridEditorCreatedEvent; @ISA = qw(Wx::CommandEvent); package Wx::GridCellRenderer; package Wx::GridCellStringRenderer; @ISA = qw(Wx::GridCellRenderer); package Wx::GridCellNumberRenderer; @ISA = qw(Wx::GridCellRenderer); package Wx::GridCellFloatRenderer; @ISA = qw(Wx::GridCellRenderer); package Wx::GridCellBoolRenderer; @ISA = qw(Wx::GridCellRenderer); package Wx::GridCellAutoWrapStringRenderer; @ISA = qw(Wx::GridCellStringRenderer); package Wx::GridCellEnumRenderer; @ISA = qw(Wx::GridCellStringRenderer); package Wx::GridCellDateTimeRenderer; @ISA = qw(Wx::GridCellStringRenderer); package Wx::PlGridCellRenderer; @ISA = qw(Wx::GridCellRenderer); package Wx::GridCellEditor; package Wx::GridCellEditorEvtHandler; @ISA = qw(Wx::EvtHandler); package Wx::GridCellBoolEditor; @ISA = qw(Wx::GridCellEditor); package Wx::GridCellTextEditor; @ISA = qw(Wx::GridCellEditor); package Wx::GridCellFloatEditor; @ISA = qw(Wx::GridCellEditor); package Wx::GridCellNumberEditor; @ISA = qw(Wx::GridCellEditor); package Wx::GridCellChoiceEditor; @ISA = qw(Wx::GridCellEditor); package Wx::GridCellAutoWrapStringEditor; @ISA = qw(Wx::GridCellTextEditor); package Wx::GridCellEnumEditor; @ISA = qw(Wx::GridCellChoiceEditor); package Wx::PlGridCellEditor; @ISA = qw(Wx::GridCellEditor); package Wx::GridTableBase; package Wx::PlGridTable; @ISA = qw(Wx::GridTableBase); package Wx::Event; # allow 2.8 / 2.9 event name changes compatibility if(defined(&Wx::Event::EVT_GRID_CELL_CHANGED)) { *Wx::Event::EVT_GRID_CELL_CHANGE = \&Wx::Event::EVT_GRID_CELL_CHANGED; *Wx::Event::EVT_GRID_CMD_CELL_CHANGE = \&Wx::Event::EVT_GRID_CMD_CELL_CHANGED; } else { *Wx::Event::EVT_GRID_CELL_CHANGED = \&Wx::Event::EVT_GRID_CELL_CHANGE; *Wx::Event::EVT_GRID_CMD_CELL_CHANGED = \&Wx::Event::EVT_GRID_CMD_CELL_CHANGE; } package Wx::Grid; use strict; # this is for make_ovl_list to find constants sub CellToRect { my $this = shift; Wx::_match( @_, $Wx::_wgco, 1 ) && return $this->CellToRectCo( @_ ); Wx::_match( @_, $Wx::_n_n, 2 ) && return $this->CellToRectXY( @_ ); Wx::_croak Wx::_ovl_error; } sub _create_ovls { my $name = shift; no strict; die $name unless defined &{$name . 'XY'} && defined &{$name . 'Co'}; use strict; eval <${name}Co( \@_ ); Wx::_match( \@_, \$Wx::_n_n, 2 ) && return \$this->${name}XY( \@_ ); Wx::_croak Wx::_ovl_error; } EOT die $@ if $@; } # for copytex.pl #!sub GetCellValue #!sub IsInSelection #!sub IsVisible #!sub MakeCellVisible #!sub GetDefaultEditorForCell foreach my $i ( qw(GetCellValue IsInSelection IsVisible MakeCellVisible GetDefaultEditorForCell) ) { _create_ovls( $i ); } sub SelectBlock { my $this = shift; Wx::_match( @_, $Wx::_wgco_wgco_b, 3 ) && return $this->SelectBlockPP( @_ ); Wx::_match( @_, $Wx::_n_n_n_n_b, 5 ) && return $this->SelectBlockXYWH( @_ ); Wx::_croak Wx::_ovl_error; } sub SetCellValue { my $this = shift; Wx::_match( @_, $Wx::_wgco_s, 2 ) && return $this->SetCellValueCo( @_ ); Wx::_match( @_, $Wx::_n_n_s, 3 ) && return $this->SetCellValueXY( @_ ); Wx::_croak Wx::_ovl_error; } 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/grid/Makefile.PL000664000000000000 150212306612237 14160 0ustar00Mark000000000000############################################################################# ## Name: ext/grid/Makefile.PL ## Purpose: Makefile.PL for wxGrid ## Author: Mattia Barbon ## Modified by: ## Created: 04/12/2001 ## RCS-ID: $Id: Makefile.PL 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2001-2003, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::Grid', VERSION_FROM => 'lib/Wx/Grid.pm', WX_CORE_LIB => 'adv core base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/grid/t/000775000000000000 012316265011 12366 5ustar00Mark000000000000Wx-0.9923/ext/grid/t/01_load.t000775000000000000 22012306612237 14034 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::Grid; print "ok\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/grid/t/02_inheritance.t000775000000000000 36112306612237 15415 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::Grid; test_inheritance_end(); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/grid/t/03_attr.t000775000000000000 30212306612237 14072 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n" } use strict; use Wx; use Wx::Grid; { my $x = Wx::GridCellAttr->new; } # got there print "ok 1\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/grid/t/04_api.t000775000000000000 147012306612237 13721 0ustar00Mark000000000000#!/usr/bin/perl -w use Test::More tests => 8; use strict; use lib '../../t'; use Tests_Helper qw(in_frame); use Wx; use Wx::Grid; sub test { my $self = shift; my $grid = Wx::Grid->new( $self, -1 ); $grid->CreateGrid( 20, 20 ); my @s; $grid->SelectRow( 1 ); @s = $grid->GetSelectedRows; is( scalar( @s ), 1 ); is_deeply( \@s, [ 1 ] ); $grid->SelectRow( 2 ); @s = $grid->GetSelectedRows; is( scalar( @s ), 1 ); is_deeply( \@s, [ 2 ] ); $grid->SelectRow( 5, 1 ); @s = $grid->GetSelectedRows; is( scalar( @s ), 2 ); is_deeply( \@s, [ 2, 5 ] ); $grid->SelectCol( 1 ); $grid->SelectCol( 2, 1 ); @s = $grid->GetSelectedCols; is( scalar( @s ), 2 ); is_deeply( \@s, [ 1, 2 ] ); } in_frame( \&test ); # local variables: # mode: cperl # end: Wx-0.9923/ext/grid/t/05_threads.t000775000000000000 172312306612237 14604 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use Test::More tests => 4; use Wx::Grid; my $app = Wx::App->new( sub { 1 } ); my $cc = Wx::GridCellCoords->new( 1, 1 ); my $cc2 = Wx::GridCellCoords->new( 1, 1 ); my $ce = Wx::GridCellNumberEditor->new; my $ce2 = Wx::GridCellNumberEditor->new; my $cr = Wx::GridCellStringRenderer->new; my $cr2 = Wx::GridCellStringRenderer->new; my $attr = Wx::GridCellAttr->new; my $attr2 = Wx::GridCellAttr->new; my $gud; my $gud2; if( Wx::wxVERSION >= 2.009 ) { $gud = Wx::GridUpdateLocker->new; $gud2 = Wx::GridUpdateLocker->new; } undef $cc2; undef $ce2; undef $cr2; undef $attr2; undef $gud2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/grid/typemap000664000000000000 415312306612237 13615 0ustar00Mark000000000000############################################################################# ## Name: ext/grid/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 04/12/2001 ## RCS-ID: $Id: typemap 3020 2011-03-12 10:16:00Z mbarbon $ ## Copyright: (c) 2001, 2003-2009, 2011 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxGridSelectionModes T_ENUM wxGridAttrKind T_ENUM wxGrid * O_WXOBJECT wxGridEvent * O_WXOBJECT wxGridSizeEvent * O_WXOBJECT wxGridRangeSelectEvent * O_WXOBJECT wxGridEditorCreatedEvent * O_WXOBJECT wxGridUpdateLocker * O_NON_WXOBJECT_THR wxGridCellCoords * O_NON_WXOBJECT_THR wxGridCellAttr * O_NON_WXOBJECT_THR_SV wxGridCellAttr::wxAttrKind T_ENUM wxGridCellRenderer * O_WXCLIENTDATACONTAINER_THR_SV wxGridCellStringRenderer * O_NON_WXOBJECT_THR_SV wxGridCellNumberRenderer * O_NON_WXOBJECT_THR_SV wxGridCellFloatRenderer * O_NON_WXOBJECT_THR_SV wxGridCellBoolRenderer * O_NON_WXOBJECT_THR_SV wxGridCellAutoWrapStringRenderer * O_NON_WXOBJECT_THR_SV wxGridCellEnumRenderer * O_NON_WXOBJECT_THR_SV wxGridCellDateTimeRenderer * O_NON_WXOBJECT_THR_SV wxPlGridCellRenderer * O_WXCLIENTDATACONTAINER_THR_SV wxGridCellEditor * O_WXCLIENTDATACONTAINER_THR_SV wxGridCellTextEditor * O_NON_WXOBJECT_THR_SV wxGridCellNumberEditor * O_NON_WXOBJECT_THR_SV wxGridCellFloatEditor * O_NON_WXOBJECT_THR_SV wxGridCellBoolEditor * O_NON_WXOBJECT_THR_SV wxGridCellChoiceEditor * O_NON_WXOBJECT_THR_SV wxGridCellAutoWrapStringEditor * O_NON_WXOBJECT_THR_SV wxGridCellEnumEditor * O_NON_WXOBJECT_THR_SV wxPlGridCellEditor * O_WXCLIENTDATACONTAINER_THR_SV wxPlGridTable* O_WXOBJECT wxGridTableBase* O_WXOBJECT wxGridTableMessage* O_NON_WXOBJECT_THR wxGridCellAttrProvider * O_NON_WXOBJECT_THR Wx-0.9923/ext/grid/XS/000775000000000000 012316265011 12455 5ustar00Mark000000000000Wx-0.9923/ext/grid/XS/Grid.xs000664000000000000 4770612306612237 14041 0ustar00Mark000000000000############################################################################ ## Name: ext/grid/XS/Grid.xs ## Purpose: XS for Wx::Grid ## Author: Mattia Barbon ## Modified by: ## Created: 04/12/2001 ## RCS-ID: $Id: Grid.xs 2570 2009-05-17 16:31:20Z mbarbon $ ## Copyright: (c) 2001-2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include "cpp/overload.h" #if WXPERL_W_VERSION_GE( 2, 9, 0 ) MODULE=Wx PACKAGE=Wx::GridUpdateLocker wxGridUpdateLocker* wxGridUpdateLocker::new( grid = NULL ) wxGrid* grid static void wxGridUpdateLocker::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxGridUpdateLocker::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::GridUpdateLocker", THIS, ST(0) ); delete THIS; void wxGridUpdateLocker::Create( grid ) wxGrid* grid #endif MODULE=Wx PACKAGE=Wx::GridCellCoords wxGridCellCoords* wxGridCellCoords::new( r, c ) int r int c static void wxGridCellCoords::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxGridCellCoords::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::GridCellCoords", THIS, ST(0) ); delete THIS; int wxGridCellCoords::GetRow() int wxGridCellCoords::GetCol() void wxGridCellCoords::SetRow( r ) int r void wxGridCellCoords::SetCol( c ) int c void wxGridCellCoords::Set( r, c ) int r int c MODULE=Wx PACKAGE=Wx::Grid void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Grid::new" ) wxGrid* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxGrid(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxGrid* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxWANTS_CHARS, name = wxPanelNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxGrid( parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxGrid::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxWANTS_CHARS, name = wxPanelNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name bool wxGrid::AppendCols( numCols = 1, updateLabels = true ) int numCols bool updateLabels bool wxGrid::AppendRows( numRows = 1, updateLabels = true ) int numRows bool updateLabels void wxGrid::AutoSize() void wxGrid::AutoSizeColLabelSize( col ) int col void wxGrid::AutoSizeRowLabelSize( col ) int col void wxGrid::AutoSizeColumn( col, setAsMin = true ) int col bool setAsMin void wxGrid::AutoSizeColumns( setAsMin = true ) bool setAsMin void wxGrid::AutoSizeRow( row, setAsMin = true ) int row bool setAsMin void wxGrid::AutoSizeRows( setAsMin = true ) bool setAsMin void wxGrid::BeginBatch() wxRect* wxGrid::BlockToDeviceRect( topLeft, bottomRight ) wxGridCellCoords* topLeft wxGridCellCoords* bottomRight CODE: RETVAL = new wxRect( THIS->BlockToDeviceRect( *topLeft, *bottomRight ) ); OUTPUT: RETVAL bool wxGrid::CanDragColSize() #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool wxGrid::CanDragColMove() #endif bool wxGrid::CanDragRowSize() bool wxGrid::CanDragGridSize() bool wxGrid::CanEnableCellControl() wxRect* wxGrid::CellToRectXY( row, col ) int row int col CODE: RETVAL = new wxRect( THIS->CellToRect( row, col ) ); OUTPUT: RETVAL wxRect* wxGrid::CellToRectCo( coords ) wxGridCellCoords* coords CODE: RETVAL = new wxRect( THIS->CellToRect( *coords ) ); OUTPUT: RETVAL void wxGrid::ClearGrid() void wxGrid::ClearSelection() bool wxGrid::CreateGrid( numRows, numCols, selMode = wxGrid::wxGridSelectCells ) int numRows int numCols wxGridSelectionModes selMode bool wxGrid::DeleteCols( pos = 0, numCols = 1, updateLabels = true ) int pos int numCols bool updateLabels bool wxGrid::DeleteRows( pos = 0, numRows = 1, updateLabels = true ) int pos int numRows bool updateLabels void wxGrid::DisableCellEditControl() void wxGrid::DisableDragGridSize() void wxGrid::DisableDragRowSize() void wxGrid::DisableDragColSize() #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void wxGrid::DisableDragColMove() #endif void wxGrid::EnableCellEditControl( enable = true ) bool enable #if WXPERL_W_VERSION_GE( 2, 7, 0 ) void wxGrid::EnableDragColMove( enable = true ) bool enable #endif void wxGrid::EnableDragColSize( enable = true ) bool enable void wxGrid::EnableDragGridSize( enable = true ) bool enable void wxGrid::EnableDragRowSize( enable = true ) bool enable void wxGrid::EnableEditing( enable = true ) bool enable void wxGrid::EnableGridLines( enable = true ) bool enable void wxGrid::EndBatch() void wxGrid::ForceRefresh() int wxGrid::GetBatchCount() void wxGrid::GetCellAlignment( row, col ) int row int col PREINIT: int x, y; PPCODE: THIS->GetCellAlignment( row, col, &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); wxColour* wxGrid::GetCellBackgroundColour( row, col ) int row int col CODE: RETVAL = new wxColour( THIS->GetCellBackgroundColour( row, col ) ); OUTPUT: RETVAL wxGridCellEditor* wxGrid::GetCellEditor( row, col ) int row int col bool wxGrid::GetCellOverflow( row, col ) int row int col wxGridCellRenderer* wxGrid::GetCellRenderer( row, col ) int row int col wxFont* wxGrid::GetCellFont( row, col ) int row int col CODE: RETVAL = new wxFont( THIS->GetCellFont( row, col ) ); OUTPUT: RETVAL wxColour* wxGrid::GetCellTextColour( row, col ) int row int col CODE: RETVAL = new wxColour( THIS->GetCellTextColour( row, col ) ); OUTPUT: RETVAL wxString wxGrid::GetCellValueXY( row, col ) int row int col CODE: RETVAL = THIS->GetCellValue( row, col ); OUTPUT: RETVAL wxString wxGrid::GetCellValueCo( coord ) wxGridCellCoords* coord CODE: RETVAL = THIS->GetCellValue( *coord ); OUTPUT: RETVAL void wxGrid::GetColLabelAlignment() PREINIT: int x, y; PPCODE: THIS->GetColLabelAlignment( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); int wxGrid::GetColLabelSize() wxString wxGrid::GetColLabelValue( col ) int col #if WXPERL_W_VERSION_GE( 2, 7, 2 ) int wxGrid::GetColPos( colId ) int colId #endif int wxGrid::GetColSize( col ) int col #if WXPERL_W_VERSION_GE( 2, 7, 2 ) int wxGrid::GetColAt( colPos ) int colPos #endif void wxGrid::GetDefaultCellAlignment() PREINIT: int x, y; PPCODE: THIS->GetDefaultCellAlignment( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); wxColour* wxGrid::GetDefaultCellBackgroundColour() CODE: RETVAL = new wxColour( THIS->GetDefaultCellBackgroundColour() ); OUTPUT: RETVAL wxFont* wxGrid::GetDefaultCellFont() CODE: RETVAL = new wxFont( THIS->GetDefaultCellFont() ); OUTPUT: RETVAL bool wxGrid::GetDefaultCellOverflow( ) wxColour* wxGrid::GetDefaultCellTextColour() CODE: RETVAL = new wxColour( THIS->GetDefaultCellTextColour() ); OUTPUT: RETVAL int wxGrid::GetDefaultColLabelSize() int wxGrid::GetDefaultColSize() int wxGrid::GetColMinimalAcceptableWidth() #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxGridCellAttr* wxGrid::GetOrCreateCellAttr( row, col ) int row int col #endif int wxGrid::GetRowMinimalAcceptableHeight() wxGridCellEditor* wxGrid::GetDefaultEditor() wxGridCellEditor* wxGrid::GetDefaultEditorForType( typeName ) wxString typeName wxGridCellEditor* wxGrid::GetDefaultEditorForCellCo( coords ) wxGridCellCoords* coords CODE: RETVAL = THIS->GetDefaultEditorForCell( *coords ); OUTPUT: RETVAL wxGridCellEditor* wxGrid::GetDefaultEditorForCellXY( x, y ) int x int y CODE: RETVAL = THIS->GetDefaultEditorForCell( x, y ); OUTPUT: RETVAL wxGridCellRenderer* wxGrid::GetDefaultRenderer() wxGridCellRenderer* wxGrid::GetDefaultRendererForType( typeName ) wxString typeName ##wxGridCellRenderer* ##wxGrid::GetDefaultRendererForCellCo( coords ) ## wxGridCellCoords* coords ## CODE: ## RETVAL = THIS->GetDefaultRendererForCell( *coords ); ## OUTPUT: ## RETVAL wxGridCellRenderer* wxGrid::GetDefaultRendererForCell( x, y ) int x int y CODE: RETVAL = THIS->GetDefaultRendererForCell( x, y ); OUTPUT: RETVAL void wxGrid::GetRowLabelAlignment() PREINIT: int x, y; PPCODE: THIS->GetRowLabelAlignment( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); int wxGrid::GetDefaultRowLabelSize() int wxGrid::GetDefaultRowSize() int wxGrid::GetGridCursorCol() int wxGrid::GetGridCursorRow() wxColour* wxGrid::GetGridLineColour() CODE: RETVAL = new wxColour( THIS->GetGridLineColour() ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxPen* wxGrid::GetDefaultGridLinePen() CODE: RETVAL = new wxPen( THIS->GetDefaultGridLinePen() ); OUTPUT: RETVAL wxPen* wxGrid::GetColGridLinePen( col ) int col CODE: RETVAL = new wxPen( THIS->GetColGridLinePen( col ) ); OUTPUT: RETVAL wxPen* wxGrid::GetRowGridLinePen( row ) int row CODE: RETVAL = new wxPen( THIS->GetRowGridLinePen( row ) ); OUTPUT: RETVAL #endif wxGridTableBase* wxGrid::GetTable() bool wxGrid::GridLinesEnabled() wxColour* wxGrid::GetLabelBackgroundColour() CODE: RETVAL = new wxColour( THIS->GetLabelBackgroundColour() ); OUTPUT: RETVAL wxFont* wxGrid::GetLabelFont() CODE: RETVAL = new wxFont( THIS->GetLabelFont() ); OUTPUT: RETVAL wxColour* wxGrid::GetLabelTextColour() CODE: RETVAL = new wxColour( THIS->GetLabelTextColour() ); OUTPUT: RETVAL int wxGrid::GetNumberCols() int wxGrid::GetNumberRows() int wxGrid::GetRowLabelSize() wxString wxGrid::GetRowLabelValue( row ) int row int wxGrid::GetRowSize( row ) int row #if WXPERL_W_VERSION_GE( 2, 6, 0 ) int wxGrid::GetScrollLineX() int wxGrid::GetScrollLineY() void wxGrid::SetScrollLineX( x ) int x void wxGrid::SetScrollLineY( y ) int y #endif void wxGrid::GetSelectedCells() PPCODE: PUTBACK; wxPli_nonobjarray_push ( aTHX_ THIS->GetSelectedCells(), "Wx::GridCellCoords" ); SPAGAIN; void wxGrid::GetSelectionBlockTopLeft() PPCODE: PUTBACK; wxPli_nonobjarray_push ( aTHX_ THIS->GetSelectionBlockTopLeft(), "Wx::GridCellCoords" ); SPAGAIN; void wxGrid::GetSelectionBlockBottomRight() PPCODE: PUTBACK; wxPli_nonobjarray_push ( aTHX_ THIS->GetSelectionBlockBottomRight(), "Wx::GridCellCoords" ); SPAGAIN; void wxGrid::GetSelectedCols() PPCODE: PUTBACK; wxPli_intarray_push( aTHX_ THIS->GetSelectedCols() ); SPAGAIN; void wxGrid::GetSelectedRows() PPCODE: PUTBACK; wxPli_intarray_push( aTHX_ THIS->GetSelectedRows() ); SPAGAIN; wxColour* wxGrid::GetSelectionBackground() CODE: RETVAL = new wxColour( THIS->GetSelectionBackground() ); OUTPUT: RETVAL wxColour* wxGrid::GetSelectionForeground() CODE: RETVAL = new wxColour( THIS->GetSelectionForeground() ); OUTPUT: RETVAL wxGridSelectionModes wxGrid::GetSelectionMode() int wxGrid::GetViewWidth() void wxGrid::HideCellEditControl() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void wxGrid::HideRowLabels() void wxGrid::HideColLabels() #endif bool wxGrid::InsertCols( pos = 0, numCols = 1, updateLabels = true ) int pos int numCols bool updateLabels bool wxGrid::InsertRows( pos = 0, numRows = 1, updateLabels = true ) int pos int numRows bool updateLabels bool wxGrid::IsCellEditControlEnabled() bool wxGrid::IsCurrentCellReadOnly() bool wxGrid::IsEditable() bool wxGrid::IsInSelectionXY( row, col ) int row int col CODE: RETVAL = THIS->IsInSelection( row, col ); OUTPUT: RETVAL bool wxGrid::IsInSelectionCo( coords ) wxGridCellCoords* coords CODE: RETVAL = THIS->IsInSelection( *coords ); OUTPUT: RETVAL bool wxGrid::IsReadOnly( row, col ) int row int col bool wxGrid::IsSelection() bool wxGrid::IsVisibleXY( row, col, wholeCellVisible = true ) int row int col bool wholeCellVisible CODE: RETVAL = THIS->IsVisible( row, col, wholeCellVisible ); OUTPUT: RETVAL bool wxGrid::IsVisibleCo( coords, wholeCellVisible = true ) wxGridCellCoords* coords bool wholeCellVisible CODE: RETVAL = THIS->IsVisible( *coords, wholeCellVisible ); OUTPUT: RETVAL void wxGrid::MakeCellVisibleXY( row, col ) int row int col CODE: THIS->MakeCellVisible( row, col ); void wxGrid::MakeCellVisibleCo( coords ) wxGridCellCoords* coords CODE: THIS->MakeCellVisible( *coords ); bool wxGrid::MoveCursorDown( expandSelection ) bool expandSelection bool wxGrid::MoveCursorLeft( expandSelection ) bool expandSelection bool wxGrid::MoveCursorRight( expandSelection ) bool expandSelection bool wxGrid::MoveCursorUp( expandSelection ) bool expandSelection bool wxGrid::MoveCursorDownBlock( expandSelection ) bool expandSelection bool wxGrid::MoveCursorLeftBlock( expandSelection ) bool expandSelection bool wxGrid::MoveCursorRightBlock( expandSelection ) bool expandSelection bool wxGrid::MoveCursorUpBlock( expandSelection ) bool expandSelection bool wxGrid::MovePageDown() bool wxGrid::MovePageUp() bool wxGrid::ProcessTableMessage( msg ) wxGridTableMessage* msg C_ARGS: *msg void wxGrid::RegisterDataType( typeName, renderer, editor ) wxString typeName wxGridCellRenderer* renderer wxGridCellEditor* editor CODE: renderer->IncRef(); editor->IncRef(); THIS->RegisterDataType( typeName, renderer, editor ); void wxGrid::SaveEditControlValue() void wxGrid::SelectAll() void wxGrid::SelectBlockXYWH( topRow, leftCol, bottomRow, rightCol, addToSelected = false ) int topRow int leftCol int bottomRow int rightCol bool addToSelected CODE: THIS->SelectBlock( topRow, leftCol, bottomRow, rightCol, addToSelected ); void wxGrid::SelectBlockPP( topLeft, bottomRight, addToSelected = false ) wxGridCellCoords* topLeft wxGridCellCoords* bottomRight bool addToSelected CODE: THIS->SelectBlock( *topLeft, *bottomRight, addToSelected ); void wxGrid::SelectCol( col, addToSelected = false ) int col bool addToSelected void wxGrid::SelectRow( row, addToSelected = false ) int row bool addToSelected #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void wxGrid::SetUseNativeColLabels( native = true ) bool native #endif void wxGrid::SetCellAlignment( row, col, horiz, vert ) int row int col int horiz int vert void wxGrid::SetCellBackgroundColour( row, col, colour ) int row int col wxColour colour void wxGrid::SetCellHighlightColour( colour ) wxColour* colour C_ARGS: *colour void wxGrid::SetCellHighlightPenWidth( width ) int width void wxGrid::SetCellHighlightROPenWidth( width ) int width void wxGrid::SetCellEditor( row, col, editor ) int row int col wxGridCellEditor* editor CODE: editor->IncRef(); THIS->SetCellEditor( row, col, editor ); void wxGrid::SetCellRenderer( row, col, renderer ) int row int col wxGridCellRenderer* renderer CODE: renderer->IncRef(); THIS->SetCellRenderer( row, col, renderer ); void wxGrid::SetCellFont( row, col, font ) int row int col wxFont* font CODE: THIS->SetCellFont( row, col, *font ); void wxGrid::SetCellTextColour( row, col, colour ) int row int col wxColour colour void wxGrid::SetCellSize( row, col, rows, cols ) int row int col int rows int cols void wxGrid::SetCellOverflow( row, col, oflo ) int row int col bool oflo void wxGrid::SetCellValueXY( row, col, s ) int row int col wxString s CODE: THIS->SetCellValue( row, col, s ); void wxGrid::SetCellValueCo( coords, s ) wxGridCellCoords* coords wxString s CODE: THIS->SetCellValue( *coords, s ); void wxGrid::SetDefaultCellAlignment( horiz, vert ) int horiz int vert void wxGrid::SetDefaultCellBackgroundColour( colour ) wxColour colour void wxGrid::SetDefaultCellFont( font ) wxFont* font CODE: THIS->SetDefaultCellFont( *font ); void wxGrid::SetDefaultCellOverflow( oflo ) bool oflo void wxGrid::SetDefaultCellTextColour( colour ) wxColour colour void wxGrid::SetDefaultColSize( width, resizeExistingCols = false ) int width bool resizeExistingCols void wxGrid::SetDefaultEditor( editor ) wxGridCellEditor* editor CODE: editor->IncRef(); THIS->SetDefaultEditor( editor ); void wxGrid::SetDefaultRenderer( renderer ) wxGridCellRenderer* renderer CODE: renderer->IncRef(); THIS->SetDefaultRenderer( renderer ); void wxGrid::SetDefaultRowSize( height, resizeExistingCols = false ) int height bool resizeExistingCols void wxGrid::SetColAttr( col, attr ) int col wxGridCellAttr* attr CODE: attr->IncRef(); THIS->SetColAttr( col, attr ); void wxGrid::SetColFormatBool( col ) int col void wxGrid::SetColFormatNumber( col ) int col void wxGrid::SetColFormatFloat( col, width = -1, precision = -1 ) int col int width int precision void wxGrid::SetColFormatCustom( col, typeName ) int col wxString typeName void wxGrid::SetColLabelAlignment( horiz, vert ) int horiz int vert void wxGrid::SetColLabelSize( height ) int height void wxGrid::SetColLabelValue( col, value ) int col wxString value void wxGrid::SetColMinimalAcceptableWidth( int width ) void wxGrid::SetRowMinimalAcceptableHeight( int width ) void wxGrid::SetColMinimalWidth( col, width ) int col int width void wxGrid::SetColSize( col, height ) int col int height #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void wxGrid::SetColPos( col, pos ) int col int pos #endif void wxGrid::SetGridCursor( row, col ) int row int col void wxGrid::SetGridLineColour( colour ) wxColour colour void wxGrid::SetLabelBackgroundColour( colour ) wxColour colour void wxGrid::SetLabelFont( font ) wxFont* font CODE: THIS->SetLabelFont( *font ); void wxGrid::SetLabelTextColour( colour ) wxColour colour void wxGrid::SetMargins( extraWidth, extraHeight ) int extraWidth int extraHeight void wxGrid::SetReadOnly( row, col, isReadOnly = true ) int row int col bool isReadOnly void wxGrid::SetRowAttr( row, attr ) int row wxGridCellAttr* attr CODE: attr->IncRef(); THIS->SetRowAttr( row, attr ); void wxGrid::SetRowLabelAlignment( horiz, vert ) int horiz int vert void wxGrid::SetRowLabelSize( width ) int width void wxGrid::SetRowLabelValue( row, value ) int row wxString value void wxGrid::SetRowMinimalHeight( row, height ) int row int height void wxGrid::SetRowSize( row, height ) int row int height void wxGrid::SetSelectionBackground( colour ) wxColour colour void wxGrid::SetSelectionForeground( colour ) wxColour colour void wxGrid::SetSelectionMode( selmode ) wxGridSelectionModes selmode void wxGrid::SetTable( table, selMode = wxGrid::wxGridSelectCells ) wxGridTableBase* table wxGridSelectionModes selMode void wxGrid::ShowCellEditControl() int wxGrid::XToCol( x ) int x int wxGrid::XToEdgeOfCol( x ) int x int wxGrid::YToRow( y ) int y int wxGrid::YToEdgeOfRow( y ) int y wxWindow* wxGrid::GetGridWindow() wxWindow* wxGrid::GetGridRowLabelWindow() wxWindow* wxGrid::GetGridColLabelWindow() Wx-0.9923/ext/grid/XS/GridCellAttr.xs000664000000000000 604712306612237 15445 0ustar00Mark000000000000############################################################################# ## Name: ext/grid/XS/GridCellAttr.xs ## Purpose: XS for Wx::GridCellAttr ## Author: Mattia Barbon ## Modified by: ## Created: 05/12/2001 ## RCS-ID: $Id: GridCellAttr.xs 2402 2008-05-19 21:43:32Z mbarbon $ ## Copyright: (c) 2001-2002, 2004, 2006-2008 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 PACKAGE=Wx::GridCellAttr wxGridCellAttr* wxGridCellAttr::new() static void wxGridCellAttr::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxGridCellAttr::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), SvRV( ST(0) ), ST(0) ); if( THIS ) THIS->DecRef(); void wxGridCellAttr::IncRef() void wxGridCellAttr::DecRef() void wxGridCellAttr::SetTextColour( colour ) wxColour colour void wxGridCellAttr::SetBackgroundColour( colour ) wxColour colour void wxGridCellAttr::SetFont( font ) wxFont* font CODE: THIS->SetFont( *font ); void wxGridCellAttr::SetAlignment( hAlign, vAlign ) int hAlign int vAlign void wxGridCellAttr::SetReadOnly( isReadOnly = true ) bool isReadOnly bool wxGridCellAttr::HasTextColour() bool wxGridCellAttr::HasBackgroundColour() bool wxGridCellAttr::HasFont() bool wxGridCellAttr::HasAlignment() bool wxGridCellAttr::HasRenderer() bool wxGridCellAttr::HasEditor() wxColour* wxGridCellAttr::GetTextColour() CODE: RETVAL = new wxColour( THIS->GetTextColour() ); OUTPUT: RETVAL wxColour* wxGridCellAttr::GetBackgroundColour() CODE: RETVAL = new wxColour( THIS->GetBackgroundColour() ); OUTPUT: RETVAL wxGridCellEditor* wxGridCellAttr::GetEditor( grid, row, col ) wxGrid* grid int row int col CODE: RETVAL = THIS->GetEditor( grid, row, col ); OUTPUT: RETVAL wxGridCellRenderer* wxGridCellAttr::GetRenderer( grid, row, col ) wxGrid* grid int row int col CODE: RETVAL = THIS->GetRenderer( grid, row, col ); OUTPUT: RETVAL wxFont* wxGridCellAttr::GetFont() CODE: RETVAL = new wxFont( THIS->GetFont() ); OUTPUT: RETVAL void wxGridCellAttr::GetAlignment() PREINIT: int x, y; PPCODE: THIS->GetAlignment( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); bool wxGridCellAttr::IsReadOnly() void wxGridCellAttr::SetDefAttr( defAttr ) wxGridCellAttr* defAttr void wxGridCellAttr::SetEditor( editor ) wxGridCellEditor* editor CODE: editor->IncRef(); THIS->SetEditor( editor ); void wxGridCellAttr::SetRenderer( renderer ) wxGridCellRenderer* renderer CODE: renderer->IncRef(); THIS->SetRenderer( renderer ); bool wxGridCellAttr::GetOverflow() void wxGridCellAttr::SetOverflow( allow = true ) bool allow Wx-0.9923/ext/grid/XS/GridCellEditor.xs000664000000000000 1212112313605314 15763 0ustar00Mark000000000000############################################################################# ## Name: ext/grid/XS/GridCellEditor.xs ## Purpose: XS for Wx::GridCellEditor* ## Author: Mattia Barbon ## Modified by: ## Created: 13/12/2001 ## RCS-ID: $Id: GridCellEditor.xs 2533 2009-03-08 19:03:35Z mbarbon $ ## Copyright: (c) 2001-2007, 2009 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 PACKAGE=Wx::GridCellEditor static void wxGridCellEditor::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxGridCellEditor::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), SvRV( ST(0) ), ST(0) ); if( THIS ) THIS->DecRef(); bool wxGridCellEditor::IsCreated() wxControl* wxGridCellEditor::GetControl() void wxGridCellEditor::SetControl( control ) wxControl* control void wxGridCellEditor::SetSize( rect ) wxRect* rect CODE: THIS->SetSize( *rect ); void wxGridCellEditor::Show( show, attr ) bool show wxGridCellAttr* attr #if WXPERL_W_VERSION_LT( 2, 9, 5 ) void wxGridCellEditor::PaintBackground( rectCell, attr ) wxRect* rectCell wxGridCellAttr* attr CODE: THIS->PaintBackground( *rectCell, attr ); #else void wxGridCellEditor::PaintBackground( dc, rectCell, attr ) wxDC* dc wxRect* rectCell wxGridCellAttr* attr CODE: THIS->PaintBackground( *dc, *rectCell, *attr ); #endif void wxGridCellEditor::BeginEdit( row, col, grid ) int row int col wxGrid* grid #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool wxGridCellEditor::EndEdit( row, col, grid, oldval, newval ) int row int col wxGrid* grid wxString oldval wxString newval C_ARGS: row, col, grid, oldval, &newval void wxGridCellEditor::ApplyEdit( row, col, grid ) int row int col wxGrid* grid #else bool wxGridCellEditor::EndEdit( row, col, grid ) int row int col wxGrid* grid #endif void wxGridCellEditor::Reset() bool wxGridCellEditor::IsAcceptedKey( event ) wxKeyEvent* event CODE: RETVAL = THIS->IsAcceptedKey( *event ); OUTPUT: RETVAL void wxGridCellEditor::StartingKey( event ) wxKeyEvent* event CODE: THIS->StartingKey( *event ); void wxGridCellEditor::StartingClick() void wxGridCellEditor::HandleReturn( event ) wxKeyEvent* event CODE: THIS->HandleReturn( *event ); void wxGridCellEditor::Destroy() MODULE=Wx PACKAGE=Wx::GridCellTextEditor wxGridCellTextEditor* wxGridCellTextEditor::new() void wxGridCellTextEditor::SetParameters( params ) wxString params MODULE=Wx PACKAGE=Wx::GridCellAutoWrapStringEditor wxGridCellAutoWrapStringEditor* wxGridCellAutoWrapStringEditor::new() MODULE=Wx PACKAGE=Wx::GridCellNumberEditor wxGridCellNumberEditor* wxGridCellNumberEditor::new( min = -1, max = -1 ) int min int max void wxGridCellNumberEditor::SetParameters( params ) wxString params MODULE=Wx PACKAGE=Wx::GridCellFloatEditor wxGridCellFloatEditor* wxGridCellFloatEditor::new( width = -1, precision = -1 ) int width int precision void wxGridCellChoiceEditor::SetParameters( params ) wxString params MODULE=Wx PACKAGE=Wx::GridCellBoolEditor wxGridCellBoolEditor* wxGridCellBoolEditor::new() #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool IsTrueValue( value ) wxString value CODE: RETVAL = wxGridCellBoolEditor::IsTrueValue( value ); OUTPUT: RETVAL void UseStringValues( trueValue = wxT("1"), falseValue = wxT("") ) wxString trueValue wxString falseValue CODE: wxGridCellBoolEditor::UseStringValues( trueValue, falseValue ); #endif MODULE=Wx PACKAGE=Wx::GridCellChoiceEditor wxGridCellChoiceEditor* wxGridCellChoiceEditor::new( choices, allowOthers = false ) SV* choices bool allowOthers PREINIT: wxString* chs; int n; CODE: n = wxPli_av_2_stringarray( aTHX_ choices, &chs ); RETVAL = new wxGridCellChoiceEditor( n, chs, allowOthers ); delete[] chs; OUTPUT: RETVAL void wxGridCellChoiceEditor::SetParameters( params ) wxString params MODULE=Wx PACKAGE=Wx::GridCellEnumEditor wxGridCellEnumEditor* wxGridCellEnumEditor::new( choices = wxEmptyString ) wxString choices MODULE=Wx PACKAGE=Wx::PlGridCellEditor #include "cpp/editor.h" SV* wxPlGridCellEditor::new() CODE: wxPlGridCellEditor* r = new wxPlGridCellEditor( CLASS ); r->SetClientObject( new wxPliUserDataCD( r->m_callback.GetSelf() ) ); RETVAL = r->m_callback.GetSelf(); SvREFCNT_inc( RETVAL ); OUTPUT: RETVAL #if WXPERL_W_VERSION_LT( 2, 9, 5 ) void wxPlGridCellEditor::PaintBackground( rectCell, attr ) wxRect* rectCell wxGridCellAttr* attr CODE: THIS->wxGridCellEditor::PaintBackground( *rectCell, attr ); #else void wxPlGridCellEditor::PaintBackground( dc, rectCell, attr ) wxDC* dc wxRect* rectCell wxGridCellAttr* attr CODE: THIS->wxGridCellEditor::PaintBackground( *dc, *rectCell, *attr ); #endif Wx-0.9923/ext/grid/XS/GridCellRenderer.xs000664000000000000 670412306612237 16301 0ustar00Mark000000000000############################################################################# ## Name: ext/grid/XS/GridCellRenderer.xs ## Purpose: XS for Wx::GridCellRenderer* ## Author: Mattia Barbon ## Modified by: ## Created: 13/12/2001 ## RCS-ID: $Id: GridCellRenderer.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2007 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 PACKAGE=Wx::GridCellRenderer void wxGridCellRenderer::Draw( grid, attr, dc, rect, row, col, isSelected ) wxGrid* grid wxGridCellAttr* attr wxDC* dc wxRect* rect int row int col bool isSelected CODE: THIS->Draw( *grid, *attr, *dc, *rect, row, col, isSelected ); wxSize* wxGridCellRenderer::GetBestSize( grid, attr, dc, row, col ) wxGrid* grid wxGridCellAttr* attr wxDC* dc int row int col CODE: RETVAL = new wxSize( THIS->GetBestSize( *grid, *attr, *dc, row, col ) ); OUTPUT: RETVAL static void wxGridCellRenderer::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxGridCellRenderer::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), SvRV( ST(0) ), ST(0) ); if( THIS ) THIS->DecRef(); void wxGridCellRenderer::SetParameters( parameters ) wxString parameters MODULE=Wx PACKAGE=Wx::GridCellStringRenderer wxGridCellStringRenderer* wxGridCellStringRenderer::new() MODULE=Wx PACKAGE=Wx::GridCellNumberRenderer wxGridCellNumberRenderer* wxGridCellNumberRenderer::new() MODULE=Wx PACKAGE=Wx::GridCellFloatRenderer wxGridCellFloatRenderer* wxGridCellFloatRenderer::new( width = -1, precision = -1 ) int width int precision int wxGridCellFloatRenderer::GetWidth() int wxGridCellFloatRenderer::GetPrecision() void wxGridCellFloatRenderer::SetWidth( width ) int width void wxGridCellFloatRenderer::SetPrecision( precision ) int precision MODULE=Wx PACKAGE=Wx::GridCellBoolRenderer wxGridCellBoolRenderer* wxGridCellBoolRenderer::new() MODULE=Wx PACKAGE=Wx::GridCellAutoWrapStringRenderer wxGridCellAutoWrapStringRenderer* wxGridCellAutoWrapStringRenderer::new() MODULE=Wx PACKAGE=Wx::GridCellEnumRenderer wxGridCellEnumRenderer* wxGridCellEnumRenderer::new( choices = wxEmptyString ) wxString choices MODULE=Wx PACKAGE=Wx::GridCellDateTimeRenderer #if WXPERL_W_VERSION_LT( 2, 6, 0 ) #define wxDefaultDateTimeFormat wxT("%c") #endif wxGridCellDateTimeRenderer* wxGridCellDateTimeRenderer::new( outformat = wxDefaultDateTimeFormat, informat = wxDefaultDateTimeFormat ) wxString outformat wxString informat MODULE=Wx PACKAGE=Wx::PlGridCellRenderer #include "cpp/renderer.h" SV* wxPlGridCellRenderer::new() CODE: wxPlGridCellRenderer* r = new wxPlGridCellRenderer( CLASS ); r->SetClientObject( new wxPliUserDataCD( r->m_callback.GetSelf() ) ); RETVAL = r->m_callback.GetSelf(); SvREFCNT_inc( RETVAL ); OUTPUT: RETVAL void wxPlGridCellRenderer::Draw( grid, attr, dc, rect, row, col, isSelected ) wxGrid* grid wxGridCellAttr* attr wxDC* dc wxRect* rect int row int col bool isSelected CODE: THIS->wxGridCellRenderer::Draw( *grid, *attr, *dc, *rect, row, col, isSelected ); Wx-0.9923/ext/grid/XS/GridEvent.xs000664000000000000 716212306612237 15013 0ustar00Mark000000000000############################################################################# ## Name: ext/grid/XS/GridEvent.xs ## Purpose: XS for Wx::Grid*Event ## Author: Mattia Barbon ## Modified by: ## Created: 08/12/2001 ## RCS-ID: $Id: GridEvent.xs 2503 2008-11-06 00:23:45Z mbarbon $ ## Copyright: (c) 2001-2004, 2008 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 PACKAGE=Wx::GridEvent #if 0 wxGridEvent* wxGridEvent::new( id, type, obj, row = -1, col = -1, x = -1, y = -1, sel = true, control = true, shift = true, alt = true, meta = true ) int id wxEventType type wxObject* obj int row int col int x int y bool sel bool control bool shift bool alt bool meta #endif int wxGridEvent::GetRow() int wxGridEvent::GetCol() wxPoint* wxGridEvent::GetPosition() CODE: RETVAL = new wxPoint( THIS->GetPosition() ); OUTPUT: RETVAL bool wxGridEvent::Selecting() bool wxGridEvent::ControlDown() bool wxGridEvent::AltDown() bool wxGridEvent::MetaDown() bool wxGridEvent::ShiftDown() MODULE=Wx PACKAGE=Wx::GridSizeEvent #if 0 wxGridSizeEvent* wxGridSizeEvent::new( id, type, obj, rowOrCol = -1, x = -1, y = -1, control = true, shift = true, alt = true, meta = true ) int id wxEventType type wxObject* obj int rowOrCol int x int y bool control bool shift bool alt bool meta #endif int wxGridSizeEvent::GetRowOrCol() wxPoint* wxGridSizeEvent::GetPosition() CODE: RETVAL = new wxPoint( THIS->GetPosition() ); OUTPUT: RETVAL bool wxGridSizeEvent::ControlDown() bool wxGridSizeEvent::AltDown() bool wxGridSizeEvent::MetaDown() bool wxGridSizeEvent::ShiftDown() MODULE=Wx PACKAGE=Wx::GridRangeSelectEvent #if 0 wxGridRangeSelectEvent* wxGridRangeSelectEvent::new( id, type, obj, topLeft, bottomRight, sel = true, control = false, shift = false, alt = false, meta = false ) int id wxEventType type wxObject* obj wxGridCellCoords* topLeft wxGridCellCoords* bottomRight bool sel bool control bool shift bool alt bool meta CODE: RETVAL = new wxGridRangeSelectEvent( id, type, obj, *topLeft, *bottomRight, sel, control, shift, alt, meta ); OUTPUT: RETVAL #endif wxGridCellCoords* wxGridRangeSelectEvent::GetTopLeftCoords() CODE: RETVAL = new wxGridCellCoords( THIS->GetTopLeftCoords() ); OUTPUT: RETVAL wxGridCellCoords* wxGridRangeSelectEvent::GetBottomRightCoords() CODE: RETVAL = new wxGridCellCoords( THIS->GetBottomRightCoords() ); OUTPUT: RETVAL int wxGridRangeSelectEvent::GetTopRow() int wxGridRangeSelectEvent::GetBottomRow() int wxGridRangeSelectEvent::GetLeftCol() int wxGridRangeSelectEvent::GetRightCol() bool wxGridRangeSelectEvent::Selecting() bool wxGridRangeSelectEvent::ControlDown() bool wxGridRangeSelectEvent::MetaDown() bool wxGridRangeSelectEvent::AltDown() bool wxGridRangeSelectEvent::ShiftDown() MODULE=Wx PACKAGE=Wx::GridEditorCreatedEvent wxGridEditorCreatedEvent* wxGridEditorCreatedEvent::new( id, type, obj, row, col, ctrl ) int id wxEventType type wxObject* obj int row int col wxControl* ctrl int wxGridEditorCreatedEvent::GetRow() int wxGridEditorCreatedEvent::GetCol() wxControl* wxGridEditorCreatedEvent::GetControl() void wxGridEditorCreatedEvent::SetRow( row ) int row void wxGridEditorCreatedEvent::SetCol( col ) int col void wxGridEditorCreatedEvent::SetControl( control ) wxControl* control Wx-0.9923/ext/grid/XS/GridTableMessage.xsp000664000000000000 263212306612237 16443 0ustar00Mark000000000000############################################################################# ## Name: ext/grid/XS/GridTableMessage.xsp ## Purpose: XS++ for Wx::PlGridTable ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2003 ## RCS-ID: $Id: GridTableMessage.xsp 2571 2009-05-17 16:46:20Z mbarbon $ ## Copyright: (c) 2003, 2005, 2009 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}; %typemap{wxGridTableBase*}{simple}; %typemap{wxGridTableMessage*}{simple}; %{ #include "wx/grid.h" %} %name{Wx::GridTableMessage} class wxGridTableMessage { wxGridTableMessage( wxGridTableBase* table, int id, int int1 = 0, int int2 = 0 ); %{ static void wxGridTableMessage::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxGridTableMessage() %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::GridTableMessage", THIS, ST(0) ); delete THIS; %}; void SetTableObject( wxGridTableBase* table ); wxGridTableBase* GetTableObject(); void SetId( int id ); int GetId(); void SetCommandInt( int comInt1 ); int GetCommandInt(); void SetCommandInt2( int comInt2 ); int GetCommandInt2(); }; Wx-0.9923/ext/help/000775000000000000 012316265011 12126 5ustar00Mark000000000000Wx-0.9923/ext/help/Help.xs000664000000000000 156312306612240 13456 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/help/Help.xs // Purpose: XS for Wx::HelpController* // Author: Mattia Barbon // Modified by: // Created: 18/03/2001 // RCS-ID: $Id: Help.xs 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2001-2002, 2006 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #undef THIS MODULE=Wx__Help BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE: XS/HelpController.xs INCLUDE: XS/HelpProvider.xs INCLUDE: XS/ContextHelp.xs # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__Help Wx-0.9923/ext/help/lib/000775000000000000 012316265011 12674 5ustar00Mark000000000000Wx-0.9923/ext/help/lib/Wx/000775000000000000 012316265011 13272 5ustar00Mark000000000000Wx-0.9923/ext/help/lib/Wx/Help.pm000664000000000000 260612306612240 14603 0ustar00Mark000000000000############################################################################# ## Name: ext/help/lib/Wx/Help.pm ## Purpose: Wx::Help ( pulls in all Wx::Help* stuff ) ## Author: Mattia Barbon ## Modified by: ## Created: 18/03/2001 ## RCS-ID: $Id: Help.pm 2148 2007-08-15 17:10:50Z mbarbon $ ## Copyright: (c) 2001-2002, 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::Help; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::wx_boot( 'Wx::Help', $VERSION ); # # properly setup inheritance tree # no strict; package Wx::HelpController; @ISA = qw(Wx::HelpControllerBase); package Wx::WinHelpController; @ISA = qw(Wx::HelpControllerBase); package Wx::HelpControllerHtml; @ISA = qw(Wx::HelpControllerBase); package Wx::CHMHelpController; @ISA = qw(Wx::HelpControllerBase); package Wx::ExtHelpController; @ISA = qw(Wx::HelpControllerBase); package Wx::BesthelpController; @ISA = qw(Wx::HelpControllerBase); package Wx::ContextHelpButton; @ISA = qw(Wx::BitmapButton); package Wx::SimpleHelpProvider; @ISA = qw(Wx::HelpProvider); package Wx::HelpControllerHelpProvider; @ISA = qw(Wx::HelpProvider); use strict; 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/help/Makefile.PL000664000000000000 150112306612240 14154 0ustar00Mark000000000000############################################################################# ## Name: ext/help/Makefile.PL ## Purpose: Makefile.PL for wxHelpController* ## Author: Mattia Barbon ## Modified by: ## Created: 18/03/2001 ## RCS-ID: $Id: Makefile.PL 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2003 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::Help', VERSION_FROM => 'lib/Wx/Help.pm', WX_CORE_LIB => 'core base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/help/t/000775000000000000 012316265011 12371 5ustar00Mark000000000000Wx-0.9923/ext/help/t/01_load.t000775000000000000 22012306612240 14031 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::Help; print "ok\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/help/t/02_inheritance.t000775000000000000 36112306612240 15412 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::Help; test_inheritance_end(); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/help/t/03_threads.t000775000000000000 104112306612240 14570 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use Test::More tests => 4; use Wx::Help; my $app = Wx::App->new( sub { 1 } ); my $cth = Wx::ContextHelp->new; my $cth2 = Wx::ContextHelp->new; undef $cth2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/help/typemap000664000000000000 170612306612240 13613 0ustar00Mark000000000000############################################################################# ## Name: ext/help/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 18/03/2001 ## RCS-ID: $Id: typemap 2317 2008-01-18 22:00:14Z mbarbon $ ## Copyright: (c) 2001, 2004, 2007-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxHelpControllerBase * O_WXOBJECT wxHelpController * O_WXOBJECT wxHelpControllerHtml * O_WXOBJECT wxExtHelpController * O_WXOBJECT wxWinHelpController * O_WXOBJECT wxCHMHelpController * O_WXOBJECT wxContextHelp * O_WXOBJECT_THR wxContextHelpButton * O_WXOBJECT wxHelpProvider * O_NON_WXOBJECT wxSimpleHelpProvider * O_NON_WXOBJECT wxHelpControllerHelpProvider * O_NON_WXOBJECT Wx-0.9923/ext/help/XS/000775000000000000 012316265011 12460 5ustar00Mark000000000000Wx-0.9923/ext/help/XS/ContextHelp.xs000664000000000000 307312306612240 15353 0ustar00Mark000000000000############################################################################# ## Name: ext/help/XS/ContextHelp.xs ## Purpose: XS for Wx::ContextHelp, Wx::ContextHelpButton ## Author: Mattia Barbon ## Modified by: ## Created: 21/03/2001 ## RCS-ID: $Id: ContextHelp.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001, 2003, 2004, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #undef THIS MODULE=Wx PACKAGE=Wx::ContextHelp wxContextHelp* wxContextHelp::new( window = NULL, beginHelp = true ) wxWindow* window bool beginHelp static void wxTreeItemId::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxContextHelp::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::ContextHelp", THIS, ST(0) ); delete THIS; bool wxContextHelp::BeginContextHelp( window ) wxWindow* window bool wxContextHelp::EndContextHelp() void wxContextHelp::SetStatus( status ) bool status MODULE=Wx PACKAGE=Wx::ContextHelpButton wxContextHelpButton* wxContextHelpButton::new( parent, id = wxID_CONTEXT_HELP, pos = wxDefaultPosition, size = wxDefaultSize, style = wxBU_AUTODRAW ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style CODE: RETVAL = new wxContextHelpButton( parent, id, pos, size, style ); OUTPUT: RETVAL Wx-0.9923/ext/help/XS/HelpController.xs000664000000000000 437512306612240 16060 0ustar00Mark000000000000############################################################################# ## Name: ext/help/XS/HelpController.xs ## Purpose: XS for Wx::HelpController* ## Author: Mattia Barbon ## Modified by: ## Created: 18/03/2001 ## RCS-ID: $Id: HelpController.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001, 2003, 2004, 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 MODULE=Wx PACKAGE=Wx::HelpControllerBase void wxHelpControllerBase::Destroy() CODE: delete THIS; void wxHelpControllerBase::Initialize( file ) wxString file bool wxHelpControllerBase::DisplayBlock( block ) long block bool wxHelpControllerBase::DisplayContents() bool wxHelpControllerBase::DisplayContextPopup( id ) int id bool wxHelpControllerBase::DisplayTextPopup( text, pos ) wxString text wxPoint pos bool wxHelpControllerBase::DisplaySection( section ) wxString section bool wxHelpControllerBase::DisplaySectionId( section ) long section CODE: RETVAL = THIS->DisplaySection( section ); OUTPUT: RETVAL bool wxHelpControllerBase::KeywordSearch( keyword ) wxString keyword bool wxHelpControllerBase::LoadFile( file = wxEmptyString ) wxString file void wxHelpControllerBase::SetViewer( viewer, flags ) wxString viewer long flags bool wxHelpControllerBase::Quit() #if WXPERL_W_VERSION_GE( 2, 6, 3 ) wxWindow* wxHelpControllerBase::GetParentWindow() void wxHelpControllerBase::SetParentWindow( parent ) wxWindow* parent #endif MODULE=Wx PACKAGE=Wx::WinHelpController #if defined( __WXMSW__ ) #include #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxWinHelpController* wxWinHelpController::new( parent = NULL ) wxWindow* parent #else wxWinHelpController* wxWinHelpController::new() #endif #endif MODULE=Wx PACKAGE=Wx::CHMHelpController #if wxUSE_MS_HTML_HELP #include #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxCHMHelpController* wxCHMHelpController::new( parent = NULL ) wxWindow* parent #else wxCHMHelpController* wxCHMHelpController::new() #endif #endif Wx-0.9923/ext/help/XS/HelpProvider.xs000664000000000000 357212306612240 15525 0ustar00Mark000000000000############################################################################# ## Name: ext/help/XS/HelpProvider.xs ## Purpose: XS for Wx::*HelpProvider ## Author: Mattia Barbon ## Modified by: ## Created: 21/03/2001 ## RCS-ID: $Id: HelpProvider.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001, 2003, 2004 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx PREFIX=wx wxString wxContextId( id ) int id MODULE=Wx PACKAGE=Wx::HelpProvider void wxHelpProvider::Destroy() CODE: delete THIS; wxHelpProvider* wxHelpProvider::Get() CODE: RETVAL = wxHelpProvider::Get(); OUTPUT: RETVAL wxString wxHelpProvider::GetHelp( window ) wxWindow* window bool wxHelpProvider::ShowHelp( window ) wxWindow* window void wxHelpProvider::AddHelp( window, text ) wxWindow* window wxString text void wxHelpProvider::AddHelpById( id, text ) wxWindowID id wxString text CODE: THIS->AddHelp( id, text ); wxHelpProvider* Set( helpProvider ) wxHelpProvider* helpProvider CODE: RETVAL = wxHelpProvider::Set( helpProvider ); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::SimpleHelpProvider wxSimpleHelpProvider* wxSimpleHelpProvider::new() CODE: RETVAL = new wxSimpleHelpProvider(); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::HelpControllerHelpProvider wxHelpControllerHelpProvider* wxHelpControllerHelpProvider::new( hc = 0 ) wxHelpControllerBase* hc CODE: RETVAL = new wxHelpControllerHelpProvider( hc ); OUTPUT: RETVAL void wxHelpControllerHelpProvider::SetHelpController( hc ) wxHelpControllerBase* hc wxHelpControllerBase* wxHelpControllerHelpProvider::GetHelpController() Wx-0.9923/ext/html/000775000000000000 012316265011 12142 5ustar00Mark000000000000Wx-0.9923/ext/html/cpp/000775000000000000 012316265011 12724 5ustar00Mark000000000000Wx-0.9923/ext/html/cpp/htmlwindow.h000664000000000000 445112306612244 15360 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/html/cpp/htmlwindow.h // Purpose: C++ wrapper for Wx::HtmlWindow // Author: Mattia Barbon // Modified by: // Created: 18/03/2001 // RCS-ID: $Id: htmlwindow.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2001-2002, 2004, 2007 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/v_cback.h" class wxPliHtmlWindow:public wxHtmlWindow { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliHtmlWindow ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPliHtmlWindow, "Wx::HtmlWindow", true ); // this fixes the crashes, for some reason wxPliHtmlWindow( const char* package, wxWindow* _arg1, wxWindowID _arg2, const wxPoint& _arg3, const wxSize& _arg4, long _arg5, const wxString& _arg6 ) : wxHtmlWindow( _arg1, _arg2, _arg3, _arg4, _arg5, _arg6 ), m_callback( "Wx::HtmlWindow" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } void OnLinkClicked( const wxHtmlLinkInfo& info ); void OnSetTitle( const wxString& title ); }; void wxPliHtmlWindow::OnLinkClicked( const wxHtmlLinkInfo& info ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnLinkClicked" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "o", &info, "Wx::HtmlLinkInfo" ); } else wxHtmlWindow::OnLinkClicked( info ); } void wxPliHtmlWindow::OnSetTitle( const wxString& title ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnSetTitle" ) ) { wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "P", &title ); } else wxHtmlWindow::OnSetTitle( title ); } WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliHtmlWindow, wxHtmlWindow ); // Local variables: // // mode: c++ // // End: // Wx-0.9923/ext/html/cpp/ht_constants.cpp000664000000000000 740412306612244 16227 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/html/cpp/ht_constants.cpp // Purpose: constants for Wx::Html // Author: Mattia Barbon // Modified by: // Created: 21/03/2001 // RCS-ID: $Id: ht_constants.cpp 2959 2010-08-22 15:37:22Z mbarbon $ // Copyright: (c) 2001, 2003-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 ///////////////////////////////////////////////////////////////////////////// #include "cpp/constants.h" double html_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: html #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'E': #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxEVT_COMMAND_HTML_CELL_CLICKED ); r( wxEVT_COMMAND_HTML_CELL_HOVER ); r( wxEVT_COMMAND_HTML_LINK_CLICKED ); #endif break; case 'H': r( wxHF_TOOLBAR ); r( wxHF_FLATTOOLBAR ); r( wxHF_FLAT_TOOLBAR ); r( wxHF_CONTENTS ); r( wxHF_INDEX ); r( wxHF_SEARCH ); r( wxHF_BOOKMARKS ); r( wxHF_OPENFILES ); r( wxHF_OPEN_FILES ); r( wxHF_PRINT ); r( wxHF_DEFAULTSTYLE ); r( wxHF_MERGE_BOOKS ); r( wxHF_ICONS_BOOK ); r( wxHF_ICONS_BOOK_CHAPTER ); r( wxHF_ICONS_FOLDER ); r( wxHF_DEFAULT_STYLE ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxHF_DIALOG ); r( wxHF_EMBEDDED ); r( wxHF_FRAME ); r( wxHF_MODAL ); #endif #if WXPERL_W_VERSION_GE( 2, 5, 1 ) r( wxHW_NO_SELECTION ); #endif r( wxHW_SCROLLBAR_NEVER ); r( wxHW_DEFAULT_STYLE ); r( wxHW_SCROLLBAR_AUTO ); r( wxHTML_ALIGN_LEFT ); r( wxHTML_ALIGN_CENTER ); r( wxHTML_ALIGN_RIGHT ); r( wxHTML_ALIGN_BOTTOM ); r( wxHTML_ALIGN_TOP ); r( wxHTML_CLR_FOREGROUND ); r( wxHTML_CLR_BACKGROUND ); r( wxHTML_UNITS_PIXELS ); r( wxHTML_UNITS_PERCENT ); r( wxHTML_INDENT_LEFT ); r( wxHTML_INDENT_RIGHT ); r( wxHTML_INDENT_TOP ); r( wxHTML_INDENT_BOTTOM ); r( wxHTML_INDENT_HORIZONTAL ); r( wxHTML_INDENT_VERTICAL ); r( wxHTML_INDENT_ALL ); r( wxHTML_COND_ISANCHOR ); r( wxHTML_COND_ISIMAGEMAP ); r( wxHTML_COND_USER ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) r( wxHTML_FIND_EXACT ); r( wxHTML_FIND_NEAREST_BEFORE ); r( wxHTML_FIND_NEAREST_AFTER ); #endif #if WXPERL_W_VERSION_LT( 2, 7, 0 ) r( wxHTML_FONT_SIZE_1 ); r( wxHTML_FONT_SIZE_2 ); r( wxHTML_FONT_SIZE_3 ); r( wxHTML_FONT_SIZE_4 ); r( wxHTML_FONT_SIZE_5 ); r( wxHTML_FONT_SIZE_6 ); r( wxHTML_FONT_SIZE_7 ); #endif r( wxHTML_ALIGN_JUSTIFY ); r( wxHTML_BLOCK ); r( wxHTML_BUFLEN ); r( wxHTML_OPEN ); #if WXPERL_W_VERSION_LT( 2, 9, 2 ) r( wxHTML_PRINT_MAX_PAGES ); #endif r( wxHTML_REDIRECT ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxHTML_SCRIPT_NORMAL ); r( wxHTML_SCRIPT_SUB ); r( wxHTML_SCRIPT_SUP ); #endif r( wxHTML_SCROLL_STEP ); r( wxHTML_SEL_CHANGING ); r( wxHTML_SEL_IN ); r( wxHTML_SEL_OUT ); r( wxHTML_URL_IMAGE ); r( wxHTML_URL_OTHER ); r( wxHTML_URL_PAGE ); break; case 'P': #if wxPERL_USE_PRINTING_ARCHITECTURE r( wxPAGE_ODD ); r( wxPAGE_EVEN ); r( wxPAGE_ALL ); #endif break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants html_module( &html_constant ); Wx-0.9923/ext/html/Html.xs000664000000000000 453312306612245 13513 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/html/Html.xs // Purpose: XS for Wx::Html* // Author: Mattia Barbon // Modified by: // Created: 10/03/2001 // RCS-ID: $Id: Html.xs 3281 2012-05-06 07:25:12Z mdootson $ // Copyright: (c) 2001-2004, 2006, 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 ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include #undef THIS #define wxDefaultValidatorPtr (wxValidator*)&wxDefaultValidator // event macros #define SEVT( NAME, ARGS ) wxPli_StdEvent( NAME, ARGS ) #define EVT( NAME, ARGS, ID ) wxPli_Event( NAME, ARGS, ID ) // !package: Wx::Event // !tag: // !parser: sub { $_[0] =~ m<^\s*S?EVT\(\s*(\w+)\s*\,> } static wxPliEventDescription evts[] = { #if WXPERL_W_VERSION_GE( 2, 7, 2 ) EVT( EVT_HTML_CELL_CLICKED, 3, wxEVT_COMMAND_HTML_CELL_CLICKED ) EVT( EVT_HTML_CELL_HOVER, 3, wxEVT_COMMAND_HTML_CELL_HOVER ) EVT( EVT_HTML_LINK_CLICKED, 3, wxEVT_COMMAND_HTML_LINK_CLICKED ) #endif { 0, 0, 0 } }; MODULE=Wx__Html BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/HtmlWindow.xsp INCLUDE: XS/HtmlHelpController.xs #if wxPERL_USE_PRINTING_ARCHITECTURE INCLUDE: XS/HtmlEasyPrinting.xs INCLUDE: XS/HtmlDCRenderer.xs #endif INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/HtmlParser.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/HtmlTagHandler.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/HtmlTag.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/HtmlCell.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/HtmlListBox.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/HtmlPrintout.xsp #include "cpp/ht_constants.cpp" #include "cpp/ovl_const.cpp" # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__Html Wx-0.9923/ext/html/lib/000775000000000000 012316265010 12707 5ustar00Mark000000000000Wx-0.9923/ext/html/lib/Wx/000775000000000000 012316265010 13305 5ustar00Mark000000000000Wx-0.9923/ext/html/lib/Wx/Html.pm000664000000000000 446112306612244 14640 0ustar00Mark000000000000############################################################################# ## Name: ext/html/lib/Wx/Html.pm ## Purpose: Wx::Html (pulls in all Wx::Html* stuff) ## Author: Mattia Barbon ## Modified by: ## Created: 17/03/2001 ## RCS-ID: $Id: Html.pm 2084 2007-07-18 21:34:14Z vadz $ ## Copyright: (c) 2001-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::Html; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::load_dll( 'net' ); Wx::load_dll( 'html' ); Wx::wx_boot( 'Wx::Html', $VERSION ); # # properly setup inheritance tree # no strict; package Wx::HelpControllerBase; # warning fix package Wx::HtmlWindow; @ISA = qw(Wx::ScrolledWindow); package Wx::HtmlHelpController; @ISA = qw(Wx::HelpControllerBase); package Wx::HtmlParser; package Wx::HtmlWinParser; @ISA = qw(Wx::HtmlParser); package Wx::HtmlTag; package Wx::PlHtmlTag; @ISA = qw(Wx::HtmlTag); package Wx::HtmlTagHandler; package Wx::PlHtmlTagHandler; @ISA = qw(Wx::HtmlTagHandler); package Wx::HtmlWinTagHandler; @ISA = qw(Wx::HtmlTagHandler); package Wx::PlHtmlWinTagHandler;@ISA = qw(Wx::HtmlWinTagHandler); package Wx::HtmlCell; package Wx::HtmlWordCell; @ISA = qw(Wx::HtmlCell); package Wx::HtmlContainerCell; @ISA = qw(Wx::HtmlCell); package Wx::HtmlFontCell; @ISA = qw(Wx::HtmlCell); package Wx::HtmlColourCell; @ISA = qw(Wx::HtmlCell); package Wx::HtmlWidgetCell; @ISA = qw(Wx::HtmlCell); package Wx::HtmlListBox; @ISA = qw(Wx::VListBox); package Wx::PlHtmlListBox; @ISA = qw(Wx::HtmlListBox); package Wx::SimpleHtmlListBox; @ISA = qw(Wx::HtmlListBox); package Wx::HtmlCellEvent; @ISA = qw(Wx::CommandEvent); package Wx::HtmlLinkEvent; @ISA = qw(Wx::CommandEvent); package Wx::Event; use strict; sub EVT_HTML_CELL_CLICKED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_HTML_CELL_CLICKED, $_[2] ) } sub EVT_HTML_CELL_HOVER($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_HTML_CELL_HOVER, $_[2] ) } sub EVT_HTML_LINK_CLICKED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_HTML_LINK_CLICKED, $_[2] ) } 1; # Local variables: # mode: cperl # End: Wx-0.9923/ext/html/Makefile.PL000664000000000000 151112306612245 14176 0ustar00Mark000000000000############################################################################# ## Name: ext/html/Makefile.PL ## Purpose: Makefile.PL for wxHTML ## Author: Mattia Barbon ## Modified by: ## Created: 10/03/2001 ## RCS-ID: $Id: Makefile.PL 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2001-2004, 2006, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::Html', VERSION_FROM => 'lib/Wx/Html.pm', WX_CORE_LIB => 'html core base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/html/t/000775000000000000 012316265011 12405 5ustar00Mark000000000000Wx-0.9923/ext/html/t/01_load.t000775000000000000 32512306612244 14057 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..2\n"; } use strict; use Wx; use Wx::Html; print "ok\n"; print Wx::ClassInfo::FindClass( 'wxHtmlCell' ) ? "ok\n" : "not ok\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/html/t/02_inheritance.t000775000000000000 36112306612244 15432 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::Html; test_inheritance_end(); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/html/t/03_threads.t000775000000000000 145412306612244 14620 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use Test::More tests => 4; use Wx::Html; use Wx::Print; my $app = Wx::App->new( sub { 1 } ); my $easyprint = Wx::HtmlEasyPrinting->new; my $easyprint2 = Wx::HtmlEasyPrinting->new; my $htmldcrenderer = Wx::HtmlDCRenderer->new; my $htmldcrenderer2 = Wx::HtmlDCRenderer->new; my $htmlprintout = Wx::HtmlPrintout->new; my $htmlprintout2 = Wx::HtmlPrintout->new; undef $easyprint2; undef $htmldcrenderer2; undef $htmlprintout2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/html/t/04_taghandlers.t000775000000000000 120612306612244 15456 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use Wx::Html; use lib "../../t"; use Test::More tests => 1; use Tests_Helper qw(in_frame); # this test indirectly tests that wxModule initialization works # in wxPerl submodules in_frame sub { my( $frame ) = @_; my $htmlwin = Wx::HtmlWindow->new( $frame ); $htmlwin->Show; $htmlwin->SetSize( 400, 400 ); $htmlwin->SetPage( "Title

Test

A test

" ); my $text = $htmlwin->ToText; # if tag handlers are correctly initialized, the test will only # contain the actual test is( $text, "\nTest\nA test" ); }; Wx-0.9923/ext/html/t/08_ovl_func.t000775000000000000 124312306612244 15002 0ustar00Mark000000000000#!/usr/bin/perl -w # test that overload dispatch works for # specific functions use strict; use Wx; use Wx::Html; use lib '../../t'; use Test::More 'tests' => 3; use Tests_Helper qw(test_app :overload); my $nolog = Wx::LogNull->new; test_app( sub { my $frame = Wx::Frame->new( undef, -1, 'a' ); my $slb = Wx::SimpleHtmlListBox->new( $frame, -1, [ -1, -1 ], [ -1, -1 ], [] ); test_override { $slb->Append( [ 'a', 'b', 'c' ] ) } 'Wx::SimpleHtmlListBox::AppendStrings'; test_override { $slb->Append( 'a', \1 ) } 'Wx::SimpleHtmlListBox::AppendData'; test_override { $slb->Append( 'a' ) } 'Wx::SimpleHtmlListBox::AppendString'; } ); Wx-0.9923/ext/html/typemap000664000000000000 336312306612244 13634 0ustar00Mark000000000000############################################################################# ## Name: ext/html/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 17/03/2001 ## RCS-ID: $Id: typemap 3292 2012-05-16 10:14:55Z mdootson $ ## Copyright: (c) 2001, 2003-2004, 2006-2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxHtmlURLType T_ENUM wxHtmlWindow * O_WXOBJECT wxHtmlLinkInfo * O_NON_WXOBJECT wxHtmlSelection * O_WXOBJECT wxHtmlHelpController * O_WXOBJECT wxBestHelpController * O_WXOBJECT wxHtmlEasyPrinting * O_NON_WXOBJECT_THR wxHtmlDCRenderer * O_NON_WXOBJECT_THR wxHtmlPrintout * O_NON_WXOBJECT wxPrintData * O_WXOBJECT wxPageSetupDialogData * O_WXOBJECT wxHtmlParser * O_WXOBJECT wxHtmlWinParser * O_WXOBJECT wxHtmlTag * O_NON_WXOBJECT wxHtmlTagHandler* O_WXOBJECT wxPlHtmlTagHandler* O_WXOBJECT wxHtmlWinTagHandler* O_WXOBJECT wxPlHtmlWinTagHandler* O_WXOBJECT wxFileSystem * O_WXOBJECT wxFSFile * O_NON_WXOBJECT wxEncodingConverter * O_WXOBJECT wxHtmlCell * O_WXOBJECT wxHtmlWordCell * O_WXOBJECT wxHtmlContainerCell * O_WXOBJECT wxHtmlColourCell * O_WXOBJECT wxHtmlFontCell * O_WXOBJECT wxHtmlWidgetCell * O_WXOBJECT wxHtmlListBox * O_WXEVTHANDLER wxPlHtmlListBox * O_WXEVTHANDLER wxSimpleHtmlListBox * O_WXEVTHANDLER wxFileSystem * O_WXOBJECT_THR wxHtmlCellEvent * O_WXOBJECT_THR wxHtmlLinkEvent * O_WXOBJECT_THR Wx-0.9923/ext/html/typemap.xsp000664000000000000 266112306612245 14446 0ustar00Mark000000000000############################################################################# ## Name: ext/html/typemap.xsp ## Purpose: typemap for XS++ ## Author: Mattia Barbon ## Modified by: ## Created: 30/11/2003 ## RCS-ID: $Id: typemap.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2003-2004 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %typemap{wxHtmlParser*}{simple}; %typemap{wxHtmlWinParser*}{simple}; %typemap{wxFileSystem*}{simple}; %typemap{wxFSFile*}{simple}; %typemap{wxHtmlURLType}{simple}; %typemap{wxHtmlTag*}{simple}; %typemap{wxHtmlTagHandler*}{simple}; %typemap{wxHtmlWinTagHandler*}{simple}; %typemap{wxPlHtmlTagHandler*}{simple}; %typemap{wxPlHtmlWinTagHandler*}{simple}; %typemap{wxHtmlWindow*}{simple}; %typemap{wxHtmlContainerCell*}{simple}; %typemap{const wxHtmlLinkInfo&}{reference}; %typemap{wxFontEncoding}{simple}; %typemap{wxEncodingConverter*}{simple}; %typemap{const wxHtmlTag&}{reference}; %typemap{wxHtmlCell*}{simple}; %typemap{const wxHtmlCell*}{simple}; %typemap{wxHtmlWordCell*}{simple}; %typemap{wxHtmlContainerCell*}{simple}; %typemap{wxHtmlColourCell*}{simple}; %typemap{wxHtmlFontCell*}{simple}; %typemap{wxHtmlWidgetCell*}{simple}; %typemap{wxHtmlLinkInfo*}{simple}; %typemap{wxHtmlSelection*}{simple};Wx-0.9923/ext/html/XS/000775000000000000 012316265011 12474 5ustar00Mark000000000000Wx-0.9923/ext/html/XS/HtmlCell.xsp000664000000000000 1005312306612245 15037 0ustar00Mark000000000000############################################################################# ## Name: ext/html/XS/HtmlCell.xsp ## Purpose: XS++ for Wx::HtmlCell and derived classes ## Author: Mattia Barbon ## Modified by: ## Created: 13/12/2003 ## RCS-ID: $Id: HtmlCell.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2003-2004, 2006 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 %} %name{Wx::HtmlCell} class wxHtmlCell { wxHtmlCell(); void Destroy() %code{% delete THIS; %}; void SetParent(wxHtmlContainerCell *p); wxHtmlContainerCell *GetParent() const; int GetPosX() const; int GetPosY() const; int GetWidth() const; int GetHeight() const; int GetDescent() const; #if WXPERL_W_VERSION_GE( 2, 5, 1 ) bool IsFormattingCell() const; #endif const wxString& GetId() const; void SetId(const wxString& id); wxHtmlLinkInfo* GetLink(int x = 0, int y = 0) const; #if WXPERL_W_VERSION_GE( 2, 5, 1 ) && WXPERL_W_VERSION_LT( 2, 7, 0 ) wxCursor GetCursor() const; #endif wxHtmlCell *GetNext() const; #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxHtmlCell* GetFirstChild() const; #endif void SetPos(int x, int y); void SetLink(const wxHtmlLinkInfo& link); void SetNext(wxHtmlCell *cell); void Layout(int w); ## void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, ## wxHtmlRenderingInfo& info); ## void DrawInvisible(wxDC& dc, int x, int y, wxHtmlRenderingInfo& info); ## const wxHtmlCell* Find(int condition, const void* param) const; ## void OnMouseClick(wxWindow *parent, int x, int y, ## const wxMouseEvent& event); ## bool AdjustPagebreak(int *pagebreak, int *known_pagebreaks = NULL, ## int number_of_pages = 0) const; void SetCanLiveOnPagebreak(bool can); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) bool IsLinebreakAllowed() const; #endif bool IsTerminalCell() const; #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y, unsigned flags = wxHTML_FIND_EXACT) const; wxPoint GetAbsPos() const; wxHtmlCell *GetFirstTerminal() const; wxHtmlCell *GetLastTerminal() const; unsigned GetDepth() const; bool IsBefore(wxHtmlCell *cell) const; wxString ConvertToText(wxHtmlSelection *sel) const; #else wxHtmlCell *FindCellByPos(wxCoord x, wxCoord y) const; #endif }; %name{Wx::HtmlWordCell} class wxHtmlWordCell { ## wxHtmlWordCell(const wxString& word, wxDC& dc); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) void SetPreviousWord(wxHtmlWordCell *cell); #endif }; %name{Wx::HtmlContainerCell} class wxHtmlContainerCell { wxHtmlContainerCell(wxHtmlContainerCell *parent); void InsertCell(wxHtmlCell *cell); void SetAlignHor(int al); int GetAlignHor() const; void SetAlignVer(int al); int GetAlignVer() const; void SetIndent(int i, int what, int units = wxHTML_UNITS_PIXELS); int GetIndent(int ind) const; int GetIndentUnits(int ind) const; void SetAlign(const wxHtmlTag& tag); void SetWidthFloat(int w, int units); %name{SetWidthFloatTag} void SetWidthFloat(const wxHtmlTag& tag, double pixel_scale = 1.0); void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP); void SetBackgroundColour(const wxColour& clr); wxColour GetBackgroundColour(); void SetBorder(const wxColour& clr1, const wxColour& clr2); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) void RemoveExtraSpacing(bool top, bool bottom); #endif }; %name{Wx::HtmlColourCell} class wxHtmlColourCell { wxHtmlColourCell(const wxColour& clr, int flags = wxHTML_CLR_FOREGROUND); }; %name{Wx::HtmlFontCell} class wxHtmlFontCell { wxHtmlFontCell(wxFont *font); }; %name{Wx::HtmlWidgetCell} class wxHtmlWidgetCell { wxHtmlWidgetCell(wxWindow* window, int w = 0); }; Wx-0.9923/ext/html/XS/HtmlDCRenderer.xs000664000000000000 471712306612245 15747 0ustar00Mark000000000000############################################################################# ## Name: ext/html/XS/HtmlDCRenderer.xs ## Purpose: XS for Wx::HtmlDCRenderer ## Author: Mark Dootson ## Modified by: ## Created: 20/00/2006 ## RCS-ID: $Id: HtmlDCRenderer.xs 2566 2009-05-17 14:10:06Z mbarbon $ ## Copyright: (c) 2006, 2009 Mark Dootson ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include MODULE=Wx PACKAGE=Wx::HtmlDCRenderer wxHtmlDCRenderer* wxHtmlDCRenderer::new() static void wxHtmlDCRenderer::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxHtmlDCRenderer::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::HtmlDCRenderer", THIS, ST(0) ); delete THIS; void wxHtmlDCRenderer::SetDC( dc, pixel_scale = 1.0 ) wxDC* dc double pixel_scale void wxHtmlDCRenderer::SetSize(width, height) int width int height void wxHtmlDCRenderer::SetHtmlText( htmlText, basepath = wxEmptyString, isdir = 1 ) wxString htmlText wxString basepath bool isdir void wxHtmlDCRenderer::SetFonts( normal_face, fixed_face, sizes ) wxString normal_face wxString fixed_face SV* sizes PREINIT: int* array; int n = wxPli_av_2_intarray( aTHX_ sizes, &array ); CODE: if( n != 7 ) { delete[] array; croak( "Specified %d sizes, 7 wanted", n ); } THIS->SetFonts( normal_face, fixed_face, array ); delete[] array; #if WXPERL_W_VERSION_GE( 2, 7, 0 ) int wxHtmlDCRenderer::Render(x, y, pagebreaks, from = 0, dont_render = 0, to = INT_MAX) int x int y wxArrayInt pagebreaks int from int dont_render int to #else int wxHtmlDCRenderer::Render(x, y, from = 0, dont_render = 0, maxHeight = INT_MAX, pagebreaks, number_of_pages = 0) int x int y int from int dont_render int maxHeight SV* pagebreaks int number_of_pages PREINIT: int* array; int n = wxPli_av_2_intarray( aTHX_ pagebreaks, &array ); CODE: RETVAL = THIS->Render( x, y, from, dont_render, maxHeight, ( n == 0 ? NULL : array ), number_of_pages); delete[] array; OUTPUT: RETVAL #endif int wxHtmlDCRenderer::GetTotalHeight() Wx-0.9923/ext/html/XS/HtmlEasyPrinting.xs000664000000000000 511212306612245 16374 0ustar00Mark000000000000############################################################################# ## Name: ext/html/XS/HtmlEasyPrinting.xs ## Purpose: XS for Wx::HtmlEasyPrinting ## Author: Mattia Barbon ## Modified by: ## Created: 04/05/2001 ## RCS-ID: $Id: HtmlEasyPrinting.xs 2134 2007-08-11 21:32:25Z mbarbon $ ## Copyright: (c) 2001-2004, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::HtmlEasyPrinting #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxHtmlEasyPrinting* wxHtmlEasyPrinting::new( wxString name = wxT("Printing"), \ wxWindow* parent = 0 ) #else wxHtmlEasyPrinting* wxHtmlEasyPrinting::new( name = wxT("Printing"), parent_frame = 0 ) wxString name wxFrame* parent_frame #endif static void wxHtmlEasyPrinting::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxHtmlEasyPrinting::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::HtmlEasyPrinting", THIS, ST(0) ); delete THIS; bool wxHtmlEasyPrinting::PreviewFile( htmlFile ) wxString htmlFile bool wxHtmlEasyPrinting::PreviewText( htmlText, basepath = wxEmptyString ) wxString htmlText wxString basepath bool wxHtmlEasyPrinting::PrintFile( htmlFile ) wxString htmlFile bool wxHtmlEasyPrinting::PrintText( htmlText, basepath = wxEmptyString ) wxString htmlText wxString basepath #if WXPERL_W_VERSION_LE( 2, 5, 2 ) void wxHtmlEasyPrinting::PrinterSetup() #endif void wxHtmlEasyPrinting::PageSetup() void wxHtmlEasyPrinting::SetHeader( header, pg = wxPAGE_ALL ) wxString header int pg void wxHtmlEasyPrinting::SetFonts( normal_face, fixed_face, sizes ) wxString normal_face wxString fixed_face SV* sizes PREINIT: int* array; int n = wxPli_av_2_intarray( aTHX_ sizes, &array ); CODE: if( n != 7 ) { delete[] array; croak( "Specified %d sizes, 7 wanted", n ); } THIS->SetFonts( normal_face, fixed_face, array ); delete[] array; void wxHtmlEasyPrinting::SetFooter( header, pg = wxPAGE_ALL ) wxString header int pg wxPrintData* wxHtmlEasyPrinting::GetPrintData() wxPageSetupDialogData* wxHtmlEasyPrinting::GetPageSetupData() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxWindow* wxHtmlEasyPrinting::GetParentWindow() void wxHtmlEasyPrinting::SetParentWindow( window ) wxWindow* window #endif Wx-0.9923/ext/html/XS/HtmlHelpController.xs000664000000000000 407612306612245 16724 0ustar00Mark000000000000############################################################################# ## Name: ext/html/XS/HtmlHelpController.xs ## Purpose: XS for Wx::HtmlHelpController ## Author: Mattia Barbon ## Modified by: ## Created: 21/03/2001 ## RCS-ID: $Id: HtmlHelpController.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001, 2003-2004, 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 #if defined(__WXMSW__) #if wxPERL_USE_BESTHELP #include #undef THIS MODULE=Wx PACKAGE=Wx::BestHelpController #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxBestHelpController* wxBestHelpController::new( parent = NULL, style = wxHF_DEFAULT_STYLE ) wxWindow* parent int style #else wxBestHelpController* wxBestHelpController::new() #endif #endif #endif MODULE=Wx PACKAGE=Wx::HtmlHelpController wxHtmlHelpController* wxHtmlHelpController::new( style = wxHF_DEFAULTSTYLE ) long style CODE: RETVAL = new wxHtmlHelpController( style ); OUTPUT: RETVAL bool wxHtmlHelpController::AddBook( book, show_wait ) wxString book bool show_wait void wxHtmlHelpController::Display( x ) wxString x void wxHtmlHelpController::DisplayId( id ) int id CODE: THIS->Display( id ); void wxHtmlHelpController::DisplayContents() void wxHtmlHelpController::DisplayIndex() bool wxHtmlHelpController::KeywordSearch( keyword ) wxString keyword void wxHtmlHelpController::ReadCustomization( cfg, path = wxEmptyString ) wxConfigBase* cfg wxString path void wxHtmlHelpController::SetTempDir( path ) wxString path void wxHtmlHelpController::SetTitleFormat( format ) wxString format void wxHtmlHelpController::UseConfig( config, path = wxEmptyString ) wxConfigBase* config wxString path void wxHtmlHelpController::WriteCustomization( cfg, path = wxEmptyString ) wxConfigBase* cfg wxString path Wx-0.9923/ext/html/XS/HtmlListBox.xsp000664000000000000 1606112306612245 15551 0ustar00Mark000000000000############################################################################# ## Name: ext/html/XS/HtmlListBox.xsp ## Purpose: XS++ for Wx::HtmlListBox ## Author: Mattia Barbon ## Modified by: ## Created: 19/09/2006 ## RCS-ID: $Id: HtmlListBox.xsp 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2006-2007, 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}; %typemap{wxHtmlListBox*}{simple}; %typemap{wxPlHtmlListBox*}{simple}; %typemap{wxSimpleHtmlListBox*}{simple}; %typemap{wxFileSystem*}{simple}; #if WXPERL_W_VERSION_GE( 2, 5, 0 ) #include #include "cpp/helpers.h" #include #include "cpp/overload.h" #include "xspp/htmllbox.h" %file{xspp/htmllbox.h}; %{ #include "cpp/v_cback.h" // bool METH(size_t) #define DEC_V_CBACK_WXSTRING__SIZET_( METHOD, CONST ) \ wxString METHOD( size_t ) CONST #define DEF_V_CBACK_WXSTRING__SIZET_( CLASS, CALLBASE, METHOD, CONST )\ wxString CLASS::METHOD( size_t p1 ) CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, \ "L", p1 ) ); \ wxString value; \ WXSTRING_INPUT( value, wxChar*, ret ); \ return value; \ } else \ CALLBASE; \ } #define DEC_V_CBACK_WXSTRING__SIZET_const( METHOD ) \ DEC_V_CBACK_WXSTRING__SIZET_( METHOD, wxPli_CONST ) #define DEF_V_CBACK_WXSTRING__SIZET_const_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_WXSTRING__SIZET_( CLASS, return wxEmptyString, METHOD, wxPli_CONST ) class wxPlHtmlListBox : public wxHtmlListBox { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlHtmlListBox ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPlHtmlListBox, "Wx::HtmlListBox", true ); WXPLI_CONSTRUCTOR_6( wxPlHtmlListBox, "Wx::HtmlListBox", true, wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long, const wxString& ); DEC_V_CBACK_WXCOORD__VOID_const( EstimateTotalHeight ); DEC_V_CBACK_WXSTRING__SIZET_const( OnGetItem ); }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlHtmlListBox, wxHtmlListBox ); DEF_V_CBACK_WXCOORD__VOID_const( wxPlHtmlListBox, wxHtmlListBox, EstimateTotalHeight ); DEF_V_CBACK_WXSTRING__SIZET_const_pure( wxPlHtmlListBox, wxHtmlListBox, OnGetItem ); %} %file{-}; %name{Wx::HtmlListBox} class wxHtmlListBox { bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxVListBoxNameStr ); }; %{ wxFileSystem* wxHtmlListBox::GetFileSystem() CODE: RETVAL = &THIS->GetFileSystem(); OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); %} %name{Wx::PlHtmlListBox} class wxPlHtmlListBox { %name{newDefault} wxPlHtmlListBox() %code{% RETVAL = new wxPlHtmlListBox( CLASS ); %}; %name{newFull} wxPlHtmlListBox( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxEmptyString ) %code{% RETVAL = new wxPlHtmlListBox( CLASS, parent, id, pos, size, style, name ); %}; }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::PlHtmlListBox::new" ) %} #if WXPERL_W_VERSION_GE( 2, 7, 2 ) %name{Wx::SimpleHtmlListBox} class wxSimpleHtmlListBox { %name{newDefault} wxSimpleHtmlListBox() %code{% RETVAL = new wxSimpleHtmlListBox; wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxSimpleHtmlListBox( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, wxArrayString choices, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxSimpleHtmlListBoxNameStr ) %code{% RETVAL = new wxSimpleHtmlListBox( parent, id, pos, size, choices, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, wxArrayString choices, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxSimpleHtmlListBoxNameStr ); void SetSelection( int n ); int GetSelection() const; unsigned int GetCount() const; wxString GetString( unsigned int n ) const; ## wxArrayString GetStrings() const; void SetString( unsigned int n, const wxString& s ); ## void Clear(); %{ void wxSimpleHtmlListBox::Clear() CODE: THIS->wxVListBox::Clear(); %} void Delete( unsigned int n ); %name{AppendStrings} void Append( const wxArrayString& strings ); %name{AppendString} void Append( const wxString& item ); %name{AppendData} void Append( const wxString& item, wxPliUserDataCD* data ); }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::SimpleHtmlListBox::new" ) void Append( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_arr, AppendStrings ) MATCH_REDISP( wxPliOvl_s_s, AppendData ) MATCH_REDISP( wxPliOvl_s, AppendString ) END_OVERLOAD( Wx::SimpleHtmlListBox::Append ) %} #endif #endif Wx-0.9923/ext/html/XS/HtmlParser.xsp000664000000000000 647612306612245 15412 0ustar00Mark000000000000############################################################################# ## Name: ext/html/XS/HtmlParser.xsp ## Purpose: XS++ for Wx::HtmlParser and Wx::HtmlWinParser ## Author: Mattia Barbon ## Modified by: ## Created: 30/11/2003 ## RCS-ID: $Id: HtmlParser.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2003, 2006 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 #include %} %name{Wx::HtmlParser} class wxHtmlParser { ## wxHtmlParser(); ## ~wxHtmlParser(); void SetFS(wxFileSystem *fs); wxFileSystem* GetFS() const; wxFSFile *OpenURL(wxHtmlURLType type, const wxString& url) const; wxObject* Parse(const wxString& source); void InitParser(const wxString& source); void DoneParser(); void StopParsing(); ## void DoParsing(int begin_pos, int end_pos); ## void DoParsing(); wxHtmlTag *GetCurrentTag() const; wxObject* GetProduct(); void AddTagHandler(wxHtmlTagHandler *handler); void PushTagHandler(wxHtmlTagHandler *handler, wxString tags); void PopTagHandler(); ## wxString* GetSource(); void SetSource(const wxString& src); void SetSourceAndSaveState(const wxString& src); bool RestoreState(); }; %name{Wx::HtmlWinParser} class wxHtmlWinParser { ## wxHtmlWinParser(wxHtmlWindow *wnd = NULL); ## ~wxHtmlWinParser(); wxFSFile *OpenURL(wxHtmlURLType type, const wxString& url) const; void SetDC(wxDC *dc, double pixel_scale = 1.0); wxDC *GetDC(); double GetPixelScale(); int GetCharHeight() const; int GetCharWidth() const; #if WXPERL_W_VERSION_LT( 2, 7, 0 ) wxHtmlWindow* GetWindow(); #else wxWindow* GetWindow() %code{% RETVAL = THIS->GetWindowInterface()->GetHTMLWindow(); %}; #endif ## void SetFonts(wxString normal_face, wxString fixed_face, ## const int *sizes = NULL); ## static void AddModule(wxHtmlTagsModule *module); ## static void RemoveModule(wxHtmlTagsModule *module); wxHtmlContainerCell *GetContainer() const; wxHtmlContainerCell *OpenContainer(); wxHtmlContainerCell *SetContainer(wxHtmlContainerCell *c); wxHtmlContainerCell *CloseContainer(); int GetFontSize() const; void SetFontSize(int s); int GetFontBold() const; void SetFontBold(int x); int GetFontItalic() const; void SetFontItalic(int x); int GetFontUnderlined() const; void SetFontUnderlined(int x); int GetFontFixed() const; void SetFontFixed(int x); wxString GetFontFace() const; void SetFontFace(const wxString& face); int GetAlign() const; void SetAlign(int a); const wxColour& GetLinkColor() const; void SetLinkColor(const wxColour& clr); const wxColour& GetActualColor() const; void SetActualColor(const wxColour& clr); const wxHtmlLinkInfo& GetLink() const; void SetLink(const wxHtmlLinkInfo& link); #if !wxUSE_UNICODE void SetInputEncoding(wxFontEncoding enc); wxFontEncoding GetInputEncoding() const; wxFontEncoding GetOutputEncoding() const; wxEncodingConverter *GetEncodingConverter() const; #endif wxFont* CreateCurrentFont(); }; Wx-0.9923/ext/html/XS/HtmlPrintout.xsp000664000000000000 540712306612245 15773 0ustar00Mark000000000000############################################################################# ## Name: ext/html/XS/HtmlPrintout.xsp ## Purpose: XS++ for Wx::HtmlPrintout ## Author: Mark Dootson ## Modified by: ## Created: 3 May 2012 ## RCS-ID: $Id: HtmlParser.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 1012 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 %name{Wx::HtmlPrintout} class wxHtmlPrintout : public %name{Wx::Printout} wxPrintout { public: wxHtmlPrintout(const wxString& title = wxT("Printout")); %name{Destroy} ~wxHtmlPrintout() %code%{ delete THIS; %}; void SetHtmlText(const wxString& html, const wxString &basepath = wxEmptyString, bool isdir = true); void SetHtmlFile(const wxString &htmlfile); void SetHeader(const wxString& header, int pg = wxPAGE_ALL); void SetFooter(const wxString& footer, int pg = wxPAGE_ALL); //void SetFonts(const wxString& normal_face, const wxString& fixed_face, int *sizes = NULL); void SetStandardFonts(int size = -1, const wxString& normal_face = wxEmptyString, const wxString& fixed_face = wxEmptyString); void SetMargins(float top = 25.2, float bottom = 25.2, float left = 25.2, float right = 25.2, float spaces = 5); // wxPrintout stuff: bool OnPrintPage(int page); bool HasPage(int page); // void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); bool OnBeginDocument(int startPage, int endPage); void OnPreparePrinting(); // Adds input filter // NOT Implemented - just use Wx::PlFileSystemHandler instead // static void AddFilter(wxHtmlFilter *filter); // Cleanup static void CleanUpStatics(); %{ void wxHtmlPrintout::GetPageInfo() PREINIT: int minPage, maxPage, pageFrom, pageTo; PPCODE: THIS->wxHtmlPrintout::GetPageInfo( &minPage, &maxPage, &pageFrom, &pageTo ); EXTEND( SP, 4 ); PUSHs( sv_2mortal( newSViv( minPage ) ) ); PUSHs( sv_2mortal( newSViv( maxPage ) ) ); PUSHs( sv_2mortal( newSViv( pageFrom ) ) ); PUSHs( sv_2mortal( newSViv( pageTo ) ) ); void wxHtmlPrintout::SetFonts( normal_face, fixed_face, sizes ) wxString normal_face wxString fixed_face SV* sizes PREINIT: int* array; int n = wxPli_av_2_intarray( aTHX_ sizes, &array ); CODE: if( n != 7 ) { delete[] array; croak( "Specified %d sizes, 7 wanted", n ); } THIS->wxHtmlPrintout::SetFonts( normal_face, fixed_face, array ); delete[] array; %} }; Wx-0.9923/ext/html/XS/HtmlTag.xsp000664000000000000 363012306612245 14656 0ustar00Mark000000000000############################################################################# ## Name: ext/html/XS/HtmlTag.xsp ## Purpose: XS for Wx::HtmlTag ## Author: Mattia Barbon ## Modified by: ## Created: 30/11/2003 ## RCS-ID: $Id: HtmlTag.xsp 2234 2007-09-30 20:34:36Z mbarbon $ ## Copyright: (c) 2003-2004, 2007 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 %} %name{Wx::HtmlTag} class wxHtmlTag { wxHtmlTag *GetParent() const; wxHtmlTag *GetFirstSibling() const; wxHtmlTag *GetLastSibling() const; wxHtmlTag *GetChildren() const; wxHtmlTag *GetPreviousSibling() const; wxHtmlTag *GetNextSibling() const; wxHtmlTag *GetNextTag() const; wxString GetName() const; bool HasParam(const wxString& par) const; wxString GetParam(const wxString& par, bool with_commas = false) const; ## int ScanParam(const wxString& par, const wxChar *format, ## void *param) const; wxString GetAllParams() const; bool HasEnding() const; #if WXPERL_W_VERSION_LT( 2, 9, 0 ) int GetBeginPos() const; int GetEndPos1() const; int GetEndPos2() const; #endif }; %{ void wxHtmlTag::GetParamAsColour( wxString par ) PPCODE: wxColour col; bool ret = THIS->GetParamAsColour( par, &col ); EXTEND( SP, 2 ); XPUSHs( newSViv( ret ) ); XPUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), ( ret ? new wxColour( col ) : NULL ), "Wx::Colour" ) ); void wxHtmlTag::GetParamAsInt(wxString par) PPCODE: int val; bool ret = THIS->GetParamAsInt( par, &val ); EXTEND( SP, 2 ); XPUSHs( newSViv( ret ) ); XPUSHs( newSViv( val ) ); %} Wx-0.9923/ext/html/XS/HtmlTagHandler.xsp000664000000000000 776012306612245 16164 0ustar00Mark000000000000############################################################################# ## Name: ext/html/XS/HtmlTagHandler.xsp ## Purpose: XS for Wx::HtmlTagHandler ## Author: Mattia Barbon ## Modified by: ## Created: 30/11/2003 ## RCS-ID: $Id: HtmlTagHandler.xsp 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2003-2004, 2007, 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 #include "xspp/htmltag.h" %file{xspp/htmltag.h}; %{ #include "cpp/v_cback.h" #define DEC_V_CBACK_BOOL__WXHTMLTAG( NAME ) \ bool NAME( const wxHtmlTag& tag ); #if 0 #define DEF_V_CBACK_BOOL__WXHTMLTAG_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_BOOL__WXOBJECTs_( const wxHtmlTag&, CLASS, return false, \ METHOD, wxPli_NOCONST ) #endif #define DEF_V_CBACK_BOOL__WXHTMLTAG_pure( CLASS, BASE, METHOD ) \ bool CLASS::METHOD( const wxHtmlTag& p1 ) \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, \ G_SCALAR|G_DISCARD, \ "q", &p1, "Wx::HtmlTag" ) ); \ return SvTRUE( ret ); \ } else \ return false; \ } class wxPlHtmlTagHandler : public wxHtmlTagHandler { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlHtmlTagHandler ); WXPLI_DECLARE_V_CBACK(); public: wxPlHtmlTagHandler( const char* package ) :m_callback( "Wx::PlHtmlTagHandler" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } wxHtmlParser* GetParser() { return m_Parser; } DEC_V_CBACK_WXSTRING__VOID( GetSupportedTags ); DEC_V_CBACK_BOOL__WXHTMLTAG( HandleTag ); }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlHtmlTagHandler, wxHtmlTagHandler ); DEF_V_CBACK_WXSTRING__VOID_pure( wxPlHtmlTagHandler, wxHtmlTagHandler, GetSupportedTags ); DEF_V_CBACK_BOOL__WXHTMLTAG_pure( wxPlHtmlTagHandler, wxHtmlTagHandler, HandleTag ); class wxPlHtmlWinTagHandler : public wxHtmlWinTagHandler { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlHtmlWinTagHandler ); WXPLI_DECLARE_V_CBACK(); public: wxPlHtmlWinTagHandler( const char* package ) :m_callback( "Wx::PlHtmlWinTagHandler" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } wxHtmlWinParser* GetParser() { return m_WParser; } DEC_V_CBACK_WXSTRING__VOID( GetSupportedTags ); DEC_V_CBACK_BOOL__WXHTMLTAG( HandleTag ); }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlHtmlWinTagHandler, wxHtmlWinTagHandler ); DEF_V_CBACK_WXSTRING__VOID_pure( wxPlHtmlWinTagHandler, wxHtmlWinTagHandler, GetSupportedTags ); DEF_V_CBACK_BOOL__WXHTMLTAG_pure( wxPlHtmlWinTagHandler, wxHtmlWinTagHandler, HandleTag ); %} %file{-}; %name{Wx::HtmlTagHandler} class wxHtmlTagHandler { void SetParser(wxHtmlParser *parser); wxString GetSupportedTags(); bool HandleTag(const wxHtmlTag& tag); }; %name{Wx::HtmlWinTagHandler} class wxHtmlWinTagHandler { }; %name{Wx::PlHtmlTagHandler} class wxPlHtmlTagHandler { wxPlHtmlTagHandler() %code{% RETVAL = new wxPlHtmlTagHandler( CLASS ); %}; wxHtmlParser* GetParser(); }; %name{Wx::PlHtmlWinTagHandler} class wxPlHtmlWinTagHandler { wxPlHtmlWinTagHandler() %code{% RETVAL = new wxPlHtmlWinTagHandler( CLASS ); %}; wxHtmlWinParser* GetParser(); }; Wx-0.9923/ext/html/XS/HtmlWindow.xsp000664000000000000 732312306612245 15415 0ustar00Mark000000000000############################################################################# ## Name: ext/html/XS/HtmlWindow.xsp ## Purpose: XS for Wx::HtmlWindow ## Author: Mattia Barbon ## Modified by: ## Created: 17/03/2001 ## RCS-ID: $Id: HtmlWindow.xsp 2938 2010-07-04 12:56:48Z mbarbon $ ## Copyright: (c) 2001-2006, 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}; %typemap{wxMouseEvent&}{reference}; %{ #include #include #include "cpp/htmlwindow.h" %} #if WXPERL_W_VERSION_GE( 2, 7, 2 ) %name{Wx::HtmlCellEvent} class wxHtmlCellEvent { wxHtmlCell* GetCell() const; wxPoint GetPoint() const; wxMouseEvent& GetMouseEvent() const; void SetLinkClicked( bool linkclicked ); bool GetLinkClicked() const; }; %name{Wx::HtmlLinkEvent} class wxHtmlLinkEvent { const wxHtmlLinkInfo& GetLinkInfo() const; }; #endif %{ MODULE=Wx PACKAGE=Wx::HtmlLinkInfo wxMouseEvent* wxHtmlLinkInfo::GetEvent() CODE: RETVAL = (wxMouseEvent*) THIS->GetEvent(); OUTPUT: RETVAL wxHtmlCell* wxHtmlLinkInfo::GetHtmlCell() CODE: RETVAL = (wxHtmlCell*) THIS->GetHtmlCell(); OUTPUT: RETVAL wxString wxHtmlLinkInfo::GetHref() wxString wxHtmlLinkInfo::GetTarget() MODULE=Wx PACKAGE=Wx::HtmlWindow wxHtmlWindow* wxHtmlWindow::new( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxHW_SCROLLBAR_AUTO, name = wxT("htmlWindow") ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxPliHtmlWindow( CLASS, parent, id, pos, size, style, name ); OUTPUT: RETVAL bool wxHtmlWindow::AppendToPage( source ) wxString source wxString wxHtmlWindow::GetOpenedAnchor() wxString wxHtmlWindow::GetOpenedPage() wxString wxHtmlWindow::GetOpenedPageTitle() wxHtmlWinParser* wxHtmlWindow::GetParser() wxFrame* wxHtmlWindow::GetRelatedFrame() bool wxHtmlWindow::HistoryBack() bool wxHtmlWindow::HistoryCanForward() bool wxHtmlWindow::HistoryCanBack() void wxHtmlWindow::HistoryClear() bool wxHtmlWindow::HistoryForward() bool wxHtmlWindow::LoadFile( filename ) wxString filename bool wxHtmlWindow::LoadPage( location ) wxString location void wxHtmlWindow::OnLinkClicked( info ) wxHtmlLinkInfo* info CODE: THIS->wxHtmlWindow::OnLinkClicked( *info ); void wxHtmlWindow::OnSetTitle( title ) wxString title CODE: THIS->wxHtmlWindow::OnSetTitle( title ); void wxHtmlWindow::ReadCustomization( cfg, path = wxEmptyString ) wxConfigBase* cfg wxString path void wxHtmlWindow::SetBorders( b ) int b void wxHtmlWindow::SetFonts( normal_face, fixed_face, sizes ) wxString normal_face wxString fixed_face SV* sizes PREINIT: int* array; int n = wxPli_av_2_intarray( aTHX_ sizes, &array ); CODE: if( n != 7 ) { delete[] array; croak( "Specified %d sizes, 7 wanted", n ); } THIS->SetFonts( normal_face, fixed_face, array ); delete[] array; bool wxHtmlWindow::SetPage( source ) wxString source void wxHtmlWindow::SetRelatedFrame( frame, format ) wxFrame* frame wxString format void wxHtmlWindow::SetRelatedStatusBar( bar ) int bar #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxHtmlWindow::SelectWord( pos ) wxPoint pos void wxHtmlWindow::SelectLine( pos ) wxPoint pos void wxHtmlWindow::SelectAll() wxString wxHtmlWindow::SelectionToText() wxString wxHtmlWindow::ToText() #endif void wxHtmlWindow::WriteCustomization( cfg, path = wxEmptyString ) wxConfigBase* cfg wxString path %} Wx-0.9923/ext/ipc/000775000000000000 012316265011 11751 5ustar00Mark000000000000Wx-0.9923/ext/ipc/cpp/000775000000000000 012316265010 12532 5ustar00Mark000000000000Wx-0.9923/ext/ipc/cpp/ipc.h000664000000000000 3045612306612253 13572 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/ipc/cpp/ipc.h // Purpose: c++ wrapper for wxIPC // Author: Mark Dootson // Modified by: // Created: 2013-04-12 // RCS-ID: $Id: window.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2013 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/v_cback.h" #include // This C++ part is written longhand rather than in XS/IPC.xsp // because Wx::XSP::Virtual cannot currently auto-create a // Perlish wrapper for methods with *buffer, *buffsize // type params. class wxPlConnection : public wxConnection { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlConnection ); WXPLI_DECLARE_V_CBACK(); public: SV* GetSelf() { return m_callback.GetSelf(); } /******************************************************* * Constructors *******************************************************/ wxPlConnection( const char* CLASS ) : wxConnection( ), m_callback( "Wx::Connection" ) { m_callback.SetSelf( wxPli_make_object( this, CLASS ), true ); } #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxPlConnection( const char* CLASS , void* buffer, size_t size ) #else wxPlConnection( const char* CLASS , wxChar* buffer, int size ) #endif : wxConnection( buffer, size ), m_callback( "Wx::Connection" ) { m_callback.SetSelf( wxPli_make_object( this, CLASS ), true ); } /******************************************************* * Destructor *******************************************************/ ~wxPlConnection() { dTHX; // only delete this object once wxPli_object_set_deleteable( aTHX_ m_callback.GetSelf() , false ); } /******************************************************* * OnStartAdvise *******************************************************/ bool OnStartAdvise( const wxString& topic, const wxString& item) { dTHX; if( wxPliFCback( aTHX_ &m_callback, "OnStartAdvise" ) ) { wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, "PP", &topic, &item ) ); return SvTRUE( ret ); } else return wxConnection::OnStartAdvise(topic, item); } bool base_OnStartAdvise( const wxString& topic, const wxString& item) { return wxConnection::OnStartAdvise(topic, item); } /******************************************************* * OnStopAdvise *******************************************************/ bool OnStopAdvise( const wxString& topic, const wxString& item) { dTHX; if( wxPliFCback( aTHX_ &m_callback, "OnStopAdvise" ) ) { wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, "PP", &topic, &item ) ); return SvTRUE( ret ); } else return wxConnection::OnStopAdvise(topic, item); } bool base_OnStopAdvise( const wxString& topic, const wxString& item) { return wxConnection::OnStopAdvise(topic, item); } /******************************************************* * OnDisconnect *******************************************************/ bool OnDisconnect( ) { dTHX; // we do not delete the object when the other side of the // connection disconnects us wxPli_object_set_deleteable( aTHX_ m_callback.GetSelf() , false ); if( wxPliFCback( aTHX_ &m_callback, "OnDisconnect" ) ) { wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, NULL ) ); return SvTRUE( ret ); } else return wxConnection::OnDisconnect(); } bool base_OnDisconnect( ) { return wxConnection::OnDisconnect(); } /******************************************************* * OnExecute *******************************************************/ #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool OnExecute( const wxString& topic, const void *data, size_t buffsize, wxIPCFormat format ) #else bool OnExecute( const wxString& topic, wxChar *data, int buffsize, wxIPCFormat format ) #endif { dTHX; if( wxPliFCback( aTHX_ &m_callback, "OnExecute" ) ) { #if WXPERL_W_VERSION_GE( 2, 9, 0 ) && !defined(__WXMSW__) wxString* buff = new wxString((char*)data, (size_t)buffsize); #else wxString* buff = new wxString((wxChar*)data, (size_t)buffsize); #endif wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, "PPi", &topic, buff, format )); delete( buff ); return SvTRUE( ret ); } else return wxConnection::OnExecute(topic, data, buffsize, format); } #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool base_OnExecute( const wxString& topic, const void *data, size_t size, wxIPCFormat format ) #else bool base_OnExecute( const wxString& topic, wxChar *data, int size, wxIPCFormat format ) #endif { return wxConnection::OnExecute(topic, data, size, format); } /******************************************************* * OnExec *******************************************************/ #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool OnExec( const wxString& topic, const wxString& data ) { dTHX; if( wxPliFCback( aTHX_ &m_callback, "OnExec" ) ) { wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, "PP", &topic, &data )); return SvTRUE( ret ); } else return wxConnection::OnExec(topic, data); } bool base_OnExec( const wxString& topic, const wxString& data ) { return wxConnection::OnExec(topic, data); } #endif /******************************************************* * OnRequest *******************************************************/ #if WXPERL_W_VERSION_GE( 2, 9, 0 ) virtual const void *OnRequest(const wxString& topic, const wxString& item, size_t *size, wxIPCFormat format) #else virtual wxChar *OnRequest( const wxString& topic, const wxString& item, int *size, wxIPCFormat format ) #endif { dTHX; if( wxPliFCback( aTHX_ &m_callback, "OnRequest" ) ) { SV* ret = wxPliCCback( aTHX_ &m_callback, G_SCALAR, "PPi", &topic, &item, format ); *size = SvLEN(ret); wxChar* buf = (wxChar*)SvPV_force(ret, SvLEN(ret)); sv_2mortal( ret ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) return (void*)buf; #else return (wxChar*)buf; #endif } else return wxConnection::OnRequest(topic, item, size, format); } #if WXPERL_W_VERSION_GE( 2, 9, 0 ) virtual const void *base_OnRequest(const wxString& topic, const wxString& item, size_t *size, wxIPCFormat format) #else virtual wxChar *base_OnRequest( const wxString& topic, const wxString& item, int *size, wxIPCFormat format ) #endif { return wxConnection::OnRequest(topic,item,size,format); } /******************************************************* * OnPoke *******************************************************/ #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool OnPoke( const wxString& topic, const wxString& item, const void *data, size_t buffsize, wxIPCFormat format ) #else bool OnPoke( const wxString& topic, const wxString& item, wxChar *data, int buffsize, wxIPCFormat format ) #endif { dTHX; if( wxPliFCback( aTHX_ &m_callback, "OnPoke" ) ) { SV* buff = newSVpvn((char*)data, (size_t)buffsize); wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, "PPsi", &topic, &item, buff, format )); SvREFCNT_dec( buff ); return SvTRUE( ret ); } else return wxConnection::OnPoke(topic, item, data, buffsize, format); } #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool base_OnPoke( const wxString& topic, const wxString& item, const void *data, size_t size, wxIPCFormat format ) #else bool base_OnPoke( const wxString& topic, const wxString& item, wxChar *data, int size, wxIPCFormat format ) #endif { return wxConnection::OnPoke(topic, item, data, size, format); } /******************************************************* * OnAdvise *******************************************************/ #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool OnAdvise( const wxString& topic, const wxString& item, const void *data, size_t buffsize, wxIPCFormat format ) #else bool OnAdvise( const wxString& topic, const wxString& item, wxChar *data, int buffsize, wxIPCFormat format ) #endif { dTHX; if( wxPliFCback( aTHX_ &m_callback, "OnAdvise" ) ) { SV* buff = newSVpvn((char*)data, (size_t)buffsize); wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, "PPsi", &topic, &item, buff, format )); SvREFCNT_dec( buff ); return SvTRUE( ret ); } else return wxConnection::OnAdvise(topic, item, data, buffsize, format); } #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool base_OnAdvise( const wxString& topic, const wxString& item, const void *data, size_t size, wxIPCFormat format ) #else bool base_OnAdvise( const wxString& topic, const wxString& item, wxChar *data, int size, wxIPCFormat format ) #endif { return wxConnection::OnAdvise(topic, item, data, size, format); } }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlConnection, wxConnection ); class wxPlServer : public wxServer { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlServer ); WXPLI_DECLARE_V_CBACK(); public: SV* GetSelf() { return m_callback.GetSelf(); } /******************************************************* * Constructor *******************************************************/ wxPlServer( const char* CLASS ) : wxServer( ), m_callback( "Wx::Server" ) { m_callback.SetSelf( wxPli_make_object( this, CLASS ), true ); } /******************************************************* * OnAcceptConnection *******************************************************/ wxConnectionBase *OnAcceptConnection(const wxString& topic) { dTHX; if( wxPliFCback( aTHX_ &m_callback, "OnAcceptConnection" ) ) { wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, "P", &topic ) ); return (wxConnectionBase*)wxPli_sv_2_object( aTHX_ ret, "Wx::Connection" ); } else return wxServer::OnAcceptConnection(topic); } wxConnectionBase *base_OnAcceptConnection(const wxString& topic) { return wxServer::OnAcceptConnection(topic); } }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlServer, wxServer ); class wxPlClient : public wxClient { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlClient ); WXPLI_DECLARE_V_CBACK(); public: SV* GetSelf() { return m_callback.GetSelf(); } /******************************************************* * Constructor *******************************************************/ wxPlClient( const char* CLASS ) : wxClient( ), m_callback( "Wx::Client" ) { m_callback.SetSelf( wxPli_make_object( this, CLASS ), true ); } /******************************************************* * OnMakeConnection *******************************************************/ wxConnectionBase *OnMakeConnection() { dTHX; if( wxPliFCback( aTHX_ &m_callback, "OnMakeConnection" ) ) { wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, NULL ) ); return (wxConnectionBase*)wxPli_sv_2_object( aTHX_ ret, "Wx::Connection" ); } else return wxClient::OnMakeConnection(); } wxConnectionBase *base_OnMakeConnection() { return wxClient::OnMakeConnection(); } }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlClient, wxClient ); // local variables: // mode: c++ // end: Wx-0.9923/ext/ipc/IPC.xs000664000000000000 170512306612256 13031 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/ipc/IPC.xs // Purpose: XS for Inter-Process Communication Framework // Author: Mark Dootson // Modified by: // Created: 13 April 2013 // SVN-ID: $Id:$ // Copyright: (c) 2013 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/constants.h" #include "cpp/overload.h" #undef THIS MODULE=Wx__IPC BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); #if wxPERL_USE_IPC INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/IPC.xsp #include "cpp/ovl_const.cpp" #endif # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__IPC Wx-0.9923/ext/ipc/lib/000775000000000000 012316265011 12517 5ustar00Mark000000000000Wx-0.9923/ext/ipc/lib/Wx/000775000000000000 012316265011 13115 5ustar00Mark000000000000Wx-0.9923/ext/ipc/lib/Wx/IPC.pm000664000000000000 305512306612256 14157 0ustar00Mark000000000000############################################################################# ## Name: ext/ipc/lib/Wx/IPC.pm ## Purpose: Wx::IPC ( Iter-Process Communication framework ) ## Author: Mark Dootson ## Modified by: ## Created: 13 Apr 2013 ## RCS-ID: $Id: IPC.pm 3470 2013-04-13 08:38:19Z mdootson $ ## Copyright: (c) 2013 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::IPC; use Wx; use strict; our $VERSION = '0.01'; Wx::load_dll( 'net' ) if !Wx::wxMSW; Wx::wx_boot( 'Wx::IPC', $VERSION ); # # properly setup inheritance tree # no strict; package Wx::Connection; @ISA = qw(Wx::Object); package Wx::Server; @ISA = qw(Wx::Object); package Wx::Client; @ISA = qw(Wx::Object); package Wx::Connectionbase; @ISA = qw(Wx::Connection); package Wx::DDEConnection; @ISA = qw(Wx::Connection); package Wx::DDEServer; @ISA = qw(Wx::Server); package Wx::DDEClient; @ISA = qw(Wx::Client); package Wx::TCPConnection; @ISA = qw(Wx::Connection); package Wx::TCPServer; @ISA = qw(Wx::Server); package Wx::TCPClient; @ISA = qw(Wx::Client); package Wx::PlConnection; @ISA = ( Wx::wxMSW ) ? qw(Wx::DDEConnection) : qw(Wx::TCPConnection); package Wx::PlServer; @ISA = ( Wx::wxMSW ) ? qw(Wx::DDEServer) : qw(Wx::TCPServer); package Wx::PlClient; @ISA = ( Wx::wxMSW ) ? qw(Wx::DDEClient) : qw(Wx::TCPClient); use strict; 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/ipc/Makefile.PL000664000000000000 155012306612256 14012 0ustar00Mark000000000000############################################################################# ## Name: ext/ipc/Makefile.PL ## Purpose: Makefile.PL for Inter-Process Communication Framework ## Author: Mark Dootson ## Modified by: ## Created: 13 April 2013 ## RCS-ID: $Id: Makefile.PL 3470 2013-04-13 08:38:19Z mdootson $ ## Copyright: (c) 2013, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::IPC', VERSION_FROM => 'lib/Wx/IPC.pm', WX_CORE_LIB => 'net core base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/ipc/t/000775000000000000 012316265011 12214 5ustar00Mark000000000000Wx-0.9923/ext/ipc/t/01_load.t000775000000000000 13612306612253 13666 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Test::More tests => 1; use Wx; use_ok( 'Wx::IPC' ); 1; Wx-0.9923/ext/ipc/t/02_inheritance.t000775000000000000 41512306612254 15242 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use if !Wx::_wx_optmod_ipc(), 'Test::More' => skip_all => 'No IPC Support'; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::IPC; test_inheritance_end(); Wx-0.9923/ext/ipc/t/03_threads.t000775000000000000 501312306612254 14423 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use Wx::IPC; use if !Wx::_wx_optmod_ipc(), 'Test::More' => skip_all => 'No IPC Support'; use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use if !Wx::wxMSW, 'Test::More' => skip_all => 'Hangs on none wxMSW platforms'; # the hang is due to deadlock over fifo client / server in same process I think use Test::More tests => 4; my @keeps; { my $servicename1 = create_service_name('WxInstallationTestsOne'); my $servicename2 = create_service_name('WxInstallationTestsTwo'); my $server1 = Wx::Server->new; $server1->Create($servicename1); my $server2 = Wx::Server->new;; $server2->Create($servicename2); my $client1 = Wx::Client->new; my $conn1 = $client1->MakeConnection('', $servicename1, 'Default Topic'); my $client2 = Wx::Client->new; my $conn2 = $client2->MakeConnection('', $servicename2, 'Default Topic'); push @keeps, ($server1, $client1, $conn1); $conn1->Disconnect; $conn2->Disconnect; # $server2, $client2, $conn2 destroyed when current scope ends } my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); sub create_service_name { my($basename) = @_; # Our service name will be a unix domain socket # or an arbitrary DDE name on windows. # We also have to end up with the same path # on the client and the server, of course. # We are going to have 1 instance only # but it would be possible to create # some form of scheme where multiple # instances created some filesystem # directory that a client could query # for available running instances # and their service names. my $servicedir; if( $^O =~ /^mswin/i ) { require Win32; my $FOLDER_LOCAL_APPDATA = 0x001C; $servicedir = Win32::GetFolderPath($FOLDER_LOCAL_APPDATA, 1); $servicedir = Win32::GetShortPathName($servicedir); $servicedir =~ s/\\/\//g; $servicedir .= '/wxIPC'; } elsif( $^O =~ /^darwin/i ) { $servicedir = $ENV{HOME} . '/Library/Application Support/wxIPC'; } else { $servicedir = $ENV{HOME} . '/.wxIPC'; } mkdir($servicedir, 0700) unless -d $servicedir; chmod(0700, $servicedir); my $servicename = qq($servicedir/$basename); return $servicename; } END { ok( 1, 'At END' ) }; Wx-0.9923/ext/ipc/typemap000664000000000000 142112306612253 13434 0ustar00Mark000000000000############################################################################# ## Name: ext/ipc/typemap ## Purpose: typemap ## Author: Mark Dootson ## Modified by: ## Created: 13 April 2013 ## SVN-ID: $Id:$ ## Copyright: (c) 2013 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxConnection * O_WXOBJECT_THR wxPlConnection * O_WXOBJECT_THR wxIPCFormat T_ENUM wxConnectionBase * O_WXOBJECT_THR wxServer * O_WXOBJECT wxClient * O_WXOBJECT wxPlServer * O_WXOBJECT wxPlClient * O_WXOBJECT Wx-0.9923/ext/ipc/XS/000775000000000000 012316265010 12302 5ustar00Mark000000000000Wx-0.9923/ext/ipc/XS/IPC.xsp000664000000000000 1700712306612256 13565 0ustar00Mark000000000000############################################################################# ## Name: XS/IPC.xsp ## Purpose: XS for IPC ## Author: Mark Dootson ## Modified by: ## Created: 11/04/2013 ## RCS-ID: $Id: FontEnumerator.xs 2274 2007-11-10 22:37:30Z mbarbon $ ## Copyright: (c)2013 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}; // The C++ part is written longhand in "cpp/ipc.h" because // build::Wx::XSP::Virtual cannot currently auto create a // Perlish wrapper for methods with *buffer, *buffsize // type params. #if wxUSE_IPC #define wxUSE_DDE_FOR_IPC 1 #include #include %typemap{wxIPCFormat}{simple}; %typemap{wxChar*}{simple}; %loadplugin{build::Wx::XSP::Enum}; %EnumExportTag{ipc}; // dummy defines for wxWidgets 2.8.x #if WXPERL_W_VERSION_LT( 2, 9, 0 ) #define wxIPC_UTF16TEXT 13 #define wxIPC_UTF8TEXT 13 #define wxIPC_UTF32TEXT 13 #endif enum wxIPCFormat { wxIPC_INVALID, wxIPC_TEXT, wxIPC_BITMAP, wxIPC_METAFILE, wxIPC_SYLK, wxIPC_DIF, wxIPC_TIFF, wxIPC_OEMTEXT, wxIPC_DIB, wxIPC_PALETTE, wxIPC_PENDATA, wxIPC_RIFF, wxIPC_WAVE, wxIPC_UNICODETEXT, wxIPC_ENHMETAFILE, wxIPC_FILENAME, wxIPC_LOCALE, wxIPC_PRIVATE, wxIPC_UTF16TEXT, wxIPC_UTF8TEXT, wxIPC_UTF32TEXT, }; %{ MODULE=Wx PACKAGE=Wx::Connection void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newBuffer ) END_OVERLOAD( "Wx::Connection::new" ) wxConnection* newDefault( CLASS ) char* CLASS CODE: RETVAL = new wxPlConnection( CLASS ); OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), true ); wxConnection* newBuffer( CLASS, buffer ) char* CLASS SV* buffer CODE: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) RETVAL = new wxPlConnection( CLASS, (void*)SvPVX(buffer), (size_t)SvCUR(buffer)); #else RETVAL = new wxPlConnection( CLASS, (wxChar*)SvPVX(buffer), (int)SvCUR(buffer)); #endif OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), true ); static void wxConnection::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxConnection::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool wxConnection::Execute( data ) SV* data CODE: RETVAL = THIS->Execute((void*)SvPVX(data), (size_t)SvLEN(data), wxIPC_TEXT); OUTPUT: RETVAL #else bool wxConnection::Execute( data ) wxString data CODE: RETVAL = THIS->Execute( data ); OUTPUT: RETVAL #endif void wxConnection::Request( item, format = wxIPC_TEXT ) wxString item wxIPCFormat format PREINIT: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) size_t size; #else int size; #endif PPCODE: void *buffer = (void*)THIS->Request(item, &size, format); EXTEND( SP, 1 ); PUSHs( sv_2mortal( newSVpvn( (char*)buffer, size) ) ); bool wxConnection::Poke( item, data, format = wxIPC_TEXT ) wxString item SV* data wxIPCFormat format CODE: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) RETVAL = THIS->Poke(item, (void*)SvPVX(data), (size_t)SvCUR(data), format); #else RETVAL = THIS->Poke(item, (wxChar*)SvPVX(data), (int)SvCUR(data), format); #endif OUTPUT: RETVAL bool wxConnection::StartAdvise( item ) wxString item bool wxConnection::StopAdvise( item ) wxString item bool wxConnection::Advise( item, data, format = wxIPC_TEXT ) wxString item SV* data wxIPCFormat format CODE: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) RETVAL = THIS->Advise(item, (void*)SvPVX(data), (size_t)SvCUR(data), format); #else RETVAL = THIS->Advise(item, (wxChar*)SvPVX(data), (int)SvCUR(data), format); #endif OUTPUT: RETVAL bool wxConnection::Disconnect() CODE: wxPli_object_set_deleteable( aTHX_ ST(0), true ); RETVAL = THIS->Disconnect(); OUTPUT: RETVAL bool wxConnection::GetConnected() void wxConnection::SetConnected( connected ) bool connected bool wxConnection::OnStartAdvise( topic, item ) wxString topic wxString item CODE: RETVAL = ((wxPlConnection*)THIS)->base_OnStartAdvise(topic, item); OUTPUT: RETVAL bool wxConnection::OnStopAdvise( topic, item ) wxString topic wxString item CODE: RETVAL = ((wxPlConnection*)THIS)->base_OnStopAdvise(topic, item); OUTPUT: RETVAL bool wxConnection::OnDisconnect() CODE: RETVAL = ((wxPlConnection*)THIS)->base_OnDisconnect(); OUTPUT: RETVAL bool wxConnection::OnExecute(topic, data, format) wxString topic SV* data wxIPCFormat format CODE: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) RETVAL = ((wxPlConnection*)THIS)->base_OnExecute(topic, (void*)SvPVX(data), (size_t)SvLEN(data), format); #else RETVAL = ((wxPlConnection*)THIS)->base_OnExecute(topic, (wxChar*)SvPVX(data), (int)SvLEN(data), format); #endif OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool wxConnection::OnExec(topic, data) wxString topic wxString data CODE: RETVAL = ((wxPlConnection*)THIS)->base_OnExec(topic, data); OUTPUT: RETVAL #endif void wxConnection::OnRequest(topic, item, format) wxString topic wxString item wxIPCFormat format PREINIT: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) size_t size; #else int size; #endif PPCODE: void *buffer = (void*)((wxPlConnection*)THIS)->base_OnRequest(topic, item, &size, format); EXTEND( SP, 1 ); PUSHs( sv_2mortal( newSVpvn( (char*)buffer, size ) ) ); bool wxConnection::OnPoke(topic, item, data, format) wxString topic wxString item SV* data wxIPCFormat format CODE: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) RETVAL = ((wxPlConnection*)THIS)->base_OnPoke(topic, item, (void*)SvPVX(data), (size_t)SvLEN(data), format); #else RETVAL = ((wxPlConnection*)THIS)->base_OnPoke(topic, item, (wxChar*)SvPVX(data), (int)SvLEN(data), format); #endif OUTPUT: RETVAL bool wxConnection::OnAdvise(topic, item, data, format) wxString topic wxString item SV* data wxIPCFormat format CODE: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) RETVAL = ((wxPlConnection*)THIS)->base_OnAdvise(topic, item, (void*)SvPVX(data), (size_t)SvLEN(data), format); #else RETVAL = ((wxPlConnection*)THIS)->base_OnAdvise(topic, item, (wxChar*)SvPVX(data), (int)SvLEN(data), format); #endif OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::Server wxServer* new( CLASS ) char* CLASS CODE: RETVAL = new wxPlServer( CLASS ); OUTPUT: RETVAL void wxServer::Destroy() CODE: delete THIS; bool wxServer::Create( servicename ) wxString servicename wxConnection* wxServer::OnAcceptConnection( topic ) wxString topic CODE: RETVAL = (wxConnection*)((wxPlServer*)THIS)->base_OnAcceptConnection(topic); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::Client wxClient* new( CLASS ) char* CLASS CODE: RETVAL = new wxPlClient( CLASS ); OUTPUT: RETVAL void wxClient::Destroy() CODE: delete THIS; bool wxClient::ValidHost( host ) wxString host wxConnection* wxClient::MakeConnection(host, server, topic ) wxString host wxString server wxString topic CODE: RETVAL = (wxConnection*)THIS->MakeConnection(host, server, topic ); OUTPUT: RETVAL wxConnection* wxClient::OnMakeConnection( ) CODE: RETVAL = (wxConnection*)((wxPlClient*)THIS)->base_OnMakeConnection(); OUTPUT: RETVAL %} #endif Wx-0.9923/ext/Makefile.PL000664000000000000 151112306612240 13225 0ustar00Mark000000000000############################################################################# ## Name: ext/Makefile.PL ## Purpose: Makefile.PL to enable recursion inside subdirs ## Author: Mattia Barbon ## Modified by: ## Created: 02/04/2002 ## RCS-ID: $Id: Makefile.PL 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2002, 2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx', DIR => [ @Wx::build::MakeMaker::Core::subdirs, # for pure perl 'pperl' ], ); # local variables: # mode: cperl # end: Wx-0.9923/ext/mdi/000775000000000000 012316265011 11747 5ustar00Mark000000000000Wx-0.9923/ext/mdi/cpp/000775000000000000 012316265011 12531 5ustar00Mark000000000000Wx-0.9923/ext/mdi/cpp/mdi.h000664000000000000 1076212306612246 13566 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/mdi/cpp/mdi.h // Purpose: c++ wrapper for wxMDI* // Author: Mattia Barbon // Modified by: // Created: 06/09/2001 // RCS-ID: $Id: mdi.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2001, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #ifndef _WXPERL_MDI_H #define _WXPERL_MDI_H #include #include "cpp/v_cback.h" class wxPliMDIParentFrame:public wxMDIParentFrame { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliMDIParentFrame ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPliMDIParentFrame, "Wx::MDIParentFrame", true ); virtual wxStatusBar* OnCreateStatusBar( int, long, wxWindowID, const wxString& ); virtual wxToolBar* OnCreateToolBar( long, wxWindowID, const wxString& ); // void GetClientSize( int* width, int* height ) const; // wxWindow* GetToolBar() const; // wxMDIClientWindow* OnCreateClient(); }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliMDIParentFrame, wxMDIParentFrame ); inline wxStatusBar* wxPliMDIParentFrame::OnCreateStatusBar( int number, long style, wxWindowID id, const wxString& name ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnCreateStatusBar" ) ) { SV* ret = wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_SCALAR, "illP", number, style, id, &name ); wxStatusBar* retval = (wxStatusBar*)wxPli_sv_2_object( aTHX_ ret, "Wx::StatusBar" ); SvREFCNT_dec( ret ); return retval; } else return wxFrame::OnCreateStatusBar( number, style, id, name ); } inline wxToolBar* wxPliMDIParentFrame::OnCreateToolBar( long style, wxWindowID id, const wxString& name ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "OnCreateToolBar" ) ) { SV* ret = wxPliVirtualCallback_CallCallback ( aTHX_ &m_callback, G_SCALAR, "llP", style, id, &name ); wxToolBar* retval = (wxToolBar*)wxPli_sv_2_object( aTHX_ ret, "Wx::ToolBar" ); SvREFCNT_dec( ret ); return retval; } else return wxFrame::OnCreateToolBar( style, id, name ); } # if 0 void GetClientSize( int* width, int* height ) const { if( wxPliVirtualCallback_FindCallback( &m_callback, "GetClientSize" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( &m_callback, G_SCALAR, NULL ); wxSize* val = (wxSize*)wxPli_sv_2_object( ret, "Wx::Size" ); *width = val->x; *height = val->y; SvREFCNT_dec( ret ); } else return wxMDIParentFrame::GetClientSize( width, height ); } #endif #if 0 wxWindow* GetToolBar() const { if( wxPliVirtualCallback_FindCallback( &m_callback, "GetToolBar" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( &m_callback, G_SCALAR, NULL); wxWindow* retval = (wxToolBar*)wxPli_sv_2_object( ret, "Wx::Window" ); SvREFCNT_dec( ret ); return retval; } else return wxMDIParentFrame::GetToolBar(); } #endif // wxMDIClientWindow isn't (yet) implemented #if 0 wxMDIClientWindow* OnCreateClient() { if( wxPliVirtualCallback_FindCallback( &m_callback, "OnCreateClient" ) ) { SV* ret = wxPliVirtualCallback_CallCallback( &m_callback, G_SCALAR, NULL ); wxToolBar* retval = (wxToolBar*)wxPli_sv_2_object( ret, "Wx::MDIClientWindow" ); SvREFCNT_dec( ret ); return retval; } else return wxMDIParentFrame::GetToolBar(); } #endif WXPLI_DECLARE_CLASS_7( MDIChildFrame, true, wxMDIParentFrame*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, long, const wxString& ); WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliMDIChildFrame, wxMDIChildFrame ); #endif // _WXPERL_MDI_H // Local variables: // // mode: c++ // // End: // Wx-0.9923/ext/mdi/lib/000775000000000000 012316265010 12514 5ustar00Mark000000000000Wx-0.9923/ext/mdi/lib/Wx/000775000000000000 012316265010 13112 5ustar00Mark000000000000Wx-0.9923/ext/mdi/lib/Wx/MDI.pm000664000000000000 230412306612247 14147 0ustar00Mark000000000000############################################################################# ## Name: ext/mdi/lib/Wx/MDI.pm ## Purpose: Wx::MDI (pulls in all MDI) ## Author: Mattia Barbon ## Modified by: ## Created: 06/09/2001 ## RCS-ID: $Id: MDI.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2002, 2004 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::MDI; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::wx_boot( 'Wx::MDI', $VERSION ); # init wxModules # # properly setup inheritance tree # no strict; package Wx::MDIParentFrame; @ISA = qw(Wx::Frame); package Wx::MDIChildFrame; @ISA = qw(Wx::Frame); package Wx::MDIClientWindow; @ISA = Wx::wxMOTIF ? 'Wx::Notebook' : 'Wx::Window'; package Wx::GenericMDIParentFrame; @ISA = qw(Wx::MDIParentFrame); package Wx::GenericMDIChildFrame; @ISA = qw(Wx::MDIChildFrame); package Wx::GenericMDIClientWindow; @ISA = qw(Wx::MDIClientWindow); use strict; 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/mdi/Makefile.PL000664000000000000 146112306612247 14011 0ustar00Mark000000000000############################################################################# ## Name: ext/mdi/Makefile.PL ## Purpose: Makefile.PL for MDI ## Author: Mattia Barbon ## Modified by: ## Created: 06/09/2001 ## RCS-ID: $Id: Makefile.PL 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2003 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::MDI', VERSION_FROM => 'lib/Wx/MDI.pm', WX_CORE_LIB => 'core base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/mdi/MDI.xs000664000000000000 150412306612246 13021 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/mdi/MDI.xs // Purpose: XS for MDI // Author: Mattia Barbon // Modified by: // Created: 06/09/2001 // RCS-ID: $Id: MDI.xs 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2001-2002, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #undef THIS MODULE=Wx__MDI BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE: XS/MDIChildFrame.xs INCLUDE: XS/MDIParentFrame.xs # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__MDI Wx-0.9923/ext/mdi/t/000775000000000000 012316265010 12211 5ustar00Mark000000000000Wx-0.9923/ext/mdi/t/01_load.t000775000000000000 21712306612246 13666 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::MDI; print "ok\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/mdi/t/02_inheritance.t000775000000000000 36012306612246 15240 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::MDI; test_inheritance_end(); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/mdi/typemap000664000000000000 146612306612246 13445 0ustar00Mark000000000000############################################################################# ## Name: ext/mdi/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 06/09/2001 ## RCS-ID: $Id: typemap 2517 2008-11-30 20:14:22Z mbarbon $ ## Copyright: (c) 2001, 2003-2004, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxMDIParentFrame * O_WXOBJECT wxMDIChildFrame * O_WXOBJECT wxMDIClientWindow * O_WXOBJECT wxMDIClientWindowBase * O_WXOBJECT wxGenericMDIParentFrame * O_WXOBJECT wxGenericMDIChildFrame * O_WXOBJECT wxGenericMDIClientWindow * O_WXOBJECT Wx-0.9923/ext/mdi/XS/000775000000000000 012316265011 12301 5ustar00Mark000000000000Wx-0.9923/ext/mdi/XS/MDIChildFrame.xs000664000000000000 236112306612250 15267 0ustar00Mark000000000000############################################################################# ## Name: ext/mdi/XS/MDIChildFrame.xs ## Purpose: XS for Wx::MDIChildFrame ## Author: Mattia Barbon ## Modified by: ## Created: 06/09/2001 ## RCS-ID: $Id: MDIChildFrame.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2002, 2004, 2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxPERL_USE_MDI_ARCHITECTURE #include "cpp/mdi.h" MODULE=Wx PACKAGE=Wx::MDIChildFrame wxMDIChildFrame* wxMDIChildFrame::new( parent, id, title, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wxFrameNameStr ) wxMDIParentFrame* parent wxWindowID id wxString title wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxPliMDIChildFrame( CLASS, parent, id, title, pos, size, style, name ); OUTPUT: RETVAL void wxMDIChildFrame::Activate() #if !defined(__WXGTK__) || defined(__WXPERL_FORCE__) void wxMDIChildFrame::Maximize() #endif void wxMDIChildFrame::Restore() #endif Wx-0.9923/ext/mdi/XS/MDIParentFrame.xs000664000000000000 515112306612250 15475 0ustar00Mark000000000000############################################################################# ## Name: ext/mdi/XS/MDIParentFrame.xs ## Purpose: XS for Wx::MDIParentFrame ## Author: Mattia Barbon ## Modified by: ## Created: 06/09/2001 ## RCS-ID: $Id: MDIParentFrame.xs 2517 2008-11-30 20:14:22Z mbarbon $ ## Copyright: (c) 2001-2002, 2004, 2006-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxPERL_USE_MDI_ARCHITECTURE #include #include "cpp/mdi.h" #include "cpp/overload.h" MODULE=Wx PACKAGE=Wx::MDIParentFrame void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::MDIParentFrame::new" ) wxMDIParentFrame* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxPliMDIParentFrame( CLASS ); OUTPUT: RETVAL wxMDIParentFrame* newFull( CLASS, parent, id, title, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, name = wxFrameNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxString title wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxPliMDIParentFrame( CLASS ); RETVAL->Create( parent, id, title, pos, size, style, name ); OUTPUT: RETVAL bool wxMDIParentFrame::Create( parent, id, title, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE|wxVSCROLL|wxHSCROLL, name = wxFrameNameStr ) wxWindow* parent wxWindowID id wxString title wxPoint pos wxSize size long style wxString name void wxMDIParentFrame::ActivateNext() void wxMDIParentFrame::ActivatePrevious() void wxMDIParentFrame::ArrangeIcons() void wxMDIParentFrame::Cascade() wxMDIChildFrame* wxMDIParentFrame::GetActiveChild() #ifdef __WXUNIVERSAL__ wxGenericMDIClientWindow* wxMDIParentFrame::GetClientWindow() #else #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxMDIClientWindowBase* wxMDIParentFrame::GetClientWindow() #else wxMDIClientWindow* wxMDIParentFrame::GetClientWindow() #endif #endif #if ( !defined(__WXGTK__) && !defined(__WXMAC__) && !defined(__WXMOTIF__) ) \ || defined(__WXPERL_FORCE__) wxMenu* wxMDIParentFrame::GetWindowMenu() void wxMDIParentFrame::SetWindowMenu( menu ) wxMenu* menu #endif #if WXPERL_W_VERSION_GE( 2, 5, 4 ) void wxMDIParentFrame::Tile( orient = wxHORIZONTAL ) wxOrientation orient #else void wxMDIParentFrame::Tile() #endif #endif Wx-0.9923/ext/media/000775000000000000 012316265011 12255 5ustar00Mark000000000000Wx-0.9923/ext/media/cpp/000775000000000000 012316265011 13037 5ustar00Mark000000000000Wx-0.9923/ext/media/cpp/me_constants.cpp000664000000000000 312712306612235 16326 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/media/cpp/me_constants.cpp // Purpose: constants for wxMediaCtrl // Author: Mattia Barbon // Modified by: // Created: 04/03/2006 // RCS-ID: $Id: me_constants.cpp 3072 2011-06-29 19:29:53Z mdootson $ // Copyright: (c) 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 "cpp/constants.h" #if wxUSE_MEDIACTRL #include "wx/mediactrl.h" double media_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: media #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'E': r( wxEVT_MEDIA_FINISHED ); r( wxEVT_MEDIA_STOP ); r( wxEVT_MEDIA_LOADED ); #if WXPERL_W_VERSION_GE( 2, 6, 3 ) r( wxEVT_MEDIA_STATECHANGED ); r( wxEVT_MEDIA_PLAY ); r( wxEVT_MEDIA_PAUSE ); #endif case 'M': r( wxMEDIASTATE_STOPPED ); r( wxMEDIASTATE_PAUSED ); r( wxMEDIASTATE_PLAYING ); r( wxMEDIACTRLPLAYERCONTROLS_NONE ); r( wxMEDIACTRLPLAYERCONTROLS_STEP ); r( wxMEDIACTRLPLAYERCONTROLS_VOLUME ); r( wxMEDIACTRLPLAYERCONTROLS_DEFAULT ); break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants media_module( &media_constant ); #endif Wx-0.9923/ext/media/lib/000775000000000000 012316265011 13023 5ustar00Mark000000000000Wx-0.9923/ext/media/lib/Wx/000775000000000000 012316265011 13421 5ustar00Mark000000000000Wx-0.9923/ext/media/lib/Wx/Media.pm000664000000000000 300212306612236 15055 0ustar00Mark000000000000############################################################################# ## Name: ext/media/lib/Wx/Media.pm ## Purpose: Wx::Media (pulls in Wx::MediaCtrl) ## Author: Mattia Barbon ## Modified by: ## Created: 04/03/2006 ## RCS-ID: $Id: Media.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::Media; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::load_dll( 'media' ); Wx::wx_boot( 'Wx::Media', $VERSION ); # # properly setup inheritance tree # no strict; package Wx::MediaCtrl; @ISA = qw(Wx::Control); package Wx::MediaEvent; @ISA = qw(Wx::NotifyEvent); use strict; package Wx::Event; use strict; # !parser: sub { $_[0] =~ m/sub (EVT_\w+)/ } # !package: Wx::Event sub EVT_MEDIA_LOADED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_MEDIA_LOADED, $_[2] ) }; sub EVT_MEDIA_FINISHED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_MEDIA_FINISHED, $_[2] ) }; sub EVT_MEDIA_STOP($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_MEDIA_STOP, $_[2] ) }; sub EVT_MEDIA_PAUSE($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_MEDIA_PAUSE, $_[2] ) }; sub EVT_MEDIA_PLAY($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_MEDIA_PLAY, $_[2] ) }; sub EVT_MEDIA_STATECHANGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_MEDIA_STATECHANGED, $_[2] ) }; 1; Wx-0.9923/ext/media/Makefile.PL000664000000000000 167212306612236 14321 0ustar00Mark000000000000############################################################################# ## Name: ext/media/Makefile.PL ## Purpose: Makefile.PL for wxWidgets multimedia control ## Author: Mattia Barbon ## Modified by: ## Created: 04/03/2006 ## RCS-ID: $Id: Makefile.PL 2435 2008-08-05 18:05:54Z mbarbon $ ## Copyright: (c) 2006, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::Media', VERSION_FROM => 'lib/Wx/Media.pm', WX_CORE_LIB => 'media core base', REQUIRE_WX_LIB => 'media', REQUIRE_WX => 2.006000, NO_WX_PLATFORMS => [ ], ); Wx-0.9923/ext/media/Media.xs000664000000000000 214112306612236 13732 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/media/Media.xs // Purpose: XS for wxWidgets multimedia control // Author: Mattia Barbon // Modified by: // Created: 04/03/2006 // RCS-ID: $Id: Media.xs 2757 2010-01-17 10:26:27Z mbarbon $ // Copyright: (c) 2006, 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 ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" // #include "cpp/xr_constants.cpp" #undef THIS MODULE=Wx__Media BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/MediaCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/MediaEvent.xsp #include "cpp/overload.h" #include "cpp/ovl_const.cpp" #include "cpp/me_constants.cpp" # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__Media Wx-0.9923/ext/media/t/000775000000000000 012316265011 12520 5ustar00Mark000000000000Wx-0.9923/ext/media/t/01_load.t000775000000000000 14212306612236 14170 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::Media; print "ok\n"; Wx-0.9923/ext/media/t/02_inheritance.t000775000000000000 33412306612236 15546 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::Media; test_inheritance_end(); ok( 1 ); # avoid failure Wx-0.9923/ext/media/typemap000664000000000000 125112306612235 13741 0ustar00Mark000000000000############################################################################# ## Name: ext/media/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 04/03/2006 ## RCS-ID: $Id: typemap 2317 2008-01-18 22:00:14Z mbarbon $ ## Copyright: (c) 2006, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxMediaCtrlPlayerControls T_ENUM wxMediaState T_ENUM wxMediaCtrl * O_WXOBJECT wxMediaEvent * O_WXOBJECT Wx-0.9923/ext/media/XS/000775000000000000 012316265010 12606 5ustar00Mark000000000000Wx-0.9923/ext/media/XS/MediaCtrl.xsp000664000000000000 563512306612236 15304 0ustar00Mark000000000000############################################################################# ## Name: ext/media/XS/MediaCtrl.xsp ## Purpose: XS++ for Wx::MediaCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 04/03/2006 ## RCS-ID: $Id: MediaCtrl.xsp 3073 2011-06-29 23:02:39Z mdootson $ ## Copyright: (c) 2006 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 #if wxUSE_MEDIACTRL #include #include "cpp/overload.h" #define wxDefaultValidatorPtr (wxValidator*)&wxDefaultValidator %typemap{wxMediaCtrl*}{simple}; %typemap{wxMediaCtrlPlayerControls}{simple}; %typemap{wxMediaState}{simple}; %typemap{off_t}{simple}; %typemap{wxSeekMode}{simple}; %name{Wx::MediaCtrl} class wxMediaCtrl { %name{newDefault} wxMediaCtrl(); %name{newFull} wxMediaCtrl( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& filename = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& szBackend = wxEmptyString, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxPanelNameStr ); bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& filename = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& szBackend = wxEmptyString, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxPanelNameStr ); off_t Tell(); off_t Length(); off_t Seek( off_t where, wxSeekMode whence ); wxMediaState GetState(); bool Play(); bool Pause(); bool Stop(); double GetVolume(); bool SetVolume( double volume ); double GetPlaybackRate(); bool SetPlaybackRate( double volume ); off_t GetDownloadProgress(); off_t GetDownloadTotal(); bool ShowPlayerControls( wxMediaCtrlPlayerControls flags = wxMEDIACTRLPLAYERCONTROLS_DEFAULT ); }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Button::new" ) bool wxMediaCtrl::LoadFile( file ) wxString file CODE: RETVAL = THIS->Load( file ); OUTPUT: RETVAL bool wxMediaCtrl::LoadURI( uri ) wxString uri CODE: RETVAL = THIS->Load( wxURI( uri ) ); OUTPUT: RETVAL %} #endif Wx-0.9923/ext/media/XS/MediaEvent.xsp000664000000000000 145212306612236 15452 0ustar00Mark000000000000############################################################################# ## Name: ext/media/XS/MediaEvent.xsp ## Purpose: XS++ for Wx::MediaCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 04/03/2006 ## RCS-ID: $Id: MediaEvent.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2006 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 #if wxUSE_MEDIACTRL #include %typemap{wxMediaEvent*}{simple}; %name{Wx::MediaEvent} class wxMediaEvent { wxMediaEvent( wxEventType commandType = wxEVT_NULL, int winid = 0 ); }; #endif Wx-0.9923/ext/pperl/000775000000000000 012316265011 12320 5ustar00Mark000000000000Wx-0.9923/ext/pperl/carp/000775000000000000 012316265011 13245 5ustar00Mark000000000000Wx-0.9923/ext/pperl/carp/Carp.pm000664000000000000 321412306612236 14554 0ustar00Mark000000000000############################################################################# ## Name: ext/pperl/carp/Carp.pm ## Purpose: Wx::Perl::Carp module (a replacement for Carp in Wx ## applications) ## Author: D.H. aka PodMaster ## Modified by: ## Created: 12/24/2002 ## RCS-ID: $Id: Carp.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2002 D.H. ## Licence: This program is free software; you can redistribute itand/or ## modify it under the same terms as Perl itself ############################################################################# =head1 NAME Wx::Perl::Carp - a replacement for Carp in Wx applications =head1 SYNOPSIS Just like L, so go see the L pod (cause it's based on L). # short example Wx::Perl::Carp; ... carp "i'm warn-ing"; croak "i'm die-ing"; =head1 SEE ALSO L L L L L =head1 COPYRIGHT (c) 2002 D.H. aka PodMaster (a proud CPAN author) =cut package Wx::Perl::Carp; BEGIN { require Carp; require Wx; } use Exporter; $VERSION = '0.01'; @ISA = qw( Exporter ); @EXPORT = qw( confess croak carp die warn); @EXPORT_OK = qw( cluck verbose ); @EXPORT_FAIL = qw( verbose ); # hook to enable verbose mode sub export_fail { Carp::export_fail( @_) } # make verbose work for me sub croak { Wx::LogFatalError( Carp::shortmess(@_) ) } sub confess { Wx::LogFatalError( Carp::longmess(@_) ) } sub carp { Wx::LogWarning( Carp::shortmess(@_) ) } sub cluck { Wx::LogWarning( Carp::longmess(@_) ) } sub warn { Wx::LogWarning( @_ ) } sub die { Wx::LogFatalError( @_ ) } 1; Wx-0.9923/ext/pperl/carp/Makefile.PL000664000000000000 147112306612236 15306 0ustar00Mark000000000000############################################################################ ## Name: ext/pperl/carp/Makefile.PL ## Purpose: Makefile.PL ## Author: Mattia Barbon ## Modified by: ## Created: 29/12/2002 ## RCS-ID: $Id: Makefile.PL 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2002, 2005 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::Perl::Carp', AUTHOR => 'D.H. aka PodMaster', VERSION_FROM => 'Carp.pm', WX_CORE_LIB => ' ', ); Wx-0.9923/ext/pperl/carp/t/000775000000000000 012316265010 13507 5ustar00Mark000000000000Wx-0.9923/ext/pperl/carp/t/01_load.t000775000000000000 11412306612236 15157 0ustar00Mark000000000000#!/usr/bin/perl -w use Test::More tests => 1; use_ok( 'Wx::Perl::Carp' ); Wx-0.9923/ext/pperl/Makefile.PL000664000000000000 136312306612236 14361 0ustar00Mark000000000000############################################################################# ## Name: ext/pperl/Makefile.PL ## Purpose: Makefile.PL to enable recursion inside subdirs ## Author: Mattia Barbon ## Modified by: ## Created: 04/07/2002 ## RCS-ID: $Id: Makefile.PL 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2002, 2005-2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::Perl', DIR => [ qw(splashfast carp textval) ] ); # local variables: # mode: cperl # end: Wx-0.9923/ext/pperl/splashfast/000775000000000000 012316265011 14470 5ustar00Mark000000000000Wx-0.9923/ext/pperl/splashfast/Makefile.PL000664000000000000 206612306612236 16532 0ustar00Mark000000000000############################################################################ ## Name: ext/pperl/splashfast/Makefile.PL ## Purpose: Makefile.PL ## Author: Mattia Barbon ## Modified by: ## Created: 04/07/2002 ## RCS-ID: $Id: Makefile.PL 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2002, 2005 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../../build'; use Wx::build::MakeMaker; # strange failure with 5.004 if( $] < 5.005 ) { ExtUtils::MakeMaker::WriteEmptyMakefile(); } else { wxWriteMakefile( NAME => 'Wx::Perl::SplashFast', ABSTRACT_FROM => 'SplashFast.pm', AUTHOR => 'Graciliano M. P. ', VERSION_FROM => 'SplashFast.pm', WX_CORE_LIB => ' ', ); } # local variables: # mode: cperl # end: Wx-0.9923/ext/pperl/splashfast/SplashFast.pm000664000000000000 1023212306612236 17200 0ustar00Mark000000000000############################################################################# ## Name: ext/pperl/splashfast/SplashFast.pm ## Purpose: Wx::Perl::SplashFast -> Show a splash before loading Wx. ## Author: Graciliano M. P. ## Modified by: ## Created: 30/06/2002 ## RCS-ID: $Id: SplashFast.pm 2723 2009-12-25 17:35:15Z mbarbon $ ## Copyright: (c) 2002-2006, 2009 Graciliano M. P. ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; package Wx::Perl::SplashFast ; use vars qw($VERSION) ; $VERSION = '0.02'; # for wxPerl 0.15+ sub import { Wx::Perl::SplashFast::new(@_) if @_ > 1; } sub new { my $class = shift; Wx::Perl::SplashFast::App->new() ; Wx::InitAllImageHandlers() ; my $dummy; my $any = Wx::constant( 'wxBITMAP_TYPE_ANY', 0, $dummy ); my $spl_c = Wx::constant( 'wxSPLASH_CENTRE_ON_SCREEN', 0, $dummy ); my $spl_ti = Wx::constant( 'wxSPLASH_TIMEOUT', 0, $dummy ); my $bitmap = Wx::Bitmap->new( $_[0], $any ); my $splash = Wx::SplashScreen->new( $bitmap , $spl_c|$spl_ti , $_[1] || 1000 , undef , -1 ); return $splash ; } ################### # SPLASHFAST::APP # ################### # Ghost package for your APP. use Wx::App; package Wx::Perl::SplashFast::App ; use vars qw(@ISA) ; @ISA = qw(Wx::App) ; sub OnInit { return 1 } ############################################################################### ## WX BASICS: ################################################################# ############################################################################### use Wx::Mini; Wx::_start(); ####### # END # ####### 1; __END__ =head1 NAME Wx::Perl::SplashFast - Fast splash screen for the Wx module. =head1 SYNOPSIS use Wx::Perl::SplashFast ('/path/to/logo.jpg',3000); # timeout in milliseconds package myApp ; # subclass Wx::App ... package myFrame; # subclass Wx::Frame ... package main; my $myApp = myApp->new(); my $frame = myFrame->new(); $myApp->MainLoop(); =head1 DESCRIPTION Using Wx::SplashScreen from Wx::App::OnInit may cause a high delay before the splash screen is shown on low end machines. This module works around this limitation; you just need to follow the example. =head1 USAGE Just put the code inside the 'BEGIN {}' of your main app, like: sub BEGIN { use Wx::Perl::SplashFast ; Wx::Perl::SplashFast->new("./logo.jpg",5000); } or load the module before any other: use Wx::Perl::SplashFast ("./logo.jpg",5000) ; use Wx ; ... =head2 import ( IMG_FILE, SPLASH_TIMEOUT ) =over 10 =item IMG_FILE Path of the image file to show. =item SPLASH_TIMEOUT Timeout of the splash screen in milliseconds. =back If you C this has the same affetc as. BEGIN { require Wx::Perl::SplashFast; Wx::Perl::SplashFast->new( './logo.jpg', 1000 ); } =head2 new ( IMG_FILE , SPLASH_TIMEOUT ) Show the splash screen. =over 10 =item IMG_FILE Path of the image file to show. =item SPLASH_TIMEOUT Timeout of the splash screen in milliseconds. =back =head1 EXAMPLE use Wx::Perl::SplashFast ("./logo.jpg",5000) ; # Don't forget to put your own image in the same path. Duh package myApp ; use base 'Wx::App'; sub OnInit { return(@_[0]) ;} package myFrame ; use base 'Wx::Frame'; use Wx qw( wxDEFAULT_FRAME_STYLE ); sub new { my $app = shift ; my( $frame ) = $app->SUPER::new( @_[0] , -1, 'wxPerl Test' , [0,0] , [400,300] ) ; return( $frame ) ; } package main ; use Wx ; my $myApp = myApp->new() ; print "window\n" ; my $win = myFrame->new() ; $win->Show(1) ; $myApp->SetTopWindow( $win ) ; $myApp->MainLoop(); =head1 SEE ALSO L, L =head1 AUTHOR Graciliano M. P. Thanks to wxWidgets people and Mattia Barbon for wxPerl! :P =head1 COPYRIGHT This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/pperl/splashfast/t/000775000000000000 012316265011 14733 5ustar00Mark000000000000Wx-0.9923/ext/pperl/splashfast/t/01_load.t000775000000000000 37412306612236 16412 0ustar00Mark000000000000#!/usr/bin/perl -w use Test::More ( $^O eq 'MSWin32' ) ? ( 'skip_all' => 'Test is fragile...' ) : ( 'tests' => 1 ); use Wx::Perl::SplashFast; use Wx; ok( 1, "module compiles" ); # local variables: # mode: cperl # end: Wx-0.9923/ext/pperl/splashfast/t/02_use.t000775000000000000 67312306612236 16272 0ustar00Mark000000000000#!/usr/bin/perl -w use lib '../../../t'; use Test::More ( $^O eq 'MSWin32' && $] == 5.008000 ) ? ( 'skip_all' => 'Bug with Win32 WM_TIMER handling in 5.8.0' ) : ( 'tests' => 1 ); use Wx::Perl::SplashFast '../../../wxpl.xpm', 800; use Wx 'wxTheApp'; ok( 1, "use Splashfast with arguments" ); use Tests_Helper qw(app_timeout); app_timeout( 500 ); wxTheApp->MainLoop(); # local variables: # mode: cperl # end: Wx-0.9923/ext/pperl/splashfast/t/03_new.t000775000000000000 101512306612236 16277 0ustar00Mark000000000000#!/usr/bin/perl -w use lib '../../../t'; use Test::More ( $^O eq 'MSWin32' && $] == 5.008000 ) ? ( 'skip_all' => 'Bug with Win32 WM_TIMER handling in 5.8.0' ) : ( 'tests' => 2 ); use Wx::Perl::SplashFast; BEGIN { my $splash = Wx::Perl::SplashFast->new( '../../../wxpl.xpm', 1200 ); isa_ok( $splash, 'Wx::SplashScreen' ); } use Wx 'wxTheApp'; ok( 1, "compilation OK" ); use Tests_Helper 'app_timeout'; app_timeout( 500 ); wxTheApp->MainLoop(); # local variables: # mode: cperl # end: Wx-0.9923/ext/pperl/splashfast/t/04_app.t000775000000000000 164512306612236 16300 0ustar00Mark000000000000#!/usr/bin/perl -w use lib '../../../t'; use Test::More ( $^O eq 'MSWin32' && $] == 5.008000 ) ? ( 'skip_all' => 'Bug with Win32 WM_TIMER handling in 5.8.0' ) : ( 'tests' => 5 ); use Wx::Perl::SplashFast '../../../wxpl.xpm', 800; package myApp; use base 'Wx::App'; sub OnInit { my $this = shift; $this->{FOO} = 'bar'; main::ok( 1, "OnInit was called" ); # OnInit called my $timer = Wx::Timer->new( $this ); Wx::Event::EVT_TIMER( $this, -1, sub { $this->ExitMainLoop; } ); $timer->Start( 500, 1 ); Wx::WakeUpIdle; 1; } package main; use Wx 'wxTheApp'; ok( 1, "compilation OK" ); # got there my $app = myApp->new; isa_ok( $app, 'myApp' ); is( $app->{FOO}, 'bar', "fields are preserved" ); is( wxTheApp, $app, "wxTheApp and myApp->new return the same value" ); wxTheApp->MainLoop(); # local variables: # mode: cperl # end: Wx-0.9923/ext/pperl/textval/000775000000000000 012316265011 14007 5ustar00Mark000000000000Wx-0.9923/ext/pperl/textval/Makefile.PL000664000000000000 152212306612236 16045 0ustar00Mark000000000000############################################################################ ## Name: ext/pperl/textval/Makefile.PL ## Purpose: Makefile.PL ## Author: Mattia Barbon ## Modified by: ## Created: 15/08/2005 ## RCS-ID: $Id: Makefile.PL 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2005 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::Perl::TextValidator', AUTHOR => 'Johan Vromans, Mattia Barbon', VERSION_FROM => 'TextValidator.pm', WX_CORE_LIB => ' ', ); Wx-0.9923/ext/pperl/textval/t/000775000000000000 012316265011 14252 5ustar00Mark000000000000Wx-0.9923/ext/pperl/textval/t/01_load.t000775000000000000 12512306612236 15723 0ustar00Mark000000000000#!/usr/bin/perl -w use Test::More tests => 1; use_ok( 'Wx::Perl::TextValidator' ); Wx-0.9923/ext/pperl/textval/TextValidator.pm000664000000000000 654112306612236 17231 0ustar00Mark000000000000############################################################################# ## Name: ext/pperl/textval/TextValidator.pm ## Purpose: Wx::Perl::TextValidator, a perl-ish wxTextValidator ## Author: Johan Vromans, Mattia Barbon ## Modified by: ## Created: 15/08/2005 ## RCS-ID: $Id: TextValidator.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2005 Johan Vromans, Mattia Barbon ## Licence: This program is free software; you can redistribute itand/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::Perl::TextValidator; =head1 NAME Wx::Perl::TextValidator - Perl replacement for wxTextValidator =head1 SYNOPSIS my $storage = ''; my $validator1 = Wx::Perl::TextValidator->new( '\d', \$storage ); my $validator2 = Wx::Perl::TextValidator->new( '[abcdef]' ); my $validator3 = Wx::Perl::TextValidator->new( qr/[a-zA-Z]/ ); my $textctrl = Wx::TextCtrl->new( $parent, -1, "", $pos, $size, $style, $validator1 ); =head1 DESCRIPTION A C subclass that allows filtering user input to a C. =head1 METHODS my $validator1 = Wx::Perl::TextValidator->new( $regexp, \$storage ); my $validator2 = Wx::Perl::TextValidator->new( $regexp ); Constructs a new C. The first argument must be a regular expression matching a single-character string and is used to validate the field contents and user input. The second argument, if present, is used in TransferDataToWindow/TransferDataToWindow as the source/destination for the fields contents. The first argument can be a string as well as a reqular expression object created using C. =cut use strict; use Wx qw(:keycode wxOK wxICON_EXCLAMATION); use Wx::Event qw(EVT_CHAR); use Wx::Locale qw(:default); use base qw(Wx::PlValidator); our $VERSION = '0.01'; sub new { my( $class, $validate, $data ) = @_; my $self = $class->SUPER::new; $self->{validate} = ref $validate ? $validate : qr/^$validate$/; $self->{data} = $data; EVT_CHAR($self, \&OnKbdInput); return $self; } sub OnKbdInput { my ($self, $event) = @_; my $c = $event->GetKeyCode; if( $c < WXK_SPACE || # skip control characters $c == WXK_DELETE || $c > WXK_START || $event->HasModifiers # allow Ctrl-C and such ) { $event->Skip; } elsif( pack( "C", $c ) =~ $self->{validate} ) { $event->Skip; } else { Wx::Bell; } } sub Clone { my( $self ) = @_; return ref( $self )->new( $self->{validate}, $self->{data} ); } sub Validate { my( $self, $window ) = @_; my $value = $self->GetWindow->GetValue; my $ko = grep { !/$self->{validate}/ } split //, $value; if( $ko ) { Wx::MessageBox( sprintf( gettext( "'%s' is invalid" ), $value ), gettext( "Validation conflict" ), wxOK | wxICON_EXCLAMATION, $window ); } return !$ko; } sub TransferToWindow { my( $self ) = @_; if( $self->{data} ) { $self->GetWindow->SetValue( ${$self->{data}} ); } return 1; } sub TransferFromWindow { my( $self ) = @_; if( $self->{data} ) { ${$self->{data}} = $self->GetWindow->GetValue; } return 1; } 1; Wx-0.9923/ext/print/000775000000000000 012316265011 12332 5ustar00Mark000000000000Wx-0.9923/ext/print/cpp/000775000000000000 012316265011 13114 5ustar00Mark000000000000Wx-0.9923/ext/print/cpp/printout.h000664000000000000 560112306612242 15234 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/print/cpp/printout.h // Purpose: c++ wrapper for wxPrintout // Author: Mattia Barbon // Modified by: // Created: 02/06/2001 // RCS-ID: $Id: printout.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2001-2002, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/v_cback.h" class wxPlPrintout:public wxPrintout { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlPrintout ); WXPLI_DECLARE_V_CBACK(); public: wxPlPrintout( const char* package, const wxString& title ); void GetPageInfo( int* minPage, int* maxPage, int* pageFrom, int* pageTo ); DEC_V_CBACK_BOOL__INT( HasPage ); DEC_V_CBACK_BOOL__INT_INT( OnBeginDocument ); DEC_V_CBACK_VOID__VOID( OnEndDocument ); DEC_V_CBACK_VOID__VOID( OnBeginPrinting ); DEC_V_CBACK_VOID__VOID( OnEndPrinting ); DEC_V_CBACK_VOID__VOID( OnPreparePrinting ); DEC_V_CBACK_BOOL__INT( OnPrintPage ); }; inline wxPlPrintout::wxPlPrintout( const char* package, const wxString& title ) :wxPrintout( title ), m_callback( "Wx::PlPrintout" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlPrintout, wxPrintout ); DEF_V_CBACK_BOOL__INT( wxPlPrintout, wxPrintout, HasPage ); DEF_V_CBACK_BOOL__INT_INT( wxPlPrintout, wxPrintout, OnBeginDocument ); DEF_V_CBACK_VOID__VOID( wxPlPrintout, wxPrintout, OnEndDocument ); DEF_V_CBACK_VOID__VOID( wxPlPrintout, wxPrintout, OnBeginPrinting ); DEF_V_CBACK_VOID__VOID( wxPlPrintout, wxPrintout, OnEndPrinting ); DEF_V_CBACK_VOID__VOID( wxPlPrintout, wxPrintout, OnPreparePrinting ); DEF_V_CBACK_BOOL__INT_pure( wxPlPrintout, wxPrintout, OnPrintPage ); void wxPlPrintout::GetPageInfo( int* minPage, int* maxPage, int* pageFrom, int* pageTo ) { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "GetPageInfo" ) ) { dSP; ENTER; SAVETMPS; PUSHMARK( SP ); XPUSHs( m_callback.GetSelf() ); PUTBACK; SV* method = sv_2mortal( newRV_inc( (SV*) m_callback.GetMethod() ) ); int items = call_sv( method, G_ARRAY ); if( items != 4 ) { croak( "wxPlPrintout::GetPageInfo, expected 4 values, got %i", items ); } SPAGAIN; SV* tmp; // pop in reverse order... tmp = POPs; *pageTo = SvIV( tmp ); tmp = POPs; *pageFrom = SvIV( tmp ); tmp = POPs; *maxPage = SvIV( tmp ); tmp = POPs; *minPage = SvIV( tmp ); PUTBACK; FREETMPS; LEAVE; } else wxPrintout::GetPageInfo( minPage, maxPage, pageFrom, pageTo ); } Wx-0.9923/ext/print/cpp/pr_constants.cpp000664000000000000 1415312306612242 16442 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/print/cpp/pr_constants.cpp // Purpose: constants for Print framework // Author: Mattia Barbon // Modified by: // Created: 04/05/2001 // RCS-ID: $Id: pr_constants.cpp 2440 2008-08-12 21:51:22Z mbarbon $ // Copyright: (c) 2001, 2004-2005, 2008 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/constants.h" double print_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: print #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'D': r( wxDUPLEX_SIMPLEX ); r( wxDUPLEX_HORIZONTAL ); r( wxDUPLEX_VERTICAL ); break; case 'L': r( wxLANDSCAPE ); break; case 'H': break; case 'P': r( wxPAPER_NONE ); r( wxPAPER_LETTER ); r( wxPAPER_LEGAL ); r( wxPAPER_A4 ); r( wxPAPER_CSHEET ); r( wxPAPER_DSHEET ); r( wxPAPER_ESHEET ); r( wxPAPER_LETTERSMALL ); r( wxPAPER_TABLOID ); r( wxPAPER_LEDGER ); r( wxPAPER_STATEMENT ); r( wxPAPER_EXECUTIVE ); r( wxPAPER_A3 ); r( wxPAPER_A4SMALL ); r( wxPAPER_A5 ); r( wxPAPER_B4 ); r( wxPAPER_B5 ); r( wxPAPER_FOLIO ); r( wxPAPER_QUARTO ); r( wxPAPER_10X14 ); r( wxPAPER_11X17 ); r( wxPAPER_NOTE ); r( wxPAPER_ENV_9 ); r( wxPAPER_ENV_10 ); r( wxPAPER_ENV_11 ); r( wxPAPER_ENV_12 ); r( wxPAPER_ENV_14 ); r( wxPAPER_ENV_DL ); r( wxPAPER_ENV_C5 ); r( wxPAPER_ENV_C3 ); r( wxPAPER_ENV_C4 ); r( wxPAPER_ENV_C6 ); r( wxPAPER_ENV_C65 ); r( wxPAPER_ENV_B4 ); r( wxPAPER_ENV_B5 ); r( wxPAPER_ENV_B6 ); r( wxPAPER_ENV_ITALY ); r( wxPAPER_ENV_MONARCH ); r( wxPAPER_ENV_PERSONAL ); r( wxPAPER_FANFOLD_US ); r( wxPAPER_FANFOLD_STD_GERMAN ); r( wxPAPER_FANFOLD_LGL_GERMAN ); r( wxPAPER_ISO_B4 ); r( wxPAPER_JAPANESE_POSTCARD ); r( wxPAPER_9X11 ); r( wxPAPER_10X11 ); r( wxPAPER_15X11 ); r( wxPAPER_ENV_INVITE ); r( wxPAPER_LETTER_EXTRA ); r( wxPAPER_LEGAL_EXTRA ); r( wxPAPER_TABLOID_EXTRA ); r( wxPAPER_A4_EXTRA ); r( wxPAPER_LETTER_TRANSVERSE ); r( wxPAPER_A4_TRANSVERSE ); r( wxPAPER_LETTER_EXTRA_TRANSVERSE ); r( wxPAPER_A_PLUS ); r( wxPAPER_B_PLUS ); r( wxPAPER_LETTER_PLUS ); r( wxPAPER_A4_PLUS ); r( wxPAPER_A5_TRANSVERSE ); r( wxPAPER_B5_TRANSVERSE ); r( wxPAPER_A3_EXTRA ); r( wxPAPER_A5_EXTRA ); r( wxPAPER_B5_EXTRA ); r( wxPAPER_A2 ); r( wxPAPER_A3_TRANSVERSE ); r( wxPAPER_A3_EXTRA_TRANSVERSE ); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxPAPER_12X11 ); r( wxPAPER_A3_ROTATED ); r( wxPAPER_A4_ROTATED ); r( wxPAPER_A5_ROTATED ); r( wxPAPER_A6 ); r( wxPAPER_A6_ROTATED ); r( wxPAPER_B4_JIS_ROTATED ); r( wxPAPER_B5_JIS_ROTATED ); r( wxPAPER_B6_JIS ); r( wxPAPER_B6_JIS_ROTATED ); r( wxPAPER_DBL_JAPANESE_POSTCARD ); r( wxPAPER_DBL_JAPANESE_POSTCARD_ROTATED ); r( wxPAPER_JAPANESE_POSTCARD_ROTATED ); r( wxPAPER_JENV_CHOU3 ); r( wxPAPER_JENV_CHOU3_ROTATED ); r( wxPAPER_JENV_CHOU4 ); r( wxPAPER_JENV_CHOU4_ROTATED ); r( wxPAPER_JENV_KAKU2 ); r( wxPAPER_JENV_KAKU2_ROTATED ); r( wxPAPER_JENV_KAKU3 ); r( wxPAPER_JENV_KAKU3_ROTATED ); r( wxPAPER_JENV_YOU4 ); r( wxPAPER_JENV_YOU4_ROTATED ); r( wxPAPER_LETTER_ROTATED ); r( wxPAPER_P16K ); r( wxPAPER_P16K_ROTATED ); r( wxPAPER_P32K ); r( wxPAPER_P32KBIG ); r( wxPAPER_P32KBIG_ROTATED ); r( wxPAPER_P32K_ROTATED ); r( wxPAPER_PENV_1 ); r( wxPAPER_PENV_10 ); r( wxPAPER_PENV_10_ROTATED ); r( wxPAPER_PENV_1_ROTATED ); r( wxPAPER_PENV_2 ); r( wxPAPER_PENV_2_ROTATED ); r( wxPAPER_PENV_3 ); r( wxPAPER_PENV_3_ROTATED ); r( wxPAPER_PENV_4 ); r( wxPAPER_PENV_4_ROTATED ); r( wxPAPER_PENV_5 ); r( wxPAPER_PENV_5_ROTATED ); r( wxPAPER_PENV_6 ); r( wxPAPER_PENV_6_ROTATED ); r( wxPAPER_PENV_7 ); r( wxPAPER_PENV_7_ROTATED ); r( wxPAPER_PENV_8 ); r( wxPAPER_PENV_8_ROTATED ); r( wxPAPER_PENV_9 ); r( wxPAPER_PENV_9_ROTATED ); #endif r( wxPORTRAIT ); r( wxPREVIEW_PRINT ); r( wxPREVIEW_NEXT ); r( wxPREVIEW_PREVIOUS ); r( wxPREVIEW_ZOOM ); r( wxPREVIEW_DEFAULT ); r( wxPRINT_QUALITY_HIGH ); r( wxPRINT_QUALITY_MEDIUM ); r( wxPRINT_QUALITY_LOW ); r( wxPRINT_QUALITY_DRAFT ); r( wxPRINT_MODE_FILE ); r( wxPRINT_MODE_NONE ); r( wxPRINT_MODE_PREVIEW ); r( wxPRINT_MODE_PRINTER ); r( wxPRINT_MODE_STREAM ); r( wxPRINTER_NO_ERROR ); r( wxPRINTER_CANCELLED ); r( wxPRINTER_ERROR ); #if WXPERL_W_VERSION_GE( 2, 5, 3 ) r( wxPRINTBIN_DEFAULT ); r( wxPRINTBIN_ONLYONE ); r( wxPRINTBIN_LOWER ); r( wxPRINTBIN_MIDDLE ); r( wxPRINTBIN_MANUAL ); r( wxPRINTBIN_ENVELOPE ); r( wxPRINTBIN_ENVMANUAL ); r( wxPRINTBIN_AUTO ); r( wxPRINTBIN_TRACTOR ); r( wxPRINTBIN_SMALLFMT ); r( wxPRINTBIN_LARGEFMT ); r( wxPRINTBIN_LARGECAPACITY ); r( wxPRINTBIN_CASSETTE ); r( wxPRINTBIN_FORMSOURCE ); r( wxPRINTBIN_USER ); #endif break; default: break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants print_module( &print_constant ); Wx-0.9923/ext/print/lib/000775000000000000 012316265010 13077 5ustar00Mark000000000000Wx-0.9923/ext/print/lib/Wx/000775000000000000 012316265010 13475 5ustar00Mark000000000000Wx-0.9923/ext/print/lib/Wx/Print.pm000664000000000000 353412306612243 15217 0ustar00Mark000000000000############################################################################# ## Name: ext/print/lib/Wx/Print.pm ## Purpose: Wx::Print ( pulls in all Print framework ) ## Author: Mattia Barbon ## Modified by: ## Created: 04/05/2001 ## RCS-ID: $Id: Print.pm 3295 2012-05-22 14:46:54Z mdootson $ ## Copyright: (c) 2001-2002, 2004-2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::Print; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::wx_boot( 'Wx::Print', $VERSION ); # # properly setup inheritance tree # no strict; package Wx::GenericPageSetupDialog; @ISA = qw(Wx::Dialog); package Wx::GenericPrintDialog; @ISA = qw(Wx::Dialog); package Wx::PageSetupDialog; @ISA = qw(Wx::Dialog); package Wx::PostScriptDC; @ISA = qw(Wx::DC); package Wx::PostScriptPrintPreview; @ISA = qw(Wx::PrintPreview); package Wx::PostScriptPrinter; @ISA = qw(Wx::Printer); package Wx::PreviewCanvas; @ISA = qw(Wx::Window); package Wx::PreviewControlBar; @ISA = qw(Wx::Window); package Wx::PreviewFrame; @ISA = qw(Wx::Frame); package Wx::PrintDialog; @ISA = qw(Wx::Dialog); package Wx::PrintDialog; @ISA = qw(Wx::Dialog); package Wx::PrintPreviewBase; package Wx::PrintPreview; @ISA = qw(Wx::PrintPreviewBase); package Wx::PrinterDC; @ISA = qw(Wx::DC); package Wx::GnomePrintDC; @ISA = qw(Wx::DC); package Wx::WindowsPrintPreview; @ISA = qw(Wx::PrintPreview); package Wx::WindowsPrinter; @ISA = qw(Wx::Printer); package Wx::PlPreviewFrame; @ISA = qw(Wx::PreviewFrame); package Wx::PlPreviewControlBar; @ISA = qw(Wx::PreviewControlBar); package Wx::PrintPaperType; @ISA = qw(Wx::Object); use strict; 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/print/Makefile.PL000664000000000000 152612306612244 14373 0ustar00Mark000000000000############################################################################# ## Name: ext/print/Makefile.PL ## Purpose: Makefile.PL for Print Framework ## Author: Mattia Barbon ## Modified by: ## Created: 04/05/2001 ## RCS-ID: $Id: Makefile.PL 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2001-2005, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::Print', VERSION_FROM => 'lib/Wx/Print.pm', WX_CORE_LIB => 'core base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/print/Print.xs000664000000000000 271512306612243 14071 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/print/Print.xs // Purpose: XS for Print Framework // Author: Mattia Barbon // Modified by: // Created: 04/05/2001 // RCS-ID: $Id: Print.xs 3300 2012-05-31 00:58:11Z mdootson $ // Copyright: (c) 2001-2002, 2004-2006, 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 ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/constants.h" #include "cpp/overload.h" #undef THIS MODULE=Wx__Print BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); #if wxPERL_USE_PRINTING_ARCHITECTURE INCLUDE: XS/PrintData.xs INCLUDE: XS/PageSetupDialog.xs INCLUDE: XS/PageSetupDialogData.xs INCLUDE: XS/Printer.xs INCLUDE: XS/PrintDialogData.xs INCLUDE: XS/PrintPreview.xs INCLUDE: XS/Printout.xs INCLUDE: XS/PrintDialog.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/Preview.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/PrintFactory.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/PaperDatabase.xsp #include "cpp/pr_constants.cpp" #include "cpp/ovl_const.cpp" #endif # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__Print Wx-0.9923/ext/print/t/000775000000000000 012316265011 12575 5ustar00Mark000000000000Wx-0.9923/ext/print/t/01_load.t000775000000000000 22112306612242 14240 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::Print; print "ok\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/print/t/02_inheritance.t000775000000000000 36212306612242 15621 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::Print; test_inheritance_end(); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/print/t/03_threads.t000775000000000000 104612306612243 15004 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use Test::More tests => 4; use Wx::Print; my $app = Wx::App->new( sub { 1 } ); my $printer = Wx::Printer->new; my $printer2 = Wx::Printer->new; undef $printer2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/print/t/09_paper.t000775000000000000 120012306612242 14456 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx qw( wxThePrintPaperDatabase :print ); use Wx::Print; use Test::More 'tests' => 3; my $papersize = wxThePrintPaperDatabase->GetSize(wxPAPER_A4); is( $papersize->x, 2100, 'A4 Width' ); is( $papersize->y, 2970, 'A4 Height' ); my $size = Wx::Size->new(2159,2794); my $papertypeid = wxThePrintPaperDatabase->GetSize($size); # size selection differs across versions and installations. # wxPAPER_NOTE and wxPAPER_LETTER are the same size so either # may be returned. ok( $papertypeid == wxPAPER_LETTER || $papertypeid == wxPAPER_NOTE, 'Got Letter Size' ); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/print/typemap000664000000000000 277412306612242 14027 0ustar00Mark000000000000############################################################################# ## Name: ext/print/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 04/05/2001 ## RCS-ID: $Id: typemap 3300 2012-05-31 00:58:11Z mdootson $ ## Copyright: (c) 2001, 2003-2005, 2007-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxPrintData * O_WXOBJECT wxPageSetupDialogData * O_WXOBJECT wxPageSetupDialog * O_WXOBJECT wxPageSetupDialogBase * O_WXOBJECT wxPrinter * O_WXOBJECT_THR wxPrinterBase * O_WXOBJECT wxPrintDialogData * O_WXOBJECT wxPrintout * O_WXOBJECT wxPrintPreview * O_WXOBJECT wxPrintPreviewBase * O_WXOBJECT wxPrinterDC * O_WXOBJECT wxPrintDialog * O_WXOBJECT wxPrintDialogBase * O_WXOBJECT wxPreviewControlBar * O_WXOBJECT wxPlPreviewControlBar * O_WXOBJECT wxPreviewCanvas * O_WXOBJECT wxPreviewCanvas * O_WXOBJECT wxPreviewFrame * O_WXOBJECT wxPlPreviewFrame * O_WXOBJECT wxPrintFactory * O_NON_WXOBJECT wxPrintPaperType * O_WXOBJECT wxPrintPaperDatabase * O_NON_WXOBJECT wxDuplexMode T_ENUM wxPaperSize T_ENUM wxPrintQuality T_ENUM wxPrinterError T_ENUM wxPrintBin T_ENUM wxPrintMode T_ENUM Wx-0.9923/ext/print/XS/000775000000000000 012316265011 12664 5ustar00Mark000000000000Wx-0.9923/ext/print/XS/PageSetupDialog.xs000664000000000000 173612306612244 16347 0ustar00Mark000000000000############################################################################# ## Name: ext/print/XS/PageSetupDialog.xs ## Purpose: XS for Wx::PageSetupDialog ## Author: Mattia Barbon ## Modified by: ## Created: 04/05/2001 ## RCS-ID: $Id: PageSetupDialog.xs 3163 2012-03-01 00:54:35Z mdootson $ ## Copyright: (c) 2001, 2004 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::PageSetupDialog wxPageSetupDialog* wxPageSetupDialog::new( parent, data = 0 ) wxWindow* parent wxPageSetupDialogData* data void wxPageSetupDialog::Destroy() CODE: delete THIS; wxPageSetupDialogData* wxPageSetupDialog::GetPageSetupData() CODE: RETVAL = &THIS->GetPageSetupData(); OUTPUT: RETVAL int wxPageSetupDialog::ShowModal() Wx-0.9923/ext/print/XS/PageSetupDialogData.xs000664000000000000 567212306612244 17144 0ustar00Mark000000000000############################################################################# ## Name: ext/print/XS/PageSetupDialogData.xs ## Purpose: XS for Wx::PageSetupDialogData ## Author: Mattia Barbon ## Modified by: ## Created: 04/05/2001 ## RCS-ID: $Id: PageSetupDialogData.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001, 2004 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::PageSetupDialogData wxPageSetupDialogData* wxPageSetupDialogData::new() void wxPageSetupDialogData::Destroy() CODE: delete THIS; void wxPageSetupDialogData::EnableHelp( flag ) bool flag void wxPageSetupDialogData::EnableMargins( flag ) bool flag void wxPageSetupDialogData::EnableOrientation( flag ) bool flag void wxPageSetupDialogData::EnablePaper( flag ) bool flag void wxPageSetupDialogData::EnablePrinter( flag ) bool flag bool wxPageSetupDialogData::GetDefaultMinMargins() bool wxPageSetupDialogData::GetEnableMargins() bool wxPageSetupDialogData::GetEnableOrientation() bool wxPageSetupDialogData::GetEnablePaper() bool wxPageSetupDialogData::GetEnablePrinter() bool wxPageSetupDialogData::GetEnableHelp() bool wxPageSetupDialogData::GetDefaultInfo() wxPoint* wxPageSetupDialogData::GetMarginTopLeft() CODE: RETVAL = new wxPoint( THIS->GetMarginTopLeft() ); OUTPUT: RETVAL wxPoint* wxPageSetupDialogData::GetMarginBottomRight() CODE: RETVAL = new wxPoint( THIS->GetMarginBottomRight() ); OUTPUT: RETVAL wxPoint* wxPageSetupDialogData::GetMinMarginTopLeft() CODE: RETVAL = new wxPoint( THIS->GetMinMarginTopLeft() ); OUTPUT: RETVAL wxPoint* wxPageSetupDialogData::GetMinMarginBottomRight() CODE: RETVAL = new wxPoint( THIS->GetMinMarginBottomRight() ); OUTPUT: RETVAL wxPaperSize wxPageSetupDialogData::GetPaperId() wxSize* wxPageSetupDialogData::GetPaperSize() CODE: RETVAL = new wxSize( THIS->GetPaperSize() ); OUTPUT: RETVAL wxPrintData* wxPageSetupDialogData::GetPrintData() CODE: RETVAL = &THIS->GetPrintData(); OUTPUT: RETVAL void wxPageSetupDialogData::SetDefaultInfo( flag ) bool flag void wxPageSetupDialogData::SetDefaultMinMargins( flag ) bool flag void wxPageSetupDialogData::SetMarginTopLeft( point ) wxPoint point void wxPageSetupDialogData::SetMarginBottomRight( point ) wxPoint point void wxPageSetupDialogData::SetMinMarginTopLeft( point ) wxPoint point void wxPageSetupDialogData::SetMinMarginBottomRight( point ) wxPoint point void wxPageSetupDialogData::SetPaperId( id ) wxPaperSize id void wxPageSetupDialogData::SetPaperSize( size ) wxSize size void wxPageSetupDialogData::SetPrintData( printData ) wxPrintData* printData CODE: THIS->SetPrintData( *printData ); Wx-0.9923/ext/print/XS/PaperDatabase.xsp000664000000000000 531312306612244 16201 0ustar00Mark000000000000############################################################################# ## Name: ext/print/XS/PaperDatabase.xsp ## Purpose: XS++ for Wx::PaperDatabase ## Author: Mark Dootsson ## Modified by: ## Created: 23/05/2004 ## RCS-ID: $Id: PrintFactory.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2005 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}; %typemap{wxPaperSize}{simple}; %{ #include %} %name{Wx::PrintPaperType} class wxPrintPaperType: public %name{Wx::Object} wxObject { public: wxString GetName() const; wxPaperSize GetId() const; int GetPlatformId() const; int GetWidth() const; int GetHeight() const; wxSize GetSize() const; wxSize GetSizeMM() const; wxSize GetSizeDeviceUnits() const; }; %{ MODULE=Wx PACKAGE=Wx::PrintPaperDatabase void wxPrintPaperDatabase::AddPaperType(paperId, platformId, name, w, h) wxPaperSize paperId int platformId wxString name int w int h void FindPaperType( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wsiz, FindPaperTypeBySize ) MATCH_REDISP( wxPliOvl_n, FindPaperTypeById ) MATCH_REDISP( wxPliOvl_s, FindPaperTypeByName ) END_OVERLOAD( "Wx::PrintPaperDatabase::FindPaperType" ) wxPrintPaperType* wxPrintPaperDatabase::FindPaperTypeByName(name) wxString name CODE: RETVAL = THIS->FindPaperType(name); OUTPUT: RETVAL wxPrintPaperType* wxPrintPaperDatabase::FindPaperTypeById(id) wxPaperSize id CODE: RETVAL = THIS->FindPaperType(id); OUTPUT: RETVAL wxPrintPaperType* wxPrintPaperDatabase::FindPaperTypeBySize( size ) wxSize size CODE: RETVAL = THIS->FindPaperType(size); OUTPUT: RETVAL wxPrintPaperType* wxPrintPaperDatabase::FindPaperTypeByPlatformId(id) int id wxPaperSize wxPrintPaperDatabase::ConvertNameToId(name) wxString name wxString wxPrintPaperDatabase::ConvertIdToName(paperId) wxPaperSize paperId void GetSize( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wsiz, GetPaperSize ) MATCH_REDISP( wxPliOvl_n, GetSizeSize ) END_OVERLOAD( "Wx::PrintPaperDatabase::GetSize" ) wxSize wxPrintPaperDatabase::GetSizeSize(paperId) int paperId CODE: RETVAL = THIS->GetSize((wxPaperSize)paperId); OUTPUT: RETVAL wxPaperSize wxPrintPaperDatabase::GetPaperSize(size) wxSize size CODE: RETVAL = THIS->GetSize(size); OUTPUT: RETVAL wxPrintPaperType* wxPrintPaperDatabase::Item(index) size_t index size_t wxPrintPaperDatabase::GetCount() %} Wx-0.9923/ext/print/XS/Preview.xsp000664000000000000 2703612306612244 15154 0ustar00Mark000000000000############################################################################# ## Name: ext/print/XS/Preview.xsp ## Purpose: XS for Wx::PreviewCanvas, Frame & ControlBar ## Author: Mattia Barbon ## Modified by: ## Created: 02/06/2001 ## RCS-ID: $Id: Preview.xsp 3007 2011-02-20 14:25:33Z mbarbon $ ## Copyright: (c) 2001-2002, 2004-2006, 2010-2011 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}; %typemap{wxPreviewControlBar*}{simple}; %typemap{wxPlPreviewControlBar*}{simple}; %typemap{wxPreviewFrame*}{simple}; %typemap{wxPlPreviewFrame*}{simple}; %typemap{wxPrintPreviewBase*}{simple}; %typemap{wxPrintPreview*}{simple}; %typemap{wxPreviewCanvas*}{simple}; #include %file{xspp/previewcontrolbar.h}; %{ #include "cpp/v_cback.h" // void METH(int) #define DEC_V_CBACK_VOID__INT_( METHOD, CONST ) \ void METHOD( int ) CONST #define DEF_V_CBACK_VOID__INT_( CLASS, CALLBASE, METHOD, CONST )\ void CLASS::METHOD( int p1 ) CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxPliCCback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, "i", p1 ); \ } else \ CALLBASE; \ } #define DEC_V_CBACK_VOID__INT( METHOD ) \ DEC_V_CBACK_VOID__INT_( METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__INT( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__INT_( CLASS, BASE::METHOD(p1), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__INT_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__INT_( CLASS, return, METHOD, wxPli_NOCONST ) class wxPlPreviewControlBar : public wxPreviewControlBar { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlPreviewControlBar ); WXPLI_DECLARE_V_CBACK(); public: wxPlPreviewControlBar( const char* package, wxPrintPreviewBase *preview, long buttons, wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxPanelNameStr ) : wxPreviewControlBar( preview, buttons, parent, pos, size, style, name ), m_callback( "Wx::PlPreviewControlBar" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } DEC_V_CBACK_VOID__VOID( CreateButtons ); DEC_V_CBACK_VOID__INT( SetZoomControl ); DEC_V_CBACK_INT__VOID( GetZoomControl ); wxButton* GetCloseButton() { return m_closeButton; } #if WXPERL_W_VERSION_LT( 2, 9, 2 ) wxButton* GetNextPageButton() { return m_nextPageButton; } wxButton* GetPreviousPageButton() { return m_previousPageButton; } wxButton* GetPrintButton() { return m_printButton; } wxButton* GetFirstPageButton() { return m_firstPageButton; } wxButton* GetLastPageButton() { return m_lastPageButton; } wxButton* GetGotoPageButton() { return m_gotoPageButton; } #endif wxChoice* GetZoomChoice() { return m_zoomControl; } long GetButtonFlags() { return m_buttonFlags; } void SetCloseButton( wxButton* b ) { m_closeButton = b; } #if WXPERL_W_VERSION_LT( 2, 9, 2 ) void SetNextPageButton( wxButton* b ) { m_nextPageButton = b; } void SetPreviousPageButton( wxButton* b ) { m_previousPageButton = b; } void SetPrintButton( wxButton* b ) { m_printButton = b; } void SetFirstPageButton( wxButton* b ) { m_firstPageButton = b; } void SetLastPageButton( wxButton* b ) { m_lastPageButton = b; } void SetGotoPageButton( wxButton* b ) { m_gotoPageButton = b; } #endif void SetZoomChoice( wxChoice * c ) { m_zoomControl = c; } void SetButtonFlags( long f ) { m_buttonFlags = f; } }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlPreviewControlBar, wxPreviewControlBar ); DEF_V_CBACK_VOID__VOID( wxPlPreviewControlBar, wxPreviewControlBar, CreateButtons ); DEF_V_CBACK_VOID__INT( wxPlPreviewControlBar, wxPreviewControlBar, SetZoomControl ); DEF_V_CBACK_INT__VOID( wxPlPreviewControlBar, wxPreviewControlBar, GetZoomControl ); %} %file{-}; %file{xspp/previewframe.h}; %{ #include "cpp/v_cback.h" class wxPlPreviewFrame : public wxPreviewFrame { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlPreviewFrame ); WXPLI_DECLARE_V_CBACK(); public: #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxPlPreviewFrame( const char* package, wxPrintPreviewBase *preview, wxWindow *parent, const wxString& title = wxT("Print Preview"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ) : wxPreviewFrame( preview, parent, title, pos, size, style, name ), m_callback( "Wx::PlPreviewFrame" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } #else wxPlPreviewFrame( const char* package, wxPrintPreviewBase *preview, wxFrame *parent, const wxString& title = wxT("Print Preview"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr ) : wxPreviewFrame( preview, parent, title, pos, size, style, name ), m_callback( "Wx::PlPreviewFrame" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxPreviewCanvas* GetPreviewCanvas() { return m_previewCanvas; } #else wxWindow* GetPreviewCanvas() { return m_previewCanvas; } #endif wxPreviewControlBar* GetPreviewControlBar() { return m_controlBar; } wxPrintPreviewBase* GetPrintPreview() { return m_printPreview; } #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void SetPreviewCanvas( wxPreviewCanvas* p ) { m_previewCanvas = p; } #else void SetPreviewCanvas( wxWindow* p ) { m_previewCanvas = p; } #endif void SetPreviewControlBar( wxPreviewControlBar* p ) { m_controlBar = p; } void SetPrintPreview( wxPrintPreviewBase* p ) { m_printPreview = p; } DEC_V_CBACK_VOID__VOID( Initialize ); DEC_V_CBACK_VOID__VOID( CreateCanvas ); DEC_V_CBACK_VOID__VOID( CreateControlBar ); }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlPreviewFrame, wxPreviewFrame ); DEF_V_CBACK_VOID__VOID( wxPlPreviewFrame, wxPreviewFrame, Initialize ); DEF_V_CBACK_VOID__VOID( wxPlPreviewFrame, wxPreviewFrame, CreateCanvas ); DEF_V_CBACK_VOID__VOID( wxPlPreviewFrame, wxPreviewFrame, CreateControlBar ); %} %file{-}; #include "xspp/previewframe.h" #include "xspp/previewcontrolbar.h" %name{Wx::PreviewControlBar} class wxPreviewControlBar { wxPreviewControlBar( wxPrintPreview* preview, long buttons, wxWindow* parent, wxPoint pos = wxDefaultPosition, wxSize size = wxDefaultSize, long style = wxTAB_TRAVERSAL, wxString name = wxPanelNameStr ); void CreateButtons(); wxPrintPreviewBase* GetPrintPreview(); int GetZoomControl(); void SetZoomControl( int zoom ); void OnNext(); void OnPrevious(); void OnFirst(); void OnLast(); #if WXPERL_W_VERSION_LT( 2, 9, 2 ) void OnGoto(); #else void OnGotoPage(); #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void OnPrint(); #endif }; %{ #define CreateButtons wxPreviewControlBar::CreateButtons %} %name{Wx::PlPreviewControlBar} class wxPlPreviewControlBar { wxPlPreviewControlBar( wxPrintPreview* preview, long buttons, wxWindow* parent, wxPoint pos = wxDefaultPosition, wxSize size = wxDefaultSize, long style = wxTAB_TRAVERSAL, wxString name = wxPanelNameStr ) %code{% RETVAL = new wxPlPreviewControlBar ( CLASS, preview, buttons, parent, pos, size, style, name ); %}; void CreateButtons(); }; %{ #undef CreateButtons %} %name{Wx::PreviewFrame} class wxPreviewFrame { #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxPreviewFrame( wxPrintPreview* preview, wxWindow* parent, wxString title, wxPoint pos = wxDefaultPosition, wxSize size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, wxString name = wxFrameNameStr ); #else wxPreviewFrame( wxPrintPreview* preview, wxFrame* parent, wxString title, wxPoint pos = wxDefaultPosition, wxSize size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, wxString name = wxFrameNameStr ); #endif void Initialize(); void CreateCanvas(); void CreateControlBar(); #if WXPERL_W_VERSION_GE( 2, 5, 4 ) wxPreviewControlBar* GetControlBar() const; #endif }; %{ #define Initialize wxPreviewFrame::Initialize #define CreateCanvas wxPreviewFrame::CreateCanvas #define CreateControlBar wxPreviewFrame::CreateControlBar %} %name{Wx::PlPreviewFrame} class wxPlPreviewFrame { #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxPlPreviewFrame( wxPrintPreview* preview, wxWindow* parent, wxString title, wxPoint pos = wxDefaultPosition, wxSize size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, wxString name = wxFrameNameStr ) %code{% RETVAL = new wxPlPreviewFrame ( CLASS, preview, parent, title, pos, size, style, name ); %}; #else wxPlPreviewFrame( wxPrintPreview* preview, wxFrame* parent, wxString title, wxPoint pos = wxDefaultPosition, wxSize size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, wxString name = wxFrameNameStr ) %code{% RETVAL = new wxPlPreviewFrame ( CLASS, preview, parent, title, pos, size, style, name ); %}; #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxPreviewCanvas* GetPreviewCanvas(); #else wxWindow* GetPreviewCanvas(); #endif wxPreviewControlBar* GetPreviewControlBar(); wxPrintPreviewBase* GetPrintPreview(); #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void SetPreviewCanvas( wxPreviewCanvas* p ); #else void SetPreviewCanvas( wxWindow* p ); #endif void SetPreviewControlBar( wxPreviewControlBar* p ); void SetPrintPreview( wxPrintPreviewBase* p ); void Initialize(); void CreateCanvas(); void CreateControlBar(); }; %{ #undef Initialize #undef CreateCanvas #undef CreateControlBar %} %{ MODULE=Wx PACKAGE=Wx::PreviewCanvas wxPreviewCanvas* wxPreviewCanvas::new( preview, parent, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxT("canvas") ) wxPrintPreview* preview wxWindow* parent wxPoint pos wxSize size long style wxString name %} Wx-0.9923/ext/print/XS/PrintData.xs000664000000000000 501612306612244 15213 0ustar00Mark000000000000############################################################################# ## Name: ext/print/XS/PrintData.xs ## Purpose: XS for Wx::PrintData ## Author: Mattia Barbon ## Modified by: ## Created: 04/05/2001 ## RCS-ID: $Id: PrintData.xs 3243 2012-03-25 11:24:18Z mdootson $ ## Copyright: (c) 2001, 2004-2005, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::PrintData wxPrintData* wxPrintData::new() CODE: RETVAL = new wxPrintData(); OUTPUT: RETVAL void wxPrintData::Destroy() CODE: delete THIS; #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxPrintBin wxPrintData::GetBin() #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool wxPrintData::IsOk() #endif bool wxPrintData::GetCollate() bool wxPrintData::GetColour() wxDuplexMode wxPrintData::GetDuplex() int wxPrintData::GetNoCopies() int wxPrintData::GetOrientation() wxPaperSize wxPrintData::GetPaperId() wxString wxPrintData::GetPrinterName() wxPrintQuality wxPrintData::GetQuality() #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxPrintData::SetBin( bin ) wxPrintBin bin #endif void wxPrintData::SetCollate( collate ) bool collate void wxPrintData::SetColour( colour ) bool colour void wxPrintData::SetDuplex( mode ) wxDuplexMode mode void wxPrintData::SetNoCopies( noCopies ) int noCopies void wxPrintData::SetOrientation( orientation ) int orientation void wxPrintData::SetPaperId( paperId ) wxPaperSize paperId void wxPrintData::SetPrinterName( name ) wxString name void wxPrintData::SetQuality( quality ) wxPrintQuality quality #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool wxPrintData::IsOrientationReversed() wxPrintMode wxPrintData::GetPrintMode() int wxPrintData::GetMedia(); void wxPrintData::SetOrientationReversed( reversed ) bool reversed void wxPrintData::SetMedia( media ) int media void wxPrintData::SetPrintMode( printMode ) wxPrintMode printMode wxString wxPrintData::GetFilename() void wxPrintData::SetFilename( filename ) wxString filename char* wxPrintData::GetPrivData() int wxPrintData::GetPrivDataLen() void wxPrintData::SetPrivData( privData, len ) char* privData int len void wxPrintData::ConvertToNative() void wxPrintData::ConvertFromNative() ## wxPrintNativeDataBase* ## wxPrintData::GetNativeData() #endif Wx-0.9923/ext/print/XS/PrintDialog.xs000664000000000000 171412306612244 15542 0ustar00Mark000000000000############################################################################# ## Name: ext/print/XS/PrintDialog.xs ## Purpose: XS for Wx::PrintDialog ## Author: Mattia Barbon ## Modified by: ## Created: 02/06/2001 ## RCS-ID: $Id: PrintDialog.xs 3163 2012-03-01 00:54:35Z mdootson $ ## Copyright: (c) 2001, 2004 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include MODULE=Wx PACKAGE=Wx::PrintDialog wxPrintDialog* wxPrintDialog::new( parent, data = 0 ) wxWindow* parent wxPrintDialogData* data wxPrintDialogData* wxPrintDialog::GetPrintDialogData() CODE: RETVAL = new wxPrintDialogData( THIS->GetPrintDialogData() ); OUTPUT: RETVAL wxDC* wxPrintDialog::GetPrintDC() int wxPrintDialog::ShowModal() Wx-0.9923/ext/print/XS/PrintDialogData.xs000664000000000000 437712306612244 16344 0ustar00Mark000000000000############################################################################# ## Name: ext/print/XS/PrintDialogData.xs ## Purpose: XS for Wx::PrintDialogData ## Author: Mattia Barbon ## Modified by: ## Created: 02/06/2001 ## RCS-ID: $Id: PrintDialogData.xs 2315 2008-01-18 21:47:17Z mbarbon $ ## Copyright: (c) 2001, 2004-2005, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::PrintDialogData wxPrintDialogData* wxPrintDialogData::new() void wxPrintDialogData::Destroy() CODE: delete THIS; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool wxPrintDialogData::IsOk() #endif void wxPrintDialogData::EnableHelp( enable ) bool enable void wxPrintDialogData::EnablePageNumbers( enable ) bool enable void wxPrintDialogData::EnablePrintToFile( enable ) bool enable void wxPrintDialogData::EnableSelection( enable ) bool enable bool wxPrintDialogData::GetAllPages() bool wxPrintDialogData::GetCollate() int wxPrintDialogData::GetFromPage() int wxPrintDialogData::GetMaxPage() int wxPrintDialogData::GetMinPage() int wxPrintDialogData::GetNoCopies() wxPrintData* wxPrintDialogData::GetPrintData() CODE: RETVAL = &THIS->GetPrintData(); OUTPUT: RETVAL bool wxPrintDialogData::GetPrintToFile() bool wxPrintDialogData::GetSelection() int wxPrintDialogData::GetToPage() void wxPrintDialogData::SetCollate( collate ) bool collate void wxPrintDialogData::SetFromPage( page ) int page void wxPrintDialogData::SetMaxPage( page ) int page void wxPrintDialogData::SetMinPage( page ) int page void wxPrintDialogData::SetNoCopies( n ) int n void wxPrintDialogData::SetPrintData( printData ) wxPrintData* printData CODE: THIS->SetPrintData( *printData ); void wxPrintDialogData::SetPrintToFile( flag ) bool flag void wxPrintDialogData::SetSelection( selection ) bool selection #if WXPERL_W_VERSION_GE( 2, 5, 3 ) && WXPERL_W_VERSION_LE( 2, 5, 3 ) void wxPrintDialogData::SetSetupDialog( flag ) bool flag #endif void wxPrintDialogData::SetToPage( page ) int page Wx-0.9923/ext/print/XS/Printer.xs000664000000000000 330412306612244 14746 0ustar00Mark000000000000############################################################################# ## Name: ext/print/XS/Printer.xs ## Purpose: XS for Wx::Printer ## Author: Mattia Barbon ## Modified by: ## Created: 29/05/2001 ## RCS-ID: $Id: Printer.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2004, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include MODULE=Wx PACKAGE=Wx::Printer wxPrinter* wxPrinter::new( data = 0 ) wxPrintDialogData* data static void wxPrinter::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxPrinter::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Printer", THIS, ST(0) ); delete THIS; bool wxPrinter::GetAbort() wxPrintDialogData* wxPrinter::GetPrintDialogData() CODE: RETVAL = &THIS->GetPrintDialogData(); OUTPUT: RETVAL void wxPrinter::CreateAbortWindow( parent, printout ) wxWindow* parent wxPrintout* printout wxPrinterError GetLastError() CODE: RETVAL = wxPrinter::GetLastError(); OUTPUT: RETVAL bool wxPrinter::Print( parent, printout, prompt = true ) wxWindow* parent wxPrintout* printout bool prompt wxDC* wxPrinter::PrintDialog( parent ) wxWindow* parent void wxPrinter::ReportError( parent, printout, message ) wxWindow* parent wxPrintout* printout wxString message CODE: THIS->ReportError( parent, printout, message ); bool wxPrinter::Setup( parent ) wxWindow* parent Wx-0.9923/ext/print/XS/PrintFactory.xsp000664000000000000 525312306612244 16134 0ustar00Mark000000000000############################################################################# ## Name: ext/print/XS/PrintFactory.xsp ## Purpose: XS++ for Wx::PrintFactory ## Author: Mattia Barbon ## Modified by: ## Created: 23/05/2004 ## RCS-ID: $Id: PrintFactory.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2005 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}; %{ #if WXPERL_W_VERSION_GE( 2, 5, 4 ) %} %typemap{wxPrintFactory*}{simple}; %typemap{wxPlPrintFactory*}{simple}; %typemap{wxPrinterBase*}{simple}; %typemap{wxPrintPreviewBase*}{simple}; %typemap{wxPrintDialogBase*}{simple}; %typemap{wxPageSetupDialogBase*}{simple}; %typemap{wxPrintData*}{simple}; %typemap{wxPrintDialogData*}{simple}; %typemap{wxPageSetupDialogData*}{simple}; %typemap{wxPrintout*}{simple}; %name{Wx::PrintFactory} class wxPrintFactory { wxPrinterBase *CreatePrinter( wxPrintDialogData* data ); %name{CreatePrintPreviewDD} wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, wxPrintout *printout = NULL, wxPrintDialogData *data = NULL ); %name{CreatePrintPreviewD} wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview, wxPrintout *printout, wxPrintData *data ); %name{CreatePrintDialogDD} wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, wxPrintDialogData *data = NULL ); %name{CreatePrintDialogD} wxPrintDialogBase *CreatePrintDialog( wxWindow *parent, wxPrintData *data ); wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent, wxPageSetupDialogData * data = NULL ); bool HasPrintSetupDialog(); wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data ); bool HasOwnPrintToFile(); bool HasPrinterLine(); wxString CreatePrinterLine(); bool HasStatusLine(); wxString CreateStatusLine(); }; %{ MODULE=Wx PACKAGE=Wx::PrintFactory void wxPrintFactory::SetPrintFactory( factory ) wxPrintFactory* factory CODE: wxPrintFactory::SetPrintFactory( factory ); wxPrintFactory* wxPrintFactory::GetFactory() CODE: RETVAL = wxPrintFactory::GetFactory(); OUTPUT: RETVAL %} %{ #endif %} Wx-0.9923/ext/print/XS/Printout.xs000664000000000000 1261212306612244 15171 0ustar00Mark000000000000############################################################################# ## Name: ext/print/XS/Printout.xs ## Purpose: XS for Wx::Printout & Wx::PrinterDC ## Author: Mattia Barbon ## Modified by: ## Created: 02/06/2001 ## RCS-ID: $Id: Printout.xs 3281 2012-05-06 07:25:12Z mdootson $ ## Copyright: (c) 2001-2002, 2004, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include #include "cpp/printout.h" MODULE=Wx PACKAGE=Wx::PrinterDC #if defined( __WXMSW__ ) wxPrinterDC* wxPrinterDC::new( data ) wxPrintData* data CODE: RETVAL = new wxPrinterDC( *data ); OUTPUT: RETVAL wxRect* wxPrinterDC::GetPaperRect() CODE: RETVAL = new wxRect( THIS->GetPaperRect() ); OUTPUT: RETVAL #endif MODULE=Wx PACKAGE=Wx::Printout wxPrintout* wxPrintout::new( title = wxT("Printout") ) wxString title CODE: RETVAL = new wxPlPrintout( CLASS, title ); OUTPUT: RETVAL void wxPrintout::Destroy() CODE: delete THIS; wxDC* wxPrintout::GetDC() OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); void wxPrintout::SetDC( dc ) wxDC* dc CODE: wxPli_object_set_deleteable( aTHX_ ST(1), false ); THIS->SetDC( dc ); void wxPrintout::GetPageInfo() PREINIT: int minPage, maxPage, pageFrom, pageTo; PPCODE: THIS->wxPrintout::GetPageInfo( &minPage, &maxPage, &pageFrom, &pageTo ); EXTEND( SP, 4 ); PUSHs( sv_2mortal( newSViv( minPage ) ) ); PUSHs( sv_2mortal( newSViv( maxPage ) ) ); PUSHs( sv_2mortal( newSViv( pageFrom ) ) ); PUSHs( sv_2mortal( newSViv( pageTo ) ) ); void wxPrintout::GetPageSizeMM() PREINIT: int w, h; PPCODE: THIS->GetPageSizeMM( &w, &h ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( w ) ) ); PUSHs( sv_2mortal( newSViv( h ) ) ); void wxPrintout::GetPageSizePixels() PREINIT: int w, h; PPCODE: THIS->GetPageSizePixels( &w, &h ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( w ) ) ); PUSHs( sv_2mortal( newSViv( h ) ) ); void wxPrintout::GetPPIPrinter() PREINIT: int w, h; PPCODE: THIS->GetPPIPrinter( &w, &h ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( w ) ) ); PUSHs( sv_2mortal( newSViv( h ) ) ); void wxPrintout::GetPPIScreen() PREINIT: int w, h; PPCODE: THIS->GetPPIScreen( &w, &h ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( w ) ) ); PUSHs( sv_2mortal( newSViv( h ) ) ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxRect* wxPrintout::GetPaperRectPixels() CODE: RETVAL = new wxRect( THIS->GetPaperRectPixels() ); OUTPUT: RETVAL #endif wxString wxPrintout::GetTitle() bool wxPrintout::HasPage( pageNum ) int pageNum CODE: RETVAL = THIS->wxPrintout::HasPage( pageNum ); OUTPUT: RETVAL bool wxPrintout::IsPreview() #if WXPERL_W_VERSION_LT( 2, 9, 0 ) void wxPrintout::SetIsPreview( p ) bool p #else void wxPrintout::SetPreview( preview ) wxPrintPreview* preview wxPrintPreview* wxPrintout::GetPreview() #endif bool wxPrintout::OnBeginDocument( startPage, endPage ) int startPage int endPage CODE: RETVAL = THIS->wxPrintout::OnBeginDocument( startPage, endPage ); OUTPUT: RETVAL void wxPrintout::OnEndDocument() CODE: THIS->wxPrintout::OnEndDocument(); void wxPrintout::OnBeginPrinting() CODE: THIS->wxPrintout::OnBeginPrinting(); void wxPrintout::OnEndPrinting() CODE: THIS->wxPrintout::OnEndPrinting(); void wxPrintout::OnPreparePrinting() CODE: THIS->wxPrintout::OnPreparePrinting(); #bool #wxPrintout::OnPrintPage( pageNum ) # int pageNum # CODE: # RETVAL = THIS->wxPrintout::OnPrintPage( pageNum ); # OUTPUT: # RETVAL #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void wxPrintout::FitThisSizeToPaper( imageSize ) wxSize imageSize void wxPrintout::FitThisSizeToPage( imageSize ) wxSize imageSize void wxPrintout::FitThisSizeToPageMargins( imageSize, pageSetupData ) wxSize imageSize wxPageSetupDialogData* pageSetupData C_ARGS: imageSize, *pageSetupData void wxPrintout::MapScreenSizeToPaper() void wxPrintout::MapScreenSizeToPage() void wxPrintout::MapScreenSizeToPageMargins( pageSetupData ) wxPageSetupDialogData* pageSetupData C_ARGS: *pageSetupData void wxPrintout::MapScreenSizeToDevice() wxRect* wxPrintout::GetLogicalPaperRect() CODE: RETVAL = new wxRect( THIS->GetLogicalPaperRect() ); OUTPUT: RETVAL wxRect* wxPrintout::GetLogicalPageRect() CODE: RETVAL = new wxRect( THIS->GetLogicalPageRect() ); OUTPUT: RETVAL wxRect* wxPrintout::GetLogicalPageMarginsRect( pageSetupData ) wxPageSetupDialogData* pageSetupData CODE: RETVAL = new wxRect( THIS->GetLogicalPageMarginsRect( *pageSetupData ) ); OUTPUT: RETVAL void wxPrintout::SetLogicalOrigin( x, y ) wxCoord x wxCoord y void wxPrintout::OffsetLogicalOrigin( xoff, yoff ) wxCoord xoff wxCoord yoff void wxPrintout::SetPageSizePixels( w, h ) int w int h void wxPrintout::SetPageSizeMM( w, h ) int w int h void wxPrintout::SetPPIScreen( x, y ) int x int y void wxPrintout::SetPPIPrinter( x, y ) int x int y void wxPrintout::SetPaperRectPixels( paperRectPixels ) wxRect* paperRectPixels CODE: THIS->SetPaperRectPixels( *paperRectPixels ); #endif Wx-0.9923/ext/print/XS/PrintPreview.xs000664000000000000 371012306612244 15762 0ustar00Mark000000000000############################################################################# ## Name: ext/print/XS/PrintPreview.xs ## Purpose: XS for Wx::PrintPreview ## Author: Mattia Barbon ## Modified by: ## Created: 02/06/2001 ## RCS-ID: $Id: PrintPreview.xs 2315 2008-01-18 21:47:17Z mbarbon $ ## Copyright: (c) 2001, 2004-2005, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::PrintPreview wxPrintPreview* wxPrintPreview::new( printout, printoutForPrinting, data = 0 ) wxPrintout* printout wxPrintout* printoutForPrinting wxPrintData* data void wxPrintPreview::Destroy() CODE: delete THIS; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool wxPrintPreview::IsOk() #endif wxWindow* wxPrintPreview::GetCanvas() int wxPrintPreview::GetCurrentPage() wxFrame* wxPrintPreview::GetFrame() int wxPrintPreview::GetMaxPage() int wxPrintPreview::GetMinPage() wxPrintout* wxPrintPreview::GetPrintout() wxPrintout* wxPrintPreview::GetPrintoutForPrinting() bool wxPrintPreview::Ok() #if WXPERL_W_VERSION_GE( 2, 5, 1 ) bool wxPrintPreview::PaintPage( canvas, dc ) wxPreviewCanvas* canvas wxDC* dc C_ARGS: canvas, *dc #else bool wxPrintPreview::PaintPage( window, dc ) wxWindow* window wxDC* dc C_ARGS: window, *dc #endif bool wxPrintPreview::Print( prompt ) bool prompt #if WXPERL_W_VERSION_GE( 2, 5, 1 ) void wxPrintPreview::SetCanvas( canvas ) wxPreviewCanvas* canvas #else void wxPrintPreview::SetCanvas( window ) wxWindow* window #endif void wxPrintPreview::SetCurrentPage( pageNum ) int pageNum void wxPrintPreview::SetFrame( frame ) wxFrame* frame void wxPrintPreview::SetPrintout( printout ) wxPrintout* printout void wxPrintPreview::SetZoom( percent ) int percent Wx-0.9923/ext/propgrid/000775000000000000 012316265011 13024 5ustar00Mark000000000000Wx-0.9923/ext/propgrid/cpp/000775000000000000 012316265011 13606 5ustar00Mark000000000000Wx-0.9923/ext/propgrid/cpp/propgrid_constants.cpp000664000000000000 1432012306612237 20341 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: propgrid_constants.cpp // Purpose: wxPropertyGrid constants // Author: Mark Dootson // SVN ID: $Id: tl_constants.cpp 3 2010-02-17 06:08:51Z mark.dootson $ // Copyright: (c) 2012 Mattia barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include // TODO: // this is grim, but I'm not sure how // to handle class level enumerations. #define wxPGState_SelectionState 0x01 #define wxPGState_ExpandedState 0x02 #define wxPGState_ScrollPosState 0x04 #define wxPGState_PageState 0x08 #define wxPGState_SplitterPosState 0x10 #define wxPGState_DescBoxState 0x20 #define wxPGState_AllStates 0x3F #define wxPGRender_ChoicePopup 0x00020000 #define wxPGRender_Control 0x00040000 #define wxPGRender_Disabled 0x00080000 #define wxPGRender_DontUseCellFgCol 0x00100000 #define wxPGRender_DontUseCellBgCol 0x00200000 #define wxPGRender_DontUseCellColours wxPGRender_DontUseCellFgCol double propertygrid_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: propgrid #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'P': r( wxPG_ITERATE_PROPERTIES ); r( wxPG_ITERATE_HIDDEN ); r( wxPG_ITERATE_FIXED_CHILDREN ); r( wxPG_ITERATE_CATEGORIES ); r( wxPG_ITERATE_ALL_PARENTS ); r( wxPG_ITERATE_ALL_PARENTS_RECURSIVELY ); r( wxPG_ITERATOR_FLAGS_ALL ); r( wxPG_ITERATOR_MASK_OP_ITEM ); r( wxPG_ITERATOR_MASK_OP_PARENT ); r( wxPG_ITERATE_VISIBLE ); r( wxPG_ITERATE_ALL ); r( wxPG_ITERATE_NORMAL ); r( wxPG_ITERATE_DEFAULT ); r( wxPG_PROP_MODIFIED ); r( wxPG_PROP_DISABLED ); r( wxPG_PROP_HIDDEN ); r( wxPG_PROP_CUSTOMIMAGE ); r( wxPG_PROP_NOEDITOR ); r( wxPG_PROP_COLLAPSED ); r( wxPG_PROP_INVALID_VALUE ); r( wxPG_PROP_WAS_MODIFIED ); r( wxPG_PROP_AGGREGATE ); r( wxPG_PROP_CHILDREN_ARE_COPIES ); r( wxPG_PROP_PROPERTY ); r( wxPG_PROP_CATEGORY ); r( wxPG_PROP_MISC_PARENT ); r( wxPG_PROP_READONLY ); r( wxPG_PROP_COMPOSED_VALUE ); r( wxPG_PROP_USES_COMMON_VALUE ); r( wxPG_PROP_AUTO_UNSPECIFIED ); r( wxPG_PROP_CLASS_SPECIFIC_1 ); r( wxPG_PROP_CLASS_SPECIFIC_2 ); r( wxPG_PROP_BEING_DELETED ); r( wxPG_PROP_MAX ); r( wxPG_PROP_PARENTAL_FLAGS ); r( wxPG_AUTO_SORT ); r( wxPG_HIDE_CATEGORIES ); r( wxPG_ALPHABETIC_MODE ); r( wxPG_BOLD_MODIFIED ); r( wxPG_SPLITTER_AUTO_CENTER ); r( wxPG_TOOLTIPS ); r( wxPG_HIDE_MARGIN ); r( wxPG_STATIC_SPLITTER ); r( wxPG_STATIC_LAYOUT ); r( wxPG_LIMITED_EDITING ); r( wxPG_TOOLBAR ); r( wxPG_DESCRIPTION ); r( wxPG_NO_INTERNAL_BORDER ); r( wxPG_EX_INIT_NOCAT ); r( wxPG_EX_NO_FLAT_TOOLBAR ); r( wxPG_EX_MODE_BUTTONS ); r( wxPG_EX_HELP_AS_TOOLTIPS ); r( wxPG_EX_NATIVE_DOUBLE_BUFFERING ); r( wxPG_EX_AUTO_UNSPECIFIED_VALUES ); r( wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES ); r( wxPG_EX_HIDE_PAGE_BUTTONS ); r( wxPG_EX_MULTIPLE_SELECTION ); r( wxPG_EX_ENABLE_TLP_TRACKING ); r( wxPG_EX_NO_TOOLBAR_DIVIDER ); r( wxPG_EX_TOOLBAR_SEPARATOR ); r( wxPG_DEFAULT_STYLE ); r( wxPGMAN_DEFAULT_STYLE ); r( wxPG_VFB_STAY_IN_PROPERTY ); r( wxPG_VFB_BEEP ); r( wxPG_VFB_MARK_CELL ); r( wxPG_VFB_SHOW_MESSAGE ); r( wxPG_VFB_SHOW_MESSAGEBOX ); r( wxPG_VFB_SHOW_MESSAGE_ON_STATUSBAR ); r( wxPG_VFB_DEFAULT ); r( wxPG_ACTION_INVALID ); r( wxPG_ACTION_NEXT_PROPERTY ); r( wxPG_ACTION_PREV_PROPERTY ); r( wxPG_ACTION_EXPAND_PROPERTY ); r( wxPG_ACTION_COLLAPSE_PROPERTY ); r( wxPG_ACTION_CANCEL_EDIT ); r( wxPG_ACTION_EDIT ); r( wxPG_ACTION_PRESS_BUTTON ); r( wxPG_ACTION_MAX ); r( wxPGState_SelectionState ); r( wxPGState_ExpandedState ); r( wxPGState_ScrollPosState ); r( wxPGState_PageState ); r( wxPGState_SplitterPosState ); r( wxPGState_DescBoxState ); r( wxPGState_AllStates ); r( wxPGRender_ChoicePopup ); r( wxPGRender_Control ); r( wxPGRender_Disabled ); r( wxPGRender_DontUseCellFgCol ); r( wxPGRender_DontUseCellBgCol ); r( wxPGRender_DontUseCellColours ); r( wxPG_PROPERTY_VALIDATION_ERROR_MESSAGE ); r( wxPG_PROPERTY_VALIDATION_SATURATE ); r( wxPG_PROPERTY_VALIDATION_WRAP ); // r( wxPG_LABEL ); // r( wxPG_LABEL_STRING ); // r( wxPG_NULL_BITMAP ); // r( wxPG_COLOUR_BLACK ); // r( wxPG_COLOUR ); // r( wxPG_DEFAULT_IMAGE_SIZE ); r( wxPG_INVALID_VALUE ); r( wxPG_KEEP_STRUCTURE ); r( wxPG_RECURSE ); r( wxPG_INC_ATTRIBUTES ); r( wxPG_RECURSE_STARTS ); r( wxPG_FORCE ); r( wxPG_SORT_TOP_LEVEL_ONLY ); r( wxPG_DONT_RECURSE ); r( wxPG_FULL_VALUE ); r( wxPG_REPORT_ERROR ); r( wxPG_PROPERTY_SPECIFIC ); r( wxPG_EDITABLE_VALUE ); r( wxPG_COMPOSITE_FRAGMENT ); r( wxPG_UNEDITABLE_COMPOSITE_FRAGMENT ); r( wxPG_VALUE_IS_CURRENT ); r( wxPG_PROGRAMMATIC_VALUE ); r( wxPG_SETVAL_REFRESH_EDITOR ); r( wxPG_SETVAL_AGGREGATED ); r( wxPG_SETVAL_FROM_PARENT ); r( wxPG_SETVAL_BY_USER ); r( wxPG_BASE_OCT ); r( wxPG_BASE_DEC ); r( wxPG_BASE_HEX ); r( wxPG_BASE_HEXL ); r( wxPG_PREFIX_NONE ); r( wxPG_PREFIX_0x ); r( wxPG_PREFIX_DOLLAR_SIGN ); break; default: break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants propertygrid_module( &propertygrid_constant ); Wx-0.9923/ext/propgrid/cpp/propgrid_declares.h000664000000000000 165212306612237 17540 0ustar00Mark000000000000#if wxUSE_DATEPICKCTRL class wxPGDatePickerCtrlEditor : public wxPGEditor { DECLARE_DYNAMIC_CLASS(wxPGDatePickerCtrlEditor) public: virtual ~wxPGDatePickerCtrlEditor(); wxString GetName() const; virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const; virtual void UpdateControl( wxPGProperty* property, wxWindow* wnd ) const; virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* wnd, wxEvent& event ) const; virtual bool GetValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* wnd ) const; virtual void SetValueToUnspecified( wxPGProperty* WXUNUSED(property), wxWindow* wnd ) const; }; #endif // wxUSE_DATEPICKCTRL Wx-0.9923/ext/propgrid/lib/000775000000000000 012316265010 13571 5ustar00Mark000000000000Wx-0.9923/ext/propgrid/lib/Wx/000775000000000000 012316265010 14167 5ustar00Mark000000000000Wx-0.9923/ext/propgrid/lib/Wx/PropertyGrid.pm000664000000000000 1445412306612240 17267 0ustar00Mark000000000000############################################################################# ## Name: ext/propgrid/lib/Wx/PropertyGrid.pm ## Purpose: Wx::PropertyGrid and related classes ## Author: Mark Dootson ## Created: 01/03/2012 ## SVN-ID: $Id: PropertyGrid.pm 3242 2012-03-23 22:29:59Z mdootson $ ## Copyright: (c) 2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# BEGIN { package Wx::PropertyGrid; our $__wx_pgrid_present = Wx::_wx_optmod_propgrid(); } package Wx::PropertyGrid; use strict; our $VERSION = '0.01'; our $__wx_pgrid_present; if( $__wx_pgrid_present ) { Wx::load_dll( 'adv' ); Wx::load_dll( 'propgrid' ); Wx::wx_boot( 'Wx::PropertyGrid', $VERSION ); } # Setup constants # (cached strings - not constant at all) package Wx; sub wxPG_ATTR_UNITS { return ( $Wx::PropertyGrid::__wx_pgrid_present ) ? Wx::PropertyGrid::_get_wxPG_ATTR_UNITS() : undef ; } sub wxPG_ATTR_HINT { return ( $Wx::PropertyGrid::__wx_pgrid_present ) ? Wx::PropertyGrid::_get_wxPG_ATTR_HINT() : undef ; } sub wxPG_ATTR_INLINE_HELP { return ( $Wx::PropertyGrid::__wx_pgrid_present ) ? Wx::PropertyGrid::_get_wxPG_ATTR_INLINE_HELP() : undef ; } sub wxPG_ATTR_DEFAULT_VALUE { return ( $Wx::PropertyGrid::__wx_pgrid_present ) ? Wx::PropertyGrid::_get_wxPG_ATTR_DEFAULT_VALUE() : undef ; } sub wxPG_ATTR_MIN { return ( $Wx::PropertyGrid::__wx_pgrid_present ) ? Wx::PropertyGrid::_get_wxPG_ATTR_MIN() : undef ; } sub wxPG_ATTR_MAX { return ( $Wx::PropertyGrid::__wx_pgrid_present ) ? Wx::PropertyGrid::_get_wxPG_ATTR_MAX() : undef ; } package Wx::PropertyGrid; # these are all string 'constants', those above # and those added in Constant.xs our @_wxpg_extra_exported_constants = qw( wxPG_ATTR_UNITS wxPG_ATTR_HINT wxPG_ATTR_INLINE_HELP wxPG_ATTR_DEFAULT_VALUE wxPG_ATTR_MIN wxPG_ATTR_MAX wxPG_ATTR_AUTOCOMPLETE wxPG_BOOL_USE_CHECKBOX wxPG_BOOL_USE_DOUBLE_CLICK_CYCLING wxPG_FLOAT_PRECISION wxPG_STRING_PASSWORD wxPG_UINT_BASE wxPG_UINT_PREFIX wxPG_FILE_WILDCARD wxPG_FILE_SHOW_FULL_PATH wxPG_FILE_SHOW_RELATIVE_PATH wxPG_FILE_INITIAL_PATH wxPG_FILE_DIALOG_TITLE wxPG_DIR_DIALOG_MESSAGE wxPG_ARRAY_DELIMITER wxPG_DATE_FORMAT wxPG_DATE_PICKER_STYLE wxPG_ATTR_SPINCTRL_STEP wxPG_ATTR_SPINCTRL_WRAP wxPG_ATTR_MULTICHOICE_USERSTRINGMODE wxPG_COLOUR_ALLOW_CUSTOM wxPG_COLOUR_HAS_ALPHA ); if( $__wx_pgrid_present ) { push @{ $Wx::EXPORT_TAGS{'propgrid'} }, @_wxpg_extra_exported_constants; } # # properly setup inheritance tree # no strict; package Wx::PropertyGridIteratorBase; package Wx::PropertyGridIterator; @ISA = qw( Wx::PropertyGridIteratorBase ); package Wx::PropertyGridManager; @ISA = qw( Wx::Panel ); package Wx::PropertyGridPage; @ISA = qw( Wx::EvtHandler ); package Wx::PropertyGrid; @ISA = qw( Wx::Control); package Wx::PGProperty; @ISA = qw( Wx::Object ); package Wx::PropertyCategory; @ISA = qw( Wx::PGProperty ); package Wx::PGCell; @ISA = qw( Wx::Object ); package Wx::ObjectRefData; package Wx::PGCellRenderer; @ISA = qw( Wx::ObjectRefData ); package Wx::PGDefaultRenderer; @ISA = qw( Wx::PGCellRenderer ); package Wx::PGChoicesData; @ISA = qw( Wx::ObjectRefData ); package Wx::PGMultiButton; @ISA = qw( Wx::Window ); package Wx::PGEditor; @ISA = qw( Wx::Object ); package Wx::PGTextCtrlEditor; @ISA = qw( Wx::PGEditor ); package Wx::PGChoiceEditor; @ISA = qw( Wx::PGEditor ); package Wx::PGComboBoxEditor; @ISA = qw( Wx::PGChoiceEditor ); package Wx::PGChoiceAndButtonEditor; @ISA = qw( Wx::PGChoiceEditor ); package Wx::PGTextCtrlAndButtonEditor; @ISA = qw( Wx::PGTextCtrlEditor ); package Wx::PGCheckBoxEditor; @ISA = qw( Wx::PGEditor ); package Wx::PGDatePickerCtrlEditor; @ISA = qw( Wx::PGEditor ); package Wx::PGSpinCtrlEditor; @ISA = qw( Wx::PGTextCtrlEditor ); package Wx::PGInDialogValidator; package Wx::StringProperty; @ISA = qw( Wx::PGProperty ); package Wx::IntProperty; @ISA = qw( Wx::PGProperty ); package Wx::UIntProperty; @ISA = qw( Wx::PGProperty ); package Wx::FloatProperty; @ISA = qw( Wx::PGProperty ); package Wx::BoolProperty; @ISA = qw( Wx::PGProperty ); package Wx::EnumProperty; @ISA = qw( Wx::PGProperty ); package Wx::EditEnumProperty; @ISA = qw( Wx::EnumProperty ); package Wx::FlagsProperty; @ISA = qw( Wx::PGProperty ); package Wx::FileProperty; @ISA = qw( Wx::PGProperty ); package Wx::LongStringProperty; @ISA = qw( Wx::PGProperty ); package Wx::DirProperty ; @ISA = qw( Wx::LongStringProperty ); package Wx::ArrayStringProperty; @ISA = qw( Wx::PGProperty ); package Wx::MultiChoiceProperty; @ISA = qw( Wx::PGProperty ); package Wx::FontProperty; @ISA = qw( Wx::PGProperty ); package Wx::SystemColourProperty; @ISA = qw( Wx::EnumProperty ); package Wx::ColourProperty; @ISA = qw( Wx::SystemColourProperty ); package Wx::CursorProperty; @ISA = qw( Wx::EnumProperty ); package Wx::ImageFileProperty; @ISA = qw( Wx::FileProperty ); package Wx::DateProperty; @ISA = qw( Wx::PGProperty ); package Wx::PGFileDialogAdapter; @ISA = qw( Wx::PGEditorDialogAdapter ); package Wx::PGLongStringDialogAdapter; @ISA = qw( Wx::PGEditorDialogAdapter ); package Wx::PGArrayEditorDialog; @ISA = qw( Wx::Dialog ); package Wx::PGArrayStringEditorDialog; @ISA = qw( Wx::PGArrayEditorDialog ); package Wx::ColourPropertyValue; @ISA = qw( Wx::Object ); package Wx::ArrayStringProperty; #FIXME - until we fix XS method sub GetPlValue { my @return = (); my $variant = $_[0]->GetValue; @return = $variant->GetArrayString if !$variant->IsNull; return @return; } package Wx::MultiChoiceProperty; #FIXME - until we fix XS method sub GetPlValue { my @return = (); my $variant = $_[0]->GetValue; @return = $variant->GetArrayString if !$variant->IsNull; return @return; } 1; Wx-0.9923/ext/propgrid/Makefile.PL000664000000000000 170112306612240 15054 0ustar00Mark000000000000############################################################################# ## Name: ext/propgrid/Makefile.PL ## Purpose: Makefile.PL for wxPropertyGrid ## Author: Mark Dootson ## Modified by: ## Created: 01/03/2012 ## SVN-ID: $Id: Makefile.PL 3176 2012-03-08 03:26:08Z mdootson $ ## Copyright: (c) 2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use Config; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::PropertyGrid', VERSION_FROM => 'lib/Wx/PropertyGrid.pm', REQUIRE_WX => 2.009003, WX_CORE_LIB => 'propgrid adv core base', REQUIRE_WX_LIB => 'propgrid', NO_WX_PLATFORMS => [ ], );Wx-0.9923/ext/propgrid/PropertyGrid.xs000664000000000000 650712306612237 16127 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/propgrid/PropertyGrid.xs // Purpose: XS for Wx::PropertyGrid // Author: Mark Dootson // Modified by: // Created: 01/03/2012 // SVN-ID: $Id: RichText.xs 3134 2012-02-27 23:15:23Z mdootson $ // Copyright: (c) 2012 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/constants.h" #include "cpp/overload.h" #undef THIS #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_PROPGRID #include #include #include #include #include #include #include #include #include "cpp/helpers.h" #include "cpp/array_helpers.h" #define wxNullColourPtr (wxColour*)&wxNullColour #define wxNullPropertyPtr (wxPGProperty*)&wxNullProperty #define wxNullBitmapPtr (wxBitmap*)&wxNullBitmap #define wxPerl_build_default_propertyflags wxPG_ITERATE_PROPERTIES|wxPG_ITERATE_HIDDEN|wxPG_ITERATE_CATEGORIES #endif MODULE=Wx__PropertyGrid BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_PROPGRID ## ## ## INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/PropertyGrid.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/PGCell.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/PGCellRenderer.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/PGEditor.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/PGProperty.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/PropertyGridEvent.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/PropertyGridManager.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/PropertyGridPage.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/PropertyGridPageState.xsp MODULE=Wx__PropertyGrid PACKAGE=Wx::PropertyGrid ## wxPerl implementations ## Cached strings wxString _get_wxPG_ATTR_UNITS() CODE: RETVAL = wxPG_ATTR_UNITS; OUTPUT: RETVAL wxString _get_wxPG_ATTR_HINT() CODE: RETVAL = wxPG_ATTR_HINT; OUTPUT: RETVAL wxString _get_wxPG_ATTR_INLINE_HELP() CODE: RETVAL = wxPG_ATTR_INLINE_HELP; OUTPUT: RETVAL wxString _get_wxPG_ATTR_DEFAULT_VALUE() CODE: RETVAL = wxPG_ATTR_DEFAULT_VALUE; OUTPUT: RETVAL wxString _get_wxPG_ATTR_MIN() CODE: RETVAL = wxPG_ATTR_MIN; OUTPUT: RETVAL wxString _get_wxPG_ATTR_MAX() CODE: RETVAL = wxPG_ATTR_MAX; OUTPUT: RETVAL #include "cpp/ovl_const.cpp" #include #endif # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__PropertyGrid Wx-0.9923/ext/propgrid/t/000775000000000000 012316265011 13267 5ustar00Mark000000000000Wx-0.9923/ext/propgrid/t/01_load.t000775000000000000 14712306612237 14745 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Test::More tests => 1; use Wx; use_ok( 'Wx::PropertyGrid' ); 1; Wx-0.9923/ext/propgrid/t/02_inheritance.t000775000000000000 44412306612237 16320 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use if !Wx::_wx_optmod_propgrid(), 'Test::More' => skip_all => 'No PropertyGrid Support'; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::PropertyGrid; test_inheritance_end(); Wx-0.9923/ext/propgrid/t/03_threads.t000775000000000000 2147012306612237 15524 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::_wx_optmod_propgrid(), 'Test::More' => skip_all => 'No PropertyGrid Support'; use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use if Wx::wxMOTIF, 'Test::More' => skip_all => 'Hangs under Motif'; use Test::More tests => 4; use Wx::PropertyGrid; use Wx::DateTime; package main; my $app = Wx::App->new( sub { 1 } ); my $frame = Wx::Frame->new(undef, -1, 'Test Frame'); # setup prop grid to test Property and Editor deletion my $manager = Wx::PropertyGridManager->new($frame, -1); my $propgrid = $manager->GetGrid; my $page = $manager->AddPage('Test Properties'); my @keeps; my @undef; push @keeps, $page->Append(Wx::StringProperty->new('Test 1','Test 1', 'Hello')); push @undef, $page->Append(Wx::StringProperty->new('Test 2','Test 2', 'Hello')); push @keeps, Wx::StringProperty->new('Test 3','Test 3', 'Hello'); push @undef, Wx::StringProperty->new('Test 4','Test 4', 'Hello'); push @keeps, $page->Append(Wx::LongStringProperty->new('Test 5','Test 5', 'Hello')); push @undef, $page->Append(Wx::LongStringProperty->new('Test 6','Test 6', 'Hello')); push @keeps, Wx::LongStringProperty->new('Test 7','Test 7', 'X1'); push @undef, Wx::LongStringProperty->new('Test 8','Test 8', 'X2'); push @keeps, $page->Append(Wx::DirProperty->new('Test 9','X3 9', '')); push @undef, $page->Append(Wx::DirProperty->new('Test 10','X4 10', '')); push @keeps, Wx::DirProperty->new('Test 11','X5 11', ''); push @undef, Wx::DirProperty->new('Test 12','X6 12', ''); push @keeps, $page->Append(Wx::FileProperty->new('Test 13','X7 9', '')); push @undef, $page->Append(Wx::FileProperty->new('Test 14','X8 10', '')); push @keeps, Wx::FileProperty->new('Test 15','X9 11', ''); push @undef, Wx::FileProperty->new('Test 16','A1 12', ''); push @keeps, $page->Append(Wx::ImageFileProperty->new('Test 17','A2 9', '')); push @undef, $page->Append(Wx::ImageFileProperty->new('Test 18','A3 10', '')); push @keeps, Wx::ImageFileProperty->new('Test 19','A4 11', ''); push @undef, Wx::ImageFileProperty->new('Test 20','A5 12', ''); push @keeps, $page->Append(Wx::PropertyCategory->new('Test 21')); push @undef, $page->Append(Wx::PropertyCategory->new('Test 22')); push @keeps, Wx::PropertyCategory->new('A6 23'); push @undef, Wx::PropertyCategory->new('A7 24'); push @keeps, $page->Append(Wx::FloatProperty->new('Test 25','A8 9', '0.098')); push @undef, $page->Append(Wx::FloatProperty->new('Test 26','A9 10', '0.098')); push @keeps, Wx::FloatProperty->new('Test 27','A10 11', '0.098'); push @undef, Wx::FloatProperty->new('Test 28','A11 12', '0.098'); push @keeps, $page->Append(Wx::IntProperty->new('B1 29','B1 9', 1)); push @undef, $page->Append(Wx::IntProperty->new('B2 30','B2 10', 1)); push @keeps, Wx::IntProperty->new('Test 31','B3 11', 1); push @undef, Wx::IntProperty->new('Test 32','B4 12', 1); push @keeps, $page->Append(Wx::UIntProperty->new('Test 33','B5 9', 1)); push @undef, $page->Append(Wx::UIntProperty->new('Test 34','B6 10', 1)); push @keeps, Wx::UIntProperty->new('Test 35','Test 11', 1); push @undef, Wx::UIntProperty->new('Test 36','Test 12', 1); push @keeps, $page->Append(Wx::BoolProperty->new('Test 33','B7 9', 1)); push @undef, $page->Append(Wx::BoolProperty->new('Test 34','B8 10', 1)); push @keeps, Wx::BoolProperty->new('Test 35','B9 11', 1); push @undef, Wx::BoolProperty->new('Test 36','C1 12', 1); push @keeps, $page->Append( Wx::EnumProperty->new('T1', 'C2',[ 'A','B'],[1,2],2)); push @undef, $page->Append( Wx::EnumProperty->new('T2', 'C3',[ 'A','B'],[1,2],2)); push @keeps, Wx::EnumProperty->new('T3', 'C4',[ 'A','B'],[1,2],2); push @undef, Wx::EnumProperty->new('T4', 'C5',[ 'A','B'],[1,2],2); { my $ch1 = Wx::PGChoices->new(); $ch1->Add("Choice 1"); $ch1->Add("Choice 2"); my $ch2 = Wx::PGChoices->new(); $ch2->Add("Choice 1"); $ch2->Add("Choice 2"); my $ch3 = Wx::PGChoices->new(); $ch3->Add("Choice 1"); $ch3->Add("Choice 2"); my $ch4 = Wx::PGChoices->new(); $ch4->Add("Choice 1"); $ch4->Add("Choice 2"); my $ch5 = Wx::PGChoices->new(); $ch5->Add("Choice 1"); $ch5->Add("Choice 2"); my $ch6 = Wx::PGChoices->new(); $ch6->Add("Choice 1"); $ch6->Add("Choice 2"); push @keeps, $page->Append( Wx::EditEnumProperty->new('E1', 'C6', $ch1, 'none' )); push @undef, $page->Append( Wx::EditEnumProperty->new('E2', 'C7', $ch2, 'none' )); push @keeps, Wx::EditEnumProperty->new('E3', 'C8', $ch3, 'none' ); push @undef, Wx::EditEnumProperty->new('E4', 'C9', $ch4, 'none' ); push @keeps, ( $ch2, $ch4, $ch6 ); push @undef, ( $ch1, $ch3, $ch5 ); } push @keeps, $page->Append( Wx::FlagsProperty->new('F1', 'D1',['F1','F2'],[1,2],1)); push @undef, $page->Append( Wx::FlagsProperty->new('F2', 'D2',['F1','F2'],[1,2],1)); push @keeps, Wx::FlagsProperty->new('F1', 'D3',['F1','F2'],[1,2],1); push @undef, Wx::FlagsProperty->new('F2', 'D4',['F1','F2'],[1,2],1); push @keeps, $page->Append(Wx::CursorProperty->new('D5','D6') ); push @undef, $page->Append(Wx::CursorProperty->new('D6','D7') ); push @keeps, Wx::CursorProperty->new('D7','D8'); push @undef, Wx::CursorProperty->new('D8','D5'); push @keeps, $page->Append(Wx::ArrayStringProperty->new('G1','G1',['S1','S2'] ) ); push @undef, $page->Append(Wx::ArrayStringProperty->new('G2','G2',['S1','S2'] ) ); push @keeps, Wx::ArrayStringProperty->new('G3','G3',['S1','S2'] ); push @undef, Wx::ArrayStringProperty->new('G4','G4',['S1','S2'] ); push @keeps, $page->Append(Wx::MultiChoiceProperty->new('G5','G5',[qw( A B C)], [qw(B C)] ) ); push @undef, $page->Append(Wx::MultiChoiceProperty->new('G6','G6',[qw( A B C)], [qw(B C)] ) ); push @keeps, Wx::MultiChoiceProperty->new('G7','G7',[qw( A B C)], [qw(B C)] ) ; push @undef, Wx::MultiChoiceProperty->new('G8','G8',[qw( A B C)], [qw(B C)] ) ; push @keeps, $page->Append(Wx::ColourProperty->new('H1','H1', Wx::Colour->new(1,1,1)) ); push @undef, $page->Append(Wx::ColourProperty->new('H2','H2', Wx::Colour->new(1,1,1)) ); push @keeps, Wx::ColourProperty->new('H3','H3', Wx::Colour->new(1,1,1)) ; push @undef, Wx::ColourProperty->new('H4','H4', Wx::Colour->new(1,1,1)) ; push @keeps, $page->Append(Wx::SystemColourProperty->new('H5','H5', Wx::ColourPropertyValue->new(wxSYS_COLOUR_MENU)) ); push @undef, $page->Append(Wx::SystemColourProperty->new('H6','H6', Wx::ColourPropertyValue->new(wxSYS_COLOUR_MENU)) ); push @keeps, Wx::SystemColourProperty->new('H7','H7', Wx::ColourPropertyValue->new(0xFF6633)) ; push @undef, Wx::SystemColourProperty->new('H8','H8', Wx::ColourPropertyValue->new(wxSYS_COLOUR_MENU)) ; push @keeps, $page->Append( Wx::FontProperty->new('J1', 'J1', wxNullFont ) ); push @undef, $page->Append( Wx::FontProperty->new('J2', 'J2', wxNullFont ) ); push @keeps, $page->Append( Wx::FontProperty->new('J3', 'J3', wxNullFont ) ); push @undef, $page->Append( Wx::FontProperty->new('J4', 'J4', wxNullFont ) ); push @keeps, $page->Append( Wx::DateProperty->new('J5', 'J5', Wx::DateTime::Now())); push @undef, $page->Append( Wx::DateProperty->new('J6', 'J6', Wx::DateTime::Now())); push @keeps, Wx::DateProperty->new('J7', 'J7', Wx::DateTime::Now()); push @undef, Wx::DateProperty->new('J8', 'J8', Wx::DateTime::Now()); for my $ename ( qw( TextCtrl Choice ComboBox TextCtrlAndButton CheckBox ChoiceAndButton SpinCtrl DatePickerCtrl ) ) { my $classname = qq(Wx::PG${ename}Editor); my $kpa = $page->Append(Wx::StringProperty->new($ename, $ename, '')); $page->SetPropertyEditor($kpa, $ename); # editors from grid push @keeps, $page->GetPropertyEditor($kpa); push @undef, $page->GetPropertyEditor($kpa); # editors created # can't create a DatePickerCtrl next if $ename eq 'DatePickerCtrl'; push @keeps,$classname->new(); push @undef,$classname->new(); } while ( my $prop = pop( @undef ) ) { undef $prop; } undef @undef; my $cell1 = Wx::PGCell->new; my $cell2 = Wx::PGCell->new; my $pgvi1 = Wx::PGValidationInfo->new; my $pgvi2 = Wx::PGValidationInfo->new; my $choice1 = Wx::PGChoices->new; my $choice2 = Wx::PGChoices->new; my $choiced1 = Wx::PGChoicesData->new; my $choiced2 = Wx::PGChoicesData->new; my $choicee1 = Wx::PGChoiceEntry->new; my $choicee2 = Wx::PGChoiceEntry->new; my $pgwlist1 = Wx::PGWindowList->new; my $pgwlist2 = Wx::PGWindowList->new; my $pgmbut1 = Wx::PGMultiButton->new( $propgrid, Wx::Size->new(10,10) ); my $pgmbut2 = Wx::PGMultiButton->new($propgrid, Wx::Size->new(10,10)); my $pgviter1 = Wx::PGVIterator->new; my $pgviter2 = Wx::PGVIterator->new; undef $cell2; undef $choice2; undef $choiced2; undef $choicee2; undef $pgvi2; undef $pgmbut2; undef $pgwlist2; undef $pgviter2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/propgrid/typemap000664000000000000 613312306612237 14516 0ustar00Mark000000000000############################################################################# ## Name: ext/propgrid/typemap ## Purpose: typemap ## Author: Mark Dootson ## Modified by: ## Created: 01/03/2012 ## SVN-ID: $Id:$ ## Copyright: (c) 2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxPropertyGridPage * O_WXEVTHANDLER wxPropertyGridManager * O_WXEVTHANDLER wxPropertyGrid * O_WXEVTHANDLER const wxPropertyGrid * O_WXEVTHANDLER wxPropertyGridInterface * O_WXEVTHANDLER wxPGMultiButton * O_WXEVTHANDLER ## Missing RTTI Info for Wx::Object wxPGCell * O_NON_WXOBJECT_THR wxPGChoiceEntry * O_NON_WXOBJECT_THR ## wxPGChoices * O_NON_WXOBJECT_THR wxPGValidationInfo * O_NON_WXOBJECT_THR wxPGChoicesData * O_NON_WXOBJECT wxPGCellData * O_NON_WXOBJECT wxPGCellRenderer * O_NON_WXOBJECT wxPGDefaultRenderer * O_NON_WXOBJECT wxPGWindowList * O_NON_WXOBJECT_THR wxPGEditor * O_WXOBJECT_THR const wxPGEditor * O_WXOBJECT_THR wxPGEditorDialogAdapter * O_WXOBJECT_THR wxPGTextCtrlEditor * O_WXOBJECT_THR wxPGChoiceEditor * O_WXOBJECT_THR wxPGComboBoxEditor * O_WXOBJECT_THR wxPGChoiceAndButtonEditor * O_WXOBJECT_THR wxPGTextCtrlAndButtonEditor * O_WXOBJECT_THR wxPGCheckBoxEditor * O_WXOBJECT_THR wxPGDatePickerCtrlEditor * O_WXOBJECT_THR wxPGSpinCtrlEditor * O_WXOBJECT_THR wxPropertyCategory * O_WXOBJECT_THR wxPGProperty * O_WXOBJECT_THR const wxPGProperty * O_WXOBJECT_THR wxPropertyGridEvent * O_WXOBJECT wxPGVIterator * O_NON_WXOBJECT wxPropertyGridIterator * O_NON_WXOBJECT wxPropertyGridIteratorBase * O_NON_WXOBJECT wxPropertyGridHitTestResult * O_NON_WXOBJECT wxPGPropertyFlags T_UV wxPGInDialogValidator * O_NON_WXOBJECT wxNumericPropertyValidator * O_WXOBJECT wxStringProperty * O_WXOBJECT_THR wxIntProperty * O_WXOBJECT_THR wxUIntProperty * O_WXOBJECT_THR wxFloatProperty * O_WXOBJECT_THR wxBoolProperty * O_WXOBJECT_THR wxEnumProperty * O_WXOBJECT_THR wxEditEnumProperty * O_WXOBJECT_THR wxFlagsProperty * O_WXOBJECT_THR wxFileProperty * O_WXOBJECT_THR wxLongStringProperty * O_WXOBJECT_THR wxDirProperty * O_WXOBJECT_THR wxArrayStringProperty * O_WXOBJECT_THR wxPGFileDialogAdapter * O_NON_WXOBJECT_THR wxPGLongStringDialogAdapter * O_NON_WXOBJECT_THR wxPGArrayEditorDialog * O_WXEVTHANDLER wxPGArrayStringEditorDialog * O_WXEVTHANDLER const wxWindow * O_WXOBJECT wxColourPropertyValue * O_WXOBJECT_THR wxFontProperty * O_WXOBJECT_THR wxSystemColourProperty * O_WXOBJECT_THR wxColourProperty * O_WXOBJECT_THR wxCursorProperty * O_WXOBJECT_THR wxImageFileProperty * O_WXOBJECT_THR wxMultiChoiceProperty * O_WXOBJECT_THR wxDateProperty * O_WXOBJECT_THR const wxVariant * O_NON_WXOBJECT_THR Wx-0.9923/ext/propgrid/typemap.xsp000664000000000000 1325712306612240 15346 0ustar00Mark000000000000############################################################################# ## Name: ext/propgrid/typemap.xsp ## Purpose: typemap file for xsubppp.pl ## Author: Mark Dootson ## Modified by: ## Created: 01/03/2012 ## SVN-ID: $Id: typemap.xsp 2962 2010-08-23 19:33:35Z mbarbon $ ## Copyright: (c) 2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %typemap{wxPGVIterator}{reference}; %typemap{const wxPGVIterator&}{reference}; %typemap{wxPGCell&}{reference}; %typemap{wxPGChoices&}{reference}; %typemap{wxPGChoices}{reference}; %typemap{const wxPGChoices&}{reference}; %typemap{const wxPGCell&}{reference}; %typemap{wxPGValidationInfo&}{reference}; %typemap{wxPGCellRenderer*}{simple}; %typemap{wxPGEditorDialogAdapter*}{simple}; %typemap{wxPGPropertyFlags}{simple}; %typemap{wxPGPaintData&}{reference}; /* %typemap{const wxPGCellData*}{simple}; */ %typemap{wxPGChoicesData*}{simple}; %typemap{wxPGChoiceEntry&}{reference}; %typemap{const wxPGChoiceEntry&}{reference}; %typemap{wxPGWindowList}{reference}; %typemap{wxPropertyGrid*}{simple}; %typemap{const wxPropertyGrid*}{simple}; %typemap{wxPropertyGridHitTestResult}{reference}; %typemap{wxPropertyGridIterator}{reference}; %typemap{wxPropertyCategory*}{simple}; %typemap{wxPGEditor*}{simple}; %typemap{const wxPGEditor*}{simple}; %typemap{const wxPropertyGridEvent&}{reference}; %typemap{const wxPropertyGridIteratorBase&}{reference}; %typemap{wxPropertyGridInterface*}{simple}; %typemap{wxPropertyGridInterface}{reference}; %typemap{wxPropertyGridInterface&}{reference}; %typemap{wxPropertyGridPageState*}{simple}; %typemap{wxPropertyGridPage*}{simple}; %typemap{wxArrayPGProperty*}{simple}; %typemap{const wxArrayPGProperty&}{reference}; %typemap{wxBitmap*}{simple}; %typemap{wxBitmap&}{reference}; %typemap{wxDateTime}{reference}; %typemap{wxValidator*}{simple}; %typemap{wxVariant*}{simple}; %typemap{wxVariant&}{reference}; %typemap{wxVariant}{reference}; %typemap{wxVariantArg}{parsed}{ %cpp_type{%wxVariant%}; %precall_code{% $CVar = wxPli_sv_2_wxvariant( aTHX_ $PerlVar ); %}; }; %typemap{wxEvent&}{reference}; %typemap{wxFont&}{reference}; %typemap{wxRect}{reference}; %typemap{wxStatusBar*}{simple}; %typemap{wxArrayString*}{simple}; %typemap{wxLongLong_t}{simple}; %typemap{wxULongLong_t}{simple}; %typemap{wxPGInDialogValidator*}{simple}; %typemap{wxNumericPropertyValidator*}{simple}; %typemap{wxIntProperty*}{simple}; %typemap{wxUIntProperty*}{simple}; %typemap{wxFloatProperty*}{simple}; %typemap{wxBoolProperty*}{simple}; %typemap{wxEnumProperty*}{simple}; %typemap{wxEditEnumProperty*}{simple}; %typemap{wxFlagsProperty*}{simple}; %typemap{wxFileProperty*}{simple}; %typemap{wxLongStringProperty*}{simple}; %typemap{wxDirProperty*}{simple}; %typemap{wxArrayStringProperty*}{simple}; %typemap{wxPGFileDialogAdapter*}{simple}; %typemap{wxPGLongStringDialogAdapter*}{simple}; %typemap{wxPGArrayEditorDialog*}{simple}; %typemap{wxPlPGArrayEditorDialog*}{simple}; %typemap{wxPGArrayStringEditorDialog*}{simple}; %typemap{const wxLongLong&}{reference}; %typemap{const wxULongLong&}{reference}; %typemap{const long*}{simple}; %typemap{wxPGChoices*}{simple}; %typemap{wxString*}{simple}; %typemap{const wxUniChar&}{reference}; %typemap{wxUniChar}{reference}; %typemap{wxCommandEvent&}{reference}; %typemap{wxListEvent&}{reference}; %typemap{wxIdleEvent&}{reference}; %typemap{const wxWindow*}{simple}; %typemap{wxColourPropertyValue}{reference}; %typemap{const wxColourPropertyValue&}{reference}; %typemap{wxFontProperty*}{simple}; %typemap{wxPlFontProperty*}{simple}; %typemap{wxSystemColourProperty*}{simple}; %typemap{wxColourProperty*}{simple}; %typemap{wxCursorProperty*}{simple}; %typemap{wxImageFileProperty*}{simple}; %typemap{wxMultiChoiceProperty*}{simple}; %typemap{wxDateProperty*}{simple}; %typemap{wxPGSpinCtrlEditor*}{simple}; %typemap{const wxVariant*}{simple}; %typemap{wxColour&}{reference}; %typemap{wxColour*}{simple}; %typemap{WXVARIANT}{simple}; %typemap{wxStringProperty*}{simple}; %typemap{wxPGProperty&}{reference}; %typemap{const wxPGProperty*}{simple}; %typemap{wxPGProperty*}{simple}; %typemap{Wx_UserDataCD*}{simple}; %typemap{wxPGProperty__parsed_nodelete*}{parsed}{ %cpp_type{%wxPGProperty*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; %precall_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; %typemap{const wxPGProperty__parsed_nodelete*}{parsed}{ %cpp_type{%const wxPGProperty*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; %precall_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; %typemap{wxPGProperty__parsed_allowdelete*}{parsed}{ %cpp_type{%wxPGProperty*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, true )%}; %precall_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, true )%}; }; %typemap{wxPropertyCategory__parsed_nodelete*}{parsed}{ %cpp_type{%wxPropertyCategory*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; %precall_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; %typemap{wxPGEditor__parsed_nodelete*}{parsed}{ %cpp_type{%wxPGEditor*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; %precall_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; %typemap{const wxPGEditor__parsed_nodelete*}{parsed}{ %cpp_type{%const wxPGEditor*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; %precall_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; Wx-0.9923/ext/propgrid/XS/000775000000000000 012316265011 13356 5ustar00Mark000000000000Wx-0.9923/ext/propgrid/XS/PGCell.xsp000664000000000000 1466112306612240 15327 0ustar00Mark000000000000############################################################################# ## Name: ext/propgrid/XS/PGCell.xsp ## Purpose: XS++ for Wx::PGCell ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_PROPGRID #include %loadplugin{build::Wx::XSP::Overload}; %name{Wx::PGCell} class wxPGCell : public %name{Wx::Object} wxObject { %{ static void wxPGCell::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: %name{newDefault} wxPGCell() %Overload; %name{newCopy} wxPGCell(const wxPGCell& other) %Overload; %name{newFull}wxPGCell( const wxString& text, const wxBitmap& bitmap = wxNullBitmapPtr, const wxColour& fgCol = wxNullColourPtr, const wxColour& bgCol = wxNullColourPtr ) %Overload; ~wxPGCell() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; %}; /* NOT WRAP */ /* const wxPGCellData* GetData() const; */ bool HasText() const; void MergeFrom( const wxPGCell& srcCell ); void SetText( const wxString& text ); void SetBitmap( const wxBitmap& bitmap ); void SetFgCol( const wxColour& col ); void SetFont( const wxFont& font ); void SetBgCol( const wxColour& col ); const wxString& GetText() const; const wxBitmap& GetBitmap() const; const wxColour& GetFgCol() const; const wxFont& GetFont() const; const wxColour& GetBgCol() const; }; %name{Wx::PGChoices} class wxPGChoices { %{ static void wxPGChoices::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: %name{newDefault} wxPGChoices() %Overload; %name{newCopy} wxPGChoices( const wxPGChoices& a ) %Overload; %name{newArrayString} wxPGChoices( const wxArrayString& labels, const wxArrayInt& values = wxArrayInt() ) %Overload; %name{newChoicesData} wxPGChoices( wxPGChoicesData* data ) %Overload; ~wxPGChoices() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; %}; %name{AddArrayString} void Add( const wxArrayString& arr, const wxArrayInt& arrint ) %Overload; /** Adds single item. */ %name{AddSingleItem} wxPGChoiceEntry& Add( const wxString& label, int value = wxPG_INVALID_VALUE ) %Overload; /** Adds a single item, with bitmap. */ %name{AddSingleBitmapItem} wxPGChoiceEntry& Add( const wxString& label, const wxBitmap& bitmap, int value = wxPG_INVALID_VALUE ) %Overload; /** Adds a single item with full entry information. */ %name{AddCoiceEntry} wxPGChoiceEntry& Add( const wxPGChoiceEntry& entry ) %Overload; /** Adds single item, sorted. */ wxPGChoiceEntry& AddAsSorted( const wxString& label, int value = wxPG_INVALID_VALUE ); void Assign( const wxPGChoices& a ); void AssignData( wxPGChoicesData* data ); void Clear(); wxPGChoices Copy() const; const wxString& GetLabel( unsigned int ind ) const; unsigned int GetCount() const; int GetValue( unsigned int ind ) const; wxArrayInt GetValuesForStrings( const wxArrayString& strings ) const; /* TODO FIXME wxArrayInt GetIndicesForStrings( const wxArrayString& strings, wxArrayString* unmatched ) const; */ /* wxPGProperty* GetItemAtY( unsigned int y ) const; */ /* bool HasValue( unsigned int i ) const; */ %name{IndexFromString} int Index( const wxString& label ) const %Overload; %name{IndexFromInt} int Index( int val ) const %Overload; %name{InsertStringLabel} wxPGChoiceEntry& Insert( const wxString& label, int index, int value = wxPG_INVALID_VALUE ) %Overload; %name{InsertChoiceEntry} wxPGChoiceEntry& Insert( const wxPGChoiceEntry& entry, int index ) %Overload; bool IsOk() const; wxPGChoiceEntry& Item( unsigned int i ); void RemoveAt(size_t nIndex, size_t count = 1); void Set( const wxArrayString& labels, const wxArrayInt& values = wxArrayInt() ); void AllocExclusive(); wxArrayString GetLabels() const; /*void operator= (const wxPGChoices& a); */ /* wxPGChoiceEntry& operator[](unsigned int i); */ /* const wxPGChoiceEntry& operator[](unsigned int i) const; */ }; %name{Wx::PGChoicesData} class wxPGChoicesData : public wxObjectRefData { public: wxPGChoicesData(); void CopyDataFrom( wxPGChoicesData* data ); wxPGChoiceEntry& Insert( int index, const wxPGChoiceEntry& item ); void Clear(); unsigned int GetCount() const; wxPGChoiceEntry& Item( unsigned int i ); private: ~wxPGChoicesData() %code%{ THIS->wxObjectRefData->DecRef(); %}; }; %name{Wx::PGChoiceEntry} class wxPGChoiceEntry : public %name{Wx::PGCell} wxPGCell { %{ static void wxPGChoiceEntry::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: %name{newDefault} wxPGChoiceEntry() %Overload; %name{newCopy} wxPGChoiceEntry(const wxPGChoiceEntry& other) %Overload; %name{newValues} wxPGChoiceEntry( const wxString& label, int value = wxPG_INVALID_VALUE ) %Overload; ~wxPGChoiceEntry() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; %}; void SetValue( int value ); int GetValue() const; }; %name{Wx::PGValidationInfo} class wxPGValidationInfo { %{ static void wxPGValidationInfo::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: wxPGValidationInfo(); ~wxPGValidationInfo() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; %}; wxByte GetFailureBehavior(); const wxString& GetFailureMessage() const; wxVariant& GetValue(); void SetFailureBehavior(wxByte failureBehavior); void SetFailureMessage(const wxString& message); }; #endif Wx-0.9923/ext/propgrid/XS/PGCellRenderer.xsp000664000000000000 436412306612240 16775 0ustar00Mark000000000000############################################################################# ## Name: ext/propgrid/XS/PGCellRenderer.xsp ## Purpose: XS++ for Wx::PGCellRenderer ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_PROPGRID #include %loadplugin{build::Wx::XSP::Overload}; %name{Wx::PGCellRenderer} class wxPGCellRenderer : public wxObjectRefData { public: /* wxPGCellRenderer(); */ /* ~wxPGCellRenderer() %code%{ THIS->wxObjectRefData::DecRef(); %}; */ virtual bool Render( wxDC& dc, const wxRect& rect, const wxPropertyGrid* propertyGrid, wxPGProperty* property, int column, int item, int flags ) const; /* = 0 %Virtual{pure}; */ virtual wxSize GetImageSize( wxPGProperty* property, int column, int item ) const; /* %Virtual; */ virtual void DrawCaptionSelectionRect( wxDC& dc, int x, int y, int w, int h ) const; /* %Virtual; */ void DrawText( wxDC& dc, const wxRect& rect, int imageWidth, const wxString& text ) const; void DrawEditorValue( wxDC& dc, const wxRect& rect, int xOffset, const wxString& text, wxPGProperty* property, const wxPGEditor* editor ) const; int PreDrawCell( wxDC& dc, const wxRect& rect, const wxPGCell& cell, int flags ) const; void PostDrawCell( wxDC& dc, const wxPropertyGrid* propGrid, const wxPGCell& cell, int flags ) const; }; #endif Wx-0.9923/ext/propgrid/XS/PGEditor.xsp000664000000000000 3502212306612240 15670 0ustar00Mark000000000000############################################################################# ## Name: ext/propgrid/XS/PGEditor.xsp ## Purpose: XS++ for Wx::PGEditor ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_PROPGRID %loadplugin{build::Wx::XSP::Overload}; %name{Wx::PGWindowList} class wxPGWindowList { %{ static void wxPGWindowList::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: %name{newDefault} wxPGWindowList() %Overload; %name{newOneWindow} wxPGWindowList( wxWindow* a ) %Overload; %name{newTwoWindows} wxPGWindowList( wxWindow* a, wxWindow* b ) %Overload; ~wxPGWindowList() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::PGWindowList", THIS, ST(0) ); delete THIS; %}; void SetSecondary( wxWindow* secondary ); }; %name{Wx::PGMultiButton} class wxPGMultiButton : public %name{Wx::Window} wxWindow { public: wxPGMultiButton( wxPropertyGrid* pg, const wxSize& sz ) %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{AddString} void Add( const wxString& label, int id = -2 ) %Overload; %name{AddBitmap} void Add( const wxBitmap& bitmap, int id = -2 ) %Overload; void Finalize( wxPropertyGrid* propGrid, const wxPoint& pos ); wxWindow* GetButton( unsigned int i ); int GetButtonId( unsigned int i ) const; unsigned int GetCount(); wxSize GetPrimarySize() const; }; %name{Wx::PGEditor} class wxPGEditor : public %name{Wx::Object} wxObject { %{ static void wxPGEditor::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: ~wxPGEditor() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; %}; virtual wxString GetName() const; /* %Virtual; */ virtual wxPGWindowList CreateControls( wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size ) const; /* = 0; %Virtual{pure}; */ /** Loads value from property to the control. */ virtual void UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const; /* = 0 %Virtual{pure}; */ virtual void DrawValue( wxDC& dc, const wxRect& rect, wxPGProperty* property, const wxString& text ) const; /* %Virtual; */ virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* wnd_primary, wxEvent& event ) const; /* = 0 %Virtual{pure}; */ virtual bool GetValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* ctrl ) const; /* %Virtual; */ virtual void SetValueToUnspecified( wxPGProperty* property, wxWindow* ctrl ) const; /* = 0 %Virtual{pure}; */ virtual void SetControlAppearance( wxPropertyGrid* pg, wxPGProperty* property, wxWindow* ctrl, const wxPGCell& appearance, const wxPGCell& oldAppearance, bool unspecified ) const; /* %Virtual; */ /** Sets control's value specifically from string. */ virtual void SetControlStringValue( wxPGProperty* property, wxWindow* ctrl, const wxString& txt ) const; /* %Virtual; */ /** Sets control's value specifically from int (applies to choice etc.). */ virtual void SetControlIntValue( wxPGProperty* property, wxWindow* ctrl, int value ) const; /* %Virtual; */ virtual int InsertItem( wxWindow* ctrl, const wxString& label, int index ) const; /* %Virtual; */ virtual void DeleteItem( wxWindow* ctrl, int index ) const; /* %Virtual; */ virtual void OnFocus( wxPGProperty* property, wxWindow* wnd ) const; /* %Virtual; */ virtual bool CanContainCustomImage() const; /* %Virtual; */ }; %name{Wx::PGEditorDialogAdapter} class wxPGEditorDialogAdapter : public %name{Wx::Object} wxObject { %{ static void wxPGEditorDialogAdapter::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: ~wxPGEditorDialogAdapter() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::PGEditorDialogAdapter", THIS, ST(0) ); delete THIS; %}; bool ShowDialog( wxPropertyGrid* propGrid, wxPGProperty* property ); virtual bool DoShowDialog( wxPropertyGrid* propGrid, wxPGProperty* property ); /* = 0 %Virtual{pure}; */ void SetValue( wxVariant value ); wxVariant& GetValue(); }; %name{Wx::PGTextCtrlEditor} class wxPGTextCtrlEditor : public %name{Wx::PGEditor} wxPGEditor { public: wxPGTextCtrlEditor(); virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const; /* %Virtual; */ virtual void UpdateControl( wxPGProperty* property, wxWindow* ctrl ); /* %Virtual; */ virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* primaryCtrl, wxEvent& event ) const; /* %Virtual; */ virtual bool GetValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* ctrl ); /* %Virtual; */ virtual wxString GetName(); /* %Virtual; */ //virtual wxPGCellRenderer* GetCellRenderer() const; virtual void SetControlStringValue( wxPGProperty* property, wxWindow* ctrl, const wxString& txt ); /* %Virtual; */ virtual void OnFocus( wxPGProperty* property, wxWindow* wnd ); /* %Virtual; */ // Provided so that, for example, ComboBox editor can use the same code // (multiple inheritance would get way too messy). static bool OnTextCtrlEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* ctrl, wxEvent& event ); static bool GetTextCtrlValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* ctrl ); }; %name{Wx::PGChoiceEditor} class wxPGChoiceEditor : public %name{Wx::PGEditor} wxPGEditor { public: wxPGChoiceEditor(); virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const; /* %Virtual; */ virtual void UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const; /* %Virtual; */ virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* primaryCtrl, wxEvent& event ) const; /* %Virtual; */ virtual bool GetValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* ctrl ) const; /* %Virtual; */ virtual void SetValueToUnspecified( wxPGProperty* property, wxWindow* ctrl ) const; /* %Virtual; */ virtual wxString GetName() const; /* %Virtual; */ virtual void SetControlIntValue( wxPGProperty* property, wxWindow* ctrl, int value ) const; /* %Virtual; */ virtual void SetControlStringValue( wxPGProperty* property, wxWindow* ctrl, const wxString& txt ) const; /* %Virtual; */ virtual int InsertItem( wxWindow* ctrl, const wxString& label, int index ) const; /* %Virtual; */ virtual void DeleteItem( wxWindow* ctrl, int index ) const; /* %Virtual; */ virtual bool CanContainCustomImage() const; /* %Virtual; */ // CreateControls calls this with CB_READONLY in extraStyle wxWindow* CreateControlsBase( wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& sz, long extraStyle ) const; }; %name{Wx::PGComboBoxEditor} class wxPGComboBoxEditor : public %name{Wx::PGChoiceEditor} wxPGChoiceEditor { public: wxPGComboBoxEditor(); virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const; /* %Virtual; */ virtual wxString GetName() const; /* %Virtual; */ virtual void UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const; /* %Virtual; */ virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* ctrl, wxEvent& event ) const; /* %Virtual; */ virtual bool GetValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* ctrl ) const; /* %Virtual; */ virtual void OnFocus( wxPGProperty* property, wxWindow* wnd ) const; /* %Virtual; */ }; %name{Wx::PGChoiceAndButtonEditor} class wxPGChoiceAndButtonEditor : public %name{Wx::PGChoiceEditor} wxPGChoiceEditor { public: wxPGChoiceAndButtonEditor(); virtual wxString GetName() const; /* %Virtual; */ virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const; /* %Virtual; */ }; %name{Wx::PGTextCtrlAndButtonEditor} class wxPGTextCtrlAndButtonEditor : public %name{Wx::PGTextCtrlEditor} wxPGTextCtrlEditor { public: wxPGTextCtrlAndButtonEditor(); virtual wxString GetName() const; /* %Virtual; */ virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const; /* %Virtual; */ }; #if wxPG_INCLUDE_CHECKBOX // // Use custom check box code instead of native control // for cleaner (ie. more integrated) look. // %name{Wx::PGCheckBoxEditor} class wxPGCheckBoxEditor : public %name{Wx::PGEditor} wxPGEditor { public: wxPGCheckBoxEditor(); virtual wxString GetName() const; /* %Virtual; */ virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const; /* %Virtual; */ virtual void UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const; /* %Virtual; */ virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* primaryCtrl, wxEvent& event ) const; /* %Virtual; */ virtual bool GetValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* ctrl ) const; /* %Virtual; */ virtual void SetValueToUnspecified( wxPGProperty* property, wxWindow* ctrl ) const; /* %Virtual; */ virtual void DrawValue( wxDC& dc, const wxRect& rect, wxPGProperty* property, const wxString& text ) const; /* %Virtual; */ //virtual wxPGCellRenderer* GetCellRenderer() const; virtual void SetControlIntValue( wxPGProperty* property, wxWindow* ctrl, int value ) const; /* %Virtual; */ }; #endif #if wxUSE_SPINBTN #include "wx/spinbutt.h" #include "wx/propgrid/editors.h" %name{Wx::PGSpinCtrlEditor} class wxPGSpinCtrlEditor : public %name{Wx::PGTextCtrlEditor} wxPGTextCtrlEditor { public: wxPGSpinCtrlEditor(); wxString GetName() const; virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const; virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* wnd, wxEvent& event ) const; }; #endif // wxUSE_SPINBTN #if wxUSE_DATEPICKCTRL %name{Wx::PGDatePickerCtrlEditor} class wxPGDatePickerCtrlEditor : public %name{Wx::PGEditor} wxPGEditor { public: wxString GetName() const; virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid, wxPGProperty* property, const wxPoint& pos, const wxSize& size) const; virtual void UpdateControl( wxPGProperty* property, wxWindow* wnd ) const; virtual bool OnEvent( wxPropertyGrid* propgrid, wxPGProperty* property, wxWindow* wnd, wxEvent& event ) const; virtual bool GetValueFromControl( wxVariant& variant, wxPGProperty* property, wxWindow* wnd ) const; virtual void SetValueToUnspecified( wxPGProperty* property, wxWindow* wnd ) const; }; #endif // wxUSE_DATEPICKCTRL #endif Wx-0.9923/ext/propgrid/XS/PGProperty.xsp000664000000000000 12710412306612240 16311 0ustar00Mark000000000000############################################################################# ## Name: ext/propgrid/XS/PGProperty.xsp ## Purpose: XS++ for Wx::PGProperty ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_PROPGRID ## DECLARE_OVERLOAD( wpgc, Wx::PGChoices ) %loadplugin{build::Wx::XSP::Overload}; %name{Wx::PropertyCategory} class wxPropertyCategory : public %name{Wx::PGProperty} wxPGProperty { public: /** Default constructor is only used in special cases. */ %name{newDefault} wxPropertyCategory() %Overload; %name{newFull} wxPropertyCategory( const wxString& label, const wxString& name = wxPG_LABEL ) %Overload; int GetTextExtent( const wxWindow* wnd, const wxFont& font ) const; virtual wxString ValueToString( wxVariant value, int argFlags ) const; virtual wxString GetValueAsString( int argFlags = 0 ) const; }; /*********************************************************************************** * * Wx::PGProperty * * *********************************************************************************/ %name{Wx::PGProperty} class wxPGProperty : public %name{Wx::Object} wxObject { /* CLONE method to be inherited by all property classes */ %{ static void wxPGProperty::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: /* no point in allowing constructors when we havn't yet wrapped pure virtual methods */ /* %name{newDefault} wxPGProperty() %Overload; */ /* %name{newFull} wxPGProperty( const wxString& label, const wxString& name ) %Overload; */ /* Destructor for all Property Classes */ ~wxPGProperty() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; %}; virtual void OnSetValue(); /* %Virtual; */ virtual wxVariant DoGetValue() const; /* %Virtual; */ virtual bool ValidateValue( wxVariant& value, wxPGValidationInfo& validationInfo ) const; /* %Virtual; */ virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; /* %Virtual; */ /* TODO virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const; virtual bool IntToValue( wxVariant& variant, int number, int argFlags = 0 ) const; */ bool SetValueFromString( const wxString& text, int flags = 0 ); bool SetValueFromInt( long value, int flags = 0 ); virtual wxSize OnMeasureImage( int item = -1 ) const; /* %Virtual; */ virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* wnd_primary, wxEvent& event ); /* %Virtual; */ virtual wxVariant ChildChanged( wxVariant& thisValue, int childIndex, wxVariant& childValue ) const; /* %Virtual; */ virtual const wxPGEditor__parsed_nodelete* DoGetEditorClass() const; /* %Virtual; */ virtual wxValidator* DoGetValidator () const; /* %Virtual; */ /* TODO FIXME wrap wxPGPaintData virtual void OnCustomPaint( wxDC& dc, const wxRect& rect, wxPGPaintData& paintdata ) %Virtual; */ virtual wxPGCellRenderer* GetCellRenderer( int column ) const; /* %Virtual; */ virtual int GetChoiceSelection() const; /* %Virtual; */ virtual void RefreshChildren(); /* %Virtual; */ virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); /* %Virtual; */ virtual wxVariant DoGetAttribute( const wxString& name ) const; /* %Virtual; */ virtual wxPGEditorDialogAdapter* GetEditorDialog() const; /* %Virtual; */ virtual void OnValidationFailure( wxVariant& pendingValue ); /* %Virtual; */ int AddChoice( const wxString& label, int value = wxPG_INVALID_VALUE ); void AddPrivateChild( wxPGProperty__parsed_nodelete* prop ); void AdaptListToValue( wxVariant& list, wxVariant* value ) const; wxPGProperty__parsed_nodelete* AppendChild( wxPGProperty__parsed_nodelete* childProperty ); bool AreAllChildrenSpecified( wxVariant* pendingList = NULL ) const; bool AreChildrenComponents() const; void ChangeFlag( wxPGPropertyFlags flag, bool set ); void DeleteChildren(); void DeleteChoice( int index ); /* void Empty(); */ void Enable( bool enable = true ); wxString GenerateComposedValue() const; wxVariant GetAttribute( const wxString& name ) const; wxString GetAttribute( const wxString& name, const wxString& defVal ) const; long GetAttributeAsLong( const wxString& name, long defVal ) const; double GetAttributeAsDouble( const wxString& name, double defVal ) const; wxVariant GetAttributesAsList() const; const wxPGEditor__parsed_nodelete* GetColumnEditor( int column ) const; const wxString& GetBaseName() const; const wxPGCell& GetCell( unsigned int column ) const; wxPGCell& GetCell( unsigned int column ); wxPGCell& GetOrCreateCell( unsigned int column ); unsigned int GetChildCount() const; int GetChildrenHeight( int lh, int iMax = -1 ) const; const wxPGChoices& GetChoices() const; Wx_UserDataCD* GetClientData() const %code{% RETVAL = (wxPliUserDataCD*)THIS->GetClientObject(); %}; wxVariant GetDefaultValue() const; wxString GetDisplayedString() const; const wxPGEditor__parsed_nodelete* GetEditorClass() const; wxUint32 GetFlags() const; wxPropertyGrid* GetGrid() const; wxPropertyGrid* GetGridIfDisplayed() const; const wxString& GetHelpString() const; unsigned int GetIndexInParent() const; const wxString& GetLabel() const; const wxPGProperty__parsed_nodelete* GetLastVisibleSubItem() const; wxPGProperty__parsed_nodelete* GetMainParent() const; int GetMaxLength() const; wxString GetName() const; wxPGProperty__parsed_nodelete* GetParent() const; wxPGProperty__parsed_nodelete* GetPropertyByName( const wxString& name ) const; wxValidator* GetValidator() const; wxVariant GetValue() const; wxBitmap* GetValueImage() const; virtual wxString GetValueAsString( int argFlags = 0 ) const; /* %Virtual; */ wxString GetValueType() const; int GetY() const; wxUint32 HasFlag( wxPGPropertyFlags flag ) const; bool HasVisibleChildren() const; bool Hide( bool hide, int flags = wxPG_RECURSE ); int Index( wxPGProperty* p ) const; wxPGProperty__parsed_nodelete* InsertChild( int index, wxPGProperty__parsed_nodelete* childProperty ); int InsertChoice( const wxString& label, int index, int value = wxPG_INVALID_VALUE ); bool IsCategory() const; bool IsEnabled() const; bool IsExpanded() const; bool IsRoot() const; bool IsSomeParent( wxPGProperty* candidateParent ) const; bool IsTextEditable() const; bool IsValueUnspecified() const; bool IsVisible() const; wxPGProperty__parsed_nodelete* Item( unsigned int i ) const; void RefreshEditor(); void SetAttribute( const wxString& name, wxVariantArg value ); void SetAutoUnspecified( bool enable = true ); void SetBackgroundColour( const wxColour& colour, int flags = wxPG_RECURSE ); %name{SetEditorEditor} void SetEditor( const wxPGEditor__parsed_nodelete* editor ) %Overload; %name{SetEditorEditorName} void SetEditor( const wxString& editorName ) %Overload; void SetCell( int column, const wxPGCell& cell ); bool SetChoices( wxPGChoices& choices ); %name{SetClientData} void SetClientObject( Wx_UserDataCD* data ); void SetChoiceSelection( int newValue ); void SetDefaultValue( wxVariant& value ); void SetFlagRecursively( wxPGPropertyFlags flag, bool set ); void SetHelpString( const wxString& helpString ); void SetLabel( const wxString& label ); bool SetMaxLength( int maxLen ); void SetModifiedStatus( bool modified ); void SetName( const wxString& newName ); void SetParentalType( int flag ); void SetTextColour( const wxColour& colour, int flags = wxPG_RECURSE ); void SetValidator( const wxValidator& validator ); void SetValue( wxVariant value, wxVariant* pList = NULL, int flags = wxPG_SETVAL_REFRESH_EDITOR ); void SetValueImage( wxBitmap& bmp ); void SetValueInEvent( wxVariant value ) const; void SetValueToUnspecified(); void SetWasModified( bool set = true ); wxPGProperty__parsed_nodelete* UpdateParentValues(); bool UsesAutoUnspecified() const; }; %name{Wx::StringProperty} class wxStringProperty : public wxPGProperty { public: wxStringProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxString& value = wxEmptyString ); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); virtual void OnSetValue(); /************** Begin wxPerl Methods ***********************************************/ wxString GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% RETVAL = THIS->GetValueAsString( flags ); %}; bool SetPlValue( const wxString& text, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% RETVAL = THIS->SetValueFromString( text, flags ); %}; /************** End wxPerl Methods ***********************************************/ }; %name{Wx::IntProperty} class wxIntProperty : public %name{Wx::PGProperty} wxPGProperty { public: wxIntProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, long value = 0 ); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const; virtual bool ValidateValue( wxVariant& value, wxPGValidationInfo& validationInfo ) const; virtual bool IntToValue( wxVariant& variant, int number, int argFlags = 0 ) const; static wxValidator* GetClassValidator(); virtual wxValidator* DoGetValidator() const; /************** Begin wxPerl Methods ***********************************************/ wxString GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% RETVAL = THIS->GetValueAsString( flags ); %}; bool SetPlValue( const wxString& text, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% RETVAL = THIS->SetValueFromString( text, flags ); %}; /************** End wxPerl Methods ***********************************************/ }; %name{Wx::UIntProperty} class wxUIntProperty : public %name{Wx::PGProperty} wxPGProperty { public: /* wxUIntProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, unsigned long value = 0 ); */ wxUIntProperty( const wxString& label, const wxString& name, wxULongLong_t value ); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); virtual bool ValidateValue( wxVariant& value, wxPGValidationInfo& validationInfo ) const; virtual wxValidator* DoGetValidator () const; virtual bool IntToValue( wxVariant& variant, int number, int argFlags = 0 ) const; /************** Begin wxPerl Methods ***********************************************/ wxString GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% RETVAL = THIS->GetValueAsString( flags ); %}; bool SetPlValue( const wxString& text, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% RETVAL = THIS->SetValueFromString( text, flags ); %}; /************** End wxPerl Methods ***********************************************/ }; %name{Wx::FloatProperty} class wxFloatProperty : public %name{Wx::PGProperty} wxPGProperty { public: wxFloatProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, double value = 0.0 ); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); virtual bool ValidateValue( wxVariant& value, wxPGValidationInfo& validationInfo ) const; static wxValidator* GetClassValidator(); virtual wxValidator* DoGetValidator () const; /************** Begin wxPerl Methods ***********************************************/ wxString GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% RETVAL = THIS->GetValueAsString( flags ); %}; bool SetPlValue( const wxString& text, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% RETVAL = THIS->SetValueFromString( text, flags ); %}; /************** End wxPerl Methods ***********************************************/ }; %name{Wx::BoolProperty} class wxBoolProperty : public %name{Wx::PGProperty} wxPGProperty { public: wxBoolProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, bool value = false ); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const; virtual bool IntToValue( wxVariant& variant, int number, int argFlags = 0 ) const; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); /************** Begin wxPerl Methods ***********************************************/ bool GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% wxVariant var = THIS->GetValue(); RETVAL = var.GetBool(); %}; bool SetPlValue( bool val, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% THIS->SetValue( val, NULL, flags ); RETVAL = true; %}; /************** End wxPerl Methods ***********************************************/ }; %name{Wx::EnumProperty} class wxEnumProperty : public %name{Wx::PGProperty} wxPGProperty { public: %{ void wxEnumProperty::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newArrays ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_s_wpgc_n, newChoices, 3 ) MATCH_REDISP_COUNT_ALLOWMORE(wxPliOvl_s_s_arr_arr_n, newArrays, 3 ) END_OVERLOAD( Wx::EnumProperty::new ) %} %name{newChoices} wxEnumProperty( const wxString& label, const wxString& name, wxPGChoices& choices, int value = 0 ); %name{newArrays} wxEnumProperty( const wxString& label, const wxString& name, const wxArrayString& labels, const wxArrayInt& values = wxArrayInt(), int value = 0 ); size_t GetItemCount() const; virtual void OnSetValue(); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const; virtual bool ValidateValue( wxVariant& value, wxPGValidationInfo& validationInfo ) const; // If wxPG_FULL_VALUE is not set in flags, then the value is interpreted // as index to choices list. Otherwise, it is actual value. virtual bool IntToValue( wxVariant& variant, int number, int argFlags = 0 ) const; // This must be overridden to have non-index based value virtual int GetIndexForValue( int value ) const; // GetChoiceSelection needs to overridden since m_index is // the true index, and various property classes derived from // this take advantage of it. virtual int GetChoiceSelection() const; virtual void OnValidationFailure( wxVariant& pendingValue ); /************** Begin wxPerl Methods ***********************************************/ long GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% RETVAL = THIS->GetValue().GetLong(); %}; bool SetPlValue( long newval, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% THIS->SetValue( newval, NULL, flags ); RETVAL = true; %}; /************** End wxPerl Methods ***********************************************/ }; %name{Wx::EditEnumProperty} class wxEditEnumProperty : public %name{Wx::EnumProperty} wxEnumProperty { public: %{ void wxEditEnumProperty::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newArrays ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_s_wpgc_s, newChoices, 3 ) MATCH_REDISP_COUNT_ALLOWMORE(wxPliOvl_s_s_arr_arr_s, newArrays, 3 ) END_OVERLOAD( Wx::EditEnumProperty::new ) %} %name{newArrays} wxEditEnumProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxArrayString& labels = wxArrayString(), const wxArrayInt& values = wxArrayInt(), const wxString& value = wxEmptyString ); %name{newChoices} wxEditEnumProperty( const wxString& label, const wxString& name, wxPGChoices& choices, const wxString& value = wxEmptyString ); /************** Begin wxPerl Methods ***********************************************/ long GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% RETVAL = THIS->GetValue().GetLong(); %}; bool SetPlValue( long newval, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% THIS->SetValue( newval, NULL, flags ); RETVAL = true; %}; /************** End wxPerl Methods ***********************************************/ }; %name{Wx::FlagsProperty} class wxFlagsProperty : public %name{Wx::PGProperty} wxPGProperty { public: %{ void wxFlagsProperty::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newArrays ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_s_wpgc_n, newChoices, 3 ) MATCH_REDISP_COUNT_ALLOWMORE(wxPliOvl_s_s_arr_arr_n, newArrays, 3 ) END_OVERLOAD( Wx::FlagsProperty::new ) %} %name{newChoices} wxFlagsProperty( const wxString& label, const wxString& name, wxPGChoices& choices, long value = 0 ); %name{newArrays} wxFlagsProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxArrayString& labels = wxArrayString(), const wxArrayInt& values = wxArrayInt(), int value = 0 ); virtual void OnSetValue(); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue( wxVariant& variant, const wxString& text, int flags ) const; virtual wxVariant ChildChanged( wxVariant& thisValue, int childIndex, wxVariant& childValue ) const; virtual void RefreshChildren(); virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); // GetChoiceSelection needs to overridden since m_choices is // used and value is integer, but it is not index. virtual int GetChoiceSelection() const; // helpers size_t GetItemCount() const; const wxString& GetLabel( size_t ind ) const; /************** Begin wxPerl Methods ***********************************************/ long GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% RETVAL = THIS->GetValue().GetLong(); %}; bool SetPlValue( long newval, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% THIS->SetValue( newval, NULL, flags ); RETVAL = true; %}; /************** End wxPerl Methods ***********************************************/ protected: // Creates children and sets value. void Init(); }; %name{Wx::PGFileDialogAdapter} class wxPGFileDialogAdapter : public %name{Wx::PGEditorDialogAdapter} wxPGEditorDialogAdapter { public: virtual bool DoShowDialog( wxPropertyGrid* propGrid, wxPGProperty* property ); }; %name{Wx::FileProperty} class wxFileProperty : public %name{Wx::PGProperty} wxPGProperty { public: wxFileProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxString& value = wxEmptyString ); /* virtual ~wxFileProperty (); */ virtual void OnSetValue(); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const; virtual wxPGEditorDialogAdapter* GetEditorDialog() const; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); static wxValidator* GetClassValidator(); virtual wxValidator* DoGetValidator() const; wxString GetFileName() %code{% wxFileName myfile = THIS->GetFileName(); RETVAL = myfile.GetPath(); %}; /************** Begin wxPerl Methods ***********************************************/ wxString GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% RETVAL = THIS->GetValueAsString( flags ); %}; bool SetPlValue( const wxString& text, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% RETVAL = THIS->SetValueFromString( text, flags ); %}; /************** End wxPerl Methods ***********************************************/ }; %name{Wx::PGLongStringDialogAdapter} class wxPGLongStringDialogAdapter : public %name{Wx::PGEditorDialogAdapter} wxPGEditorDialogAdapter { public: virtual bool DoShowDialog( wxPropertyGrid* propGrid, wxPGProperty* property ); }; %name{Wx::LongStringProperty} class wxLongStringProperty : public %name{Wx::PGProperty} wxPGProperty { public: wxLongStringProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxString& value = wxEmptyString ); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const; virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event ); // Shows string editor dialog. Value to be edited should be read from // value, and if dialog is not cancelled, it should be stored back and true // should be returned if that was the case. virtual bool OnButtonClick( wxPropertyGrid* propgrid, wxString& value ); static bool DisplayEditorDialog( wxPGProperty* prop, wxPropertyGrid* propGrid, wxString& value ); /************** Begin wxPerl Methods ***********************************************/ wxString GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% RETVAL = THIS->GetValueAsString( flags ); %}; bool SetPlValue( const wxString& text, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% RETVAL = THIS->SetValueFromString( text, flags ); %}; /************** End wxPerl Methods ***********************************************/ }; %name{Wx::DirProperty} class wxDirProperty : public %name{Wx::LongStringProperty} wxLongStringProperty { public: wxDirProperty( const wxString& name = wxPG_LABEL, const wxString& label = wxPG_LABEL, const wxString& value = wxEmptyString ); virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); virtual wxValidator* DoGetValidator() const; virtual bool OnButtonClick ( wxPropertyGrid* propGrid, wxString& value ); /************** Begin wxPerl Methods ***********************************************/ wxString GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% RETVAL = THIS->GetValueAsString( flags ); %}; bool SetPlValue( const wxString& text, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% RETVAL = THIS->SetValueFromString( text, flags ); %}; /************** End wxPerl Methods ***********************************************/ }; %name{Wx::ArrayStringProperty} class wxArrayStringProperty : public %name{Wx::PGProperty} wxPGProperty { public: wxArrayStringProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxArrayString& value = wxArrayString() ); virtual void OnSetValue(); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const; virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event ); virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); // Implement in derived class for custom array-to-string conversion. /* virtual void ConvertArrayToString(const wxArrayString& arr, wxString* pString, const wxUniChar& delimiter) const; */ // Shows string editor dialog. Value to be edited should be read from // value, and if dialog is not cancelled, it should be stored back and true // should be returned if that was the case. virtual bool OnCustomStringEdit( wxWindow* parent, wxString& value ); // Helper. virtual bool OnButtonClick( wxPropertyGrid* propgrid, wxWindow* primary, const wxChar* cbt ); // Creates wxPGArrayEditorDialog for string editing. Called in OnButtonClick. virtual wxPGArrayEditorDialog* CreateEditorDialog(); /* enum ConversionFlags { Escape = 0x01, QuoteStrings = 0x02 }; */ /************** Begin wxPerl Methods ***********************************************/ /* TODO - FIXME - novice stack issues void wxArrayStringProperty::GetPlValue( int flags = wxPG_FULL_VALUE ) PPCODE: PUTBACK; wxPli_stringarray_push( aTHX_ THIS->GetValue().GetArrayString() ); SPAGAIN; */ %{ bool wxArrayStringProperty::SetPlValue( SV* arr, int flags = wxPG_SETVAL_REFRESH_EDITOR ) CODE: wxVariant var = wxPli_sv_2_wxvariant( aTHX_ arr ); if( var.IsNull() ) { RETVAL = false; } else { THIS->SetValue( var, NULL, flags ); RETVAL = true; } OUTPUT: RETVAL %} /************** End wxPerl Methods ***********************************************/ protected: virtual void GenerateValueAsString(); }; #if wxUSE_EDITABLELISTBOX %name{Wx::PGArrayEditorDialog} class wxPGArrayEditorDialog : public %name{Wx::Dialog} wxDialog { public: /* %name{newDefault} wxPGArrayEditorDialog() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxPGArrayEditorDialog( wxWindow *parent, const wxString& message, const wxString& caption, long style = wxAEDIALOG_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize ) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; */ void Init(); bool Create( wxWindow *parent, const wxString& message, const wxString& caption, long style = wxAEDIALOG_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize ); void EnableCustomNewAction(); /** Set value modified by dialog. */ virtual void SetDialogValue( const wxVariant& value ); /* %Virtual; */ /** Return value modified by dialog. */ virtual wxVariant GetDialogValue() const; /* %Virtual; */ /** Override to return wxValidator to be used with the wxTextCtrl in dialog. Note that the validator is used in the standard wx way, ie. it immediately prevents user from entering invalid input. @remarks Dialog frees the validator. */ virtual wxValidator* GetTextCtrlValidator() const; /* %Virtual; */ // Returns true if array was actually modified bool IsModified() const; // wxEditableListBox utilities int GetSelection() const; // implementation from now on void OnAddClick(wxCommandEvent& event); void OnDeleteClick(wxCommandEvent& event); void OnUpClick(wxCommandEvent& event); void OnDownClick(wxCommandEvent& event); void OnEndLabelEdit(wxListEvent& event); void OnIdle(wxIdleEvent& event); protected: // These must be overridden - must return true on success. virtual wxString ArrayGet( size_t index ); /* %Virtual{pure}; */ virtual size_t ArrayGetCount(); /* %Virtual{pure}; */ virtual bool ArrayInsert( const wxString& str, int index ); /* %Virtual{pure}; */ virtual bool ArraySet( size_t index, const wxString& str ); /* %Virtual{pure}; */ virtual void ArrayRemoveAt( int index ); /* %Virtual{pure}; */ virtual void ArraySwap( size_t first, size_t second ); /* %Virtual{pure}; */ /* TODO FIXME virtual bool OnCustomNewAction(wxString* resString) %Virtual{pure}; */ }; %name{Wx::PGArrayStringEditorDialog} class wxPGArrayStringEditorDialog : public %name{Wx::PGArrayEditorDialog} wxPGArrayEditorDialog { public: wxPGArrayStringEditorDialog() %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; void Init(); virtual void SetDialogValue( const wxVariant& value ); virtual wxVariant GetDialogValue() const; void SetCustomButton( const wxString& custBtText, wxArrayStringProperty* pcc ); /* TODO FIXME virtual bool OnCustomNewAction(wxString* resString); */ protected: virtual wxString ArrayGet( size_t index ); virtual size_t ArrayGetCount(); virtual bool ArrayInsert( const wxString& str, int index ); virtual bool ArraySet( size_t index, const wxString& str ); virtual void ArrayRemoveAt( int index ); virtual void ArraySwap( size_t first, size_t second ); }; #endif // wxUSE_EDITABLELISTBOX %name{Wx::ColourPropertyValue} class wxColourPropertyValue : public %name{Wx::Object} wxObject { %{ static void wxColourPropertyValue::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: %name{newDefault} wxColourPropertyValue() %Overload; %name{newCopy} wxColourPropertyValue( const wxColourPropertyValue& v ) %Overload; %name{newColour} wxColourPropertyValue( const wxColour& colour ) %Overload; %name{newType} wxColourPropertyValue( wxUint32 type ) %Overload; %name{newTypeColour }wxColourPropertyValue( wxUint32 type, const wxColour& colour ) %Overload; ~wxColourPropertyValue() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::ColourPropertyValue", THIS, ST(0) ); delete THIS; %}; void Init( wxUint32 type, const wxColour& colour ); wxColour* GetColour() %code{% RETVAL = new wxColour( THIS->m_colour ); %}; }; #if wxUSE_IMAGE #include "wx/image.h" #endif %name{Wx::FontProperty} class wxFontProperty : public %name{Wx::PGProperty} wxPGProperty { public: %name{newDefault} wxFontProperty() %Overload; %name{newFull} wxFontProperty(const wxString& label, const wxString& name, const wxFont& value) %Overload; virtual void OnSetValue(); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event ); virtual wxVariant ChildChanged( wxVariant& thisValue, int childIndex, wxVariant& childValue ) const; virtual void RefreshChildren(); /************** Begin wxPerl Methods ***********************************************/ wxFont* GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% wxAny value = THIS->GetValue(); wxFont font = wxANY_AS(value, wxFont); RETVAL = new wxFont( font ); %}; bool SetPlValue( wxFont* font, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% if( font->IsOk() ) { wxVariant value = wxVariant(*font); THIS->SetValue(value, NULL, flags ); RETVAL = true; } else { RETVAL = false; } %}; /************** End wxPerl Methods ***********************************************/ }; %name{Wx::SystemColourProperty} class wxSystemColourProperty : public %name{Wx::EnumProperty} wxEnumProperty { public: wxSystemColourProperty( const wxString& label, const wxString& name, const wxColourPropertyValue& value ); virtual void OnSetValue(); virtual bool IntToValue(wxVariant& variant, int number, int argFlags = 0) const; virtual wxString ColourToString( const wxColour& col, int index, int argFlags = 0 ) const; virtual int GetCustomColourIndex() const; virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue( wxVariant& variant, const wxString& text, int argFlags = 0 ) const; virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event ); virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); virtual wxSize OnMeasureImage( int item ) const; /* TODO FIXME wrap PaintData virtual void OnCustomPaint( wxDC& dc, const wxRect& rect, wxPGPaintData& paintdata ); */ // Helper function to show the colour dialog bool QueryColourFromUser( wxVariant& variant ) const; /** Default is to use wxSystemSettings::GetColour(index). Override to use custom colour tables etc. */ virtual wxColour GetColour( int index ) const; wxColourPropertyValue GetVal( const wxVariant* pVariant = NULL ) const; /************** Begin wxPerl Methods ***********************************************/ wxColourPropertyValue* GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% wxAny value = THIS->GetValue(); wxColourPropertyValue col = wxANY_AS(value, wxColourPropertyValue); RETVAL = new wxColourPropertyValue( col ); %}; bool SetPlValue( wxColourPropertyValue* col, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% wxVariant value = wxVariant(*col); THIS->SetValue(value, NULL, flags ); RETVAL = true; %}; /************** End wxPerl Methods ***********************************************/ }; %name{Wx::ColourProperty} class wxColourProperty : public %name{Wx::SystemColourProperty} wxSystemColourProperty { public: wxColourProperty( const wxString& label, const wxString& name, wxColour& value ); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual wxColour GetColour( int index ) const; /************** Begin wxPerl Methods ***********************************************/ wxColour* GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% wxAny value = THIS->GetValue(); wxColour col = wxANY_AS(value, wxColour); RETVAL = new wxColour( col ); %}; bool SetPlValue( wxColour* col, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% if( col->IsOk() ) { wxVariant value = wxVariant(*col); THIS->SetValue(value, NULL, flags ); RETVAL = true; } else { RETVAL = false; } %}; /************** End wxPerl Methods ***********************************************/ protected: virtual wxVariant DoTranslateVal( wxColourPropertyValue& v ) const; private: void Init( wxColour colour ); }; %name{Wx::CursorProperty} class wxCursorProperty : public %name{Wx::EnumProperty} wxEnumProperty { public: wxCursorProperty( const wxString& label= wxPG_LABEL, const wxString& name= wxPG_LABEL, int value = 0 ); virtual wxSize OnMeasureImage( int item ) const; /*TODO FIXME wrap paintdata virtual void OnCustomPaint( wxDC& dc, const wxRect& rect, wxPGPaintData& paintdata ); */ /************** Begin wxPerl Methods ***********************************************/ long GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% RETVAL = THIS->GetValue().GetLong(); %}; bool SetPlValue( long newval, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% THIS->SetValue( newval, NULL, flags ); RETVAL = true; %}; /************** End wxPerl Methods ***********************************************/ }; #if wxUSE_IMAGE %name{Wx::ImageFileProperty} class wxImageFileProperty : public %name{Wx::FileProperty} wxFileProperty { public: wxImageFileProperty( const wxString& label= wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxString& value = wxEmptyString); virtual void OnSetValue(); virtual wxSize OnMeasureImage( int item ) const; /*TODO FIXME wrap paintdata virtual void OnCustomPaint( wxDC& dc, const wxRect& rect, wxPGPaintData& paintdata ); */ /************** Begin wxPerl Methods ***********************************************/ wxString GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% RETVAL = THIS->GetValueAsString( flags ); %}; bool SetPlValue( const wxString& text, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% RETVAL = THIS->SetValueFromString( text, flags ); %}; /************** End wxPerl Methods ***********************************************/ }; #endif #if wxUSE_CHOICEDLG %name{Wx::MultiChoiceProperty} class wxMultiChoiceProperty : public %name{Wx::PGProperty} wxPGProperty { public: %{ void wxMultiChoiceProperty::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newValues ) MATCH_REDISP( wxPliOvl_s_s_arr_arr, newStrings ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_s_wpgc_arr, newChoices, 3 ) MATCH_REDISP_COUNT_ALLOWMORE(wxPliOvl_s_s_arr, newValues, 1) END_OVERLOAD( Wx::MultiChoiceProperty::new ) %} %name{newStrings} wxMultiChoiceProperty( const wxString& label, const wxString& name, const wxArrayString& strings, const wxArrayString& value ); %name{newChoices} wxMultiChoiceProperty( const wxString& label, const wxString& name, const wxPGChoices& choices, const wxArrayString& value = wxArrayString() ); %name{newValues} wxMultiChoiceProperty( const wxString& label = wxPG_LABEL, const wxString& name = wxPG_LABEL, const wxArrayString& value = wxArrayString() ); virtual void OnSetValue(); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue(wxVariant& variant, const wxString& text, int argFlags = 0) const; virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event ); wxArrayInt GetValueAsArrayInt() const; /************** Begin wxPerl Methods ***********************************************/ /* TODO - FIXME - novice stack problems void wxMultiChoiceProperty::GetPlValue( int flags = wxPG_FULL_VALUE ) PPCODE: PUTBACK; wxPli_stringarray_push( aTHX_ THIS->GetValue().GetArrayString() ); SPAGAIN; */ %{ bool wxMultiChoiceProperty::SetPlValue( SV* arr, int flags = wxPG_SETVAL_REFRESH_EDITOR ) CODE: wxVariant var = wxPli_sv_2_wxvariant( aTHX_ arr ); if( var.IsNull() ) { RETVAL = false; } else { THIS->SetValue( var, NULL, flags ); RETVAL = true; } OUTPUT: RETVAL %} /************** End wxPerl Methods ***********************************************/ }; #endif // wxUSE_CHOICEDLG #if wxUSE_DATETIME %name{Wx::DateProperty} class wxDateProperty : public %name{Wx::PGProperty} wxPGProperty { public: wxDateProperty( const wxString& label, const wxString& name, const wxDateTime& value ); virtual void OnSetValue(); virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const; virtual bool StringToValue(wxVariant& variant, const wxString& text, int argFlags = 0) const; virtual bool DoSetAttribute( const wxString& name, wxVariant& value ); void SetFormat( const wxString& format ); const wxString& GetFormat() const; void SetDateValue( const wxDateTime& dt ); wxDateTime GetDateValue() const; long GetDatePickerStyle() const; /************** Begin wxPerl Methods ***********************************************/ wxDateTime* GetPlValue( int flags = wxPG_FULL_VALUE ) %code{% wxVariant var = wxVariant( THIS->GetValue() ); if ( var.IsNull() ) { RETVAL = NULL; } else { RETVAL = new wxDateTime( var.GetDateTime() ); } %}; bool SetPlValue( wxDateTime* value, int flags = wxPG_SETVAL_REFRESH_EDITOR ) %code{% THIS->SetValue( value, NULL, flags ); RETVAL = true; %}; /************** End wxPerl Methods ***********************************************/ protected: static wxString DetermineDefaultDateFormat( bool showCentury ); }; #endif // wxUSE_DATETIME #endif Wx-0.9923/ext/propgrid/XS/PropertyGrid.xsp000664000000000000 2246112306612240 16650 0ustar00Mark000000000000############################################################################# ## Name: ext/propgrid/XS/PropertyGrid.xsp ## Purpose: XS++ for Wx::PropertyGrid ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_PROPGRID %loadplugin{build::Wx::XSP::Overload}; %name{Wx::PropertyGridHitTestResult} class wxPropertyGridHitTestResult { %{ static void wxPropertyGridHitTestResult::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: wxPropertyGridHitTestResult(); ~wxPropertyGridHitTestResult() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::PropertyGridHitTestResult", THIS, ST(0) ); delete THIS; %}; int GetColumn() const; wxPGProperty__parsed_nodelete* GetProperty(); int GetSplitter() const; int GetSplitterHitOffset() const; }; %name{Wx::PropertyGrid} class wxPropertyGrid : public %name{Wx::Control} wxControl { public: %name{newDefault} wxPropertyGrid() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxPropertyGrid( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPG_DEFAULT_STYLE, const wxString& name = wxPropertyGridNameStr ) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; void AddActionTrigger( int action, int keycode, int modifiers = 0 ); %name{AddToSelectionString} bool AddToSelection( wxString& id ) %Overload; %name{AddToSelectionProperty} bool AddToSelection( wxPGProperty* id ) %Overload; static void AutoGetTranslation( bool enable ); void BeginLabelEdit( unsigned int colIndex = 0 ); %name{ChangePropertyValueString} bool ChangePropertyValue( wxString& id, wxVariantArg newValue ) %Overload; %name{ChangePropertyValueProperty} bool ChangePropertyValue( wxPGProperty* id, wxVariantArg newValue ) %Overload; void CenterSplitter( bool enableAutoResizing = false ); virtual void Clear(); /* %Virtual; */ virtual wxPGVIterator GetVIterator( int flags ) const; /* %Virtual; */ %name{IsPropertySelectedString} virtual bool IsPropertySelected( wxString& id ) const %Overload; /* %Virtual; */ %name{IsPropertySelectedProperty} virtual bool IsPropertySelected( wxPGProperty* id ) const %Overload; /* %Virtual; */ void ClearActionTriggers( int action ); virtual bool CommitChangesFromEditor( wxUint32 flags = 0 ); /* %Virtual; */ bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPG_DEFAULT_STYLE, const wxString& name = wxPropertyGridNameStr ); void DedicateKey( int keycode ); bool EnableCategories( bool enable ); void EndLabelEdit( bool commit = true ); %name{EnsureVisibleString} bool EnsureVisible( wxString& id ) %Overload; %name{EnsureVisibleProperty} bool EnsureVisible( wxPGProperty* id ) %Overload; wxSize FitColumns(); wxTextCtrl* GetLabelEditor() const; wxWindow* GetPanel(); wxColour GetCaptionBackgroundColour() const; wxFont& GetCaptionFont(); wxColour GetCaptionForegroundColour() const; wxColour GetCellBackgroundColour() const; wxColour GetCellDisabledTextColour() const; wxColour GetCellTextColour() const; unsigned int GetColumnCount() const; wxColour GetEmptySpaceColour() const; int GetFontHeight() const; wxPropertyGrid* GetGrid(); wxRect GetImageRect( wxPGProperty* property, int item ) const; wxSize GetImageSize( wxPGProperty* property = NULL, int item = -1 ) const; wxPGProperty__parsed_nodelete* GetLastItem( int flags = wxPG_ITERATE_DEFAULT ); wxColour GetLineColour() const; wxColour GetMarginColour() const; %name{GetPropertyCategoryString} wxPropertyCategory__parsed_nodelete* GetPropertyCategory( wxString& id ) const %Overload; %name{GetPropertyCategoryProperty} wxPropertyCategory__parsed_nodelete* GetPropertyCategory( wxPGProperty* id ) const %Overload; wxPGProperty__parsed_nodelete* GetRoot() const; int GetRowHeight() const; wxPGProperty__parsed_nodelete* GetSelectedProperty() const; wxPGProperty__parsed_nodelete* GetSelection() const; wxColour GetSelectionBackgroundColour() const; wxColour GetSelectionForegroundColour() const; /* wxPGSortCallback GetSortFunction() const; */ int GetSplitterPosition( unsigned int splitterIndex = 0 ) const; wxTextCtrl* GetEditorTextCtrl() const; const wxPGCell& GetUnspecifiedValueAppearance() const; wxString GetUnspecifiedValueText( int argFlags = 0 ) const; int GetVerticalSpacing() const; wxPropertyGridHitTestResult HitTest( const wxPoint& pt ) const; bool IsAnyModified() const; bool IsEditorFocused() const; bool IsFrozen() const; void MakeColumnEditable( unsigned int column, bool editable = true ); void OnTLPChanging( wxWindow* newTLP ); void RefreshEditor(); virtual void RefreshProperty( wxPGProperty* p ); /* %Virtual; */ static wxPGEditor__parsed_nodelete* RegisterEditorClass( wxPGEditor__parsed_nodelete* editor, bool noDefCheck = false ); static wxPGEditor__parsed_nodelete* DoRegisterEditorClass( wxPGEditor__parsed_nodelete* editor, const wxString& name, bool noDefCheck = false ); void ResetColours(); void ResetColumnSizes( bool enableAutoResizing = false ); %name{RemoveFromSelectionString} bool RemoveFromSelection( wxString& id ) %Overload; %name{RemoveFromSelectionProperty} bool RemoveFromSelection( wxPGProperty* id ) %Overload; %name{SelectPropertyString} bool SelectProperty( wxString& id, bool focus = false ) %Overload; %name{SelectPropertyProperty} bool SelectProperty( wxPGProperty* id, bool focus = false ) %Overload; void SetCaptionBackgroundColour(const wxColour& col); void SetCaptionTextColour(const wxColour& col); void SetCellBackgroundColour(const wxColour& col); void SetCellDisabledTextColour(const wxColour& col); void SetCellTextColour(const wxColour& col); void SetColumnCount( int colCount ); %name{SetCurrentCategoryString} void SetCurrentCategory( wxString& id ) %Overload; %name{SetCurrentCategoryProperty} void SetCurrentCategory( wxPGProperty* id ) %Overload; void SetEmptySpaceColour(const wxColour& col); void SetLineColour(const wxColour& col); void SetMarginColour(const wxColour& col); %{ void wxPropertyGrid::SetSelection( selectarr = 0 ) SV* selectarr PREINIT: wxArrayPGProperty newSelections; CODE: AV* av; if( !SvROK( selectarr ) || ( SvTYPE( (SV*) ( av = (AV*) SvRV( selectarr ) ) ) != SVt_PVAV ) ) { croak( "the value is not an array reference" ); return; } int n = av_len( av ) + 1; for( int i = 0; i < n; ++i ) { SV* t = *av_fetch( av, i, 0 ); newSelections.push_back( (wxPGProperty*)wxPli_sv_2_object( aTHX_ t, "Wx::PGProperty" ) ); } THIS->SetSelection( newSelections ); %} void SetSelectionBackgroundColour(const wxColour& col); void SetSelectionTextColour(const wxColour& col); /* void SetSortFunction( wxPGSortCallback sortFunction ); */ void SetSplitterPosition( int newxpos, int col = 0 ); void SetSplitterLeft( bool privateChildrenToo = false ); void SetUnspecifiedValueAppearance( const wxPGCell& cell ); void SetVerticalSpacing( int vspacing ); virtual void DoShowPropertyError( wxPGProperty* property, const wxString& msg ); /* %Virtual; */ virtual void DoHidePropertyError( wxPGProperty* property );/* %Virtual; */ #if wxUSE_STATUSBAR virtual wxStatusBar* GetStatusBar(); /* %Virtual; */ #endif void EditorsValueWasModified(); void EditorsValueWasNotModified(); wxVariant GetUncommittedPropertyValue(); bool IsEditorsValueModified() const; void ShowPropertyError( wxString& id, const wxString& msg ); bool WasValueChangedInEvent() const; wxWindow* GetEditorControl() const; wxWindow* GetPrimaryEditor() const; wxWindow* GetEditorControlSecondary() const; }; /**************************************************************************/ /* */ /* wxPropertyGridInterface */ /* */ /**************************************************************************/ #define WXPERL_IN_PROPERTYGRID INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/PropertyGridInterface.xsp INCLUDE_COMMAND: $^X -pe "s/PGPGridInterfaceBase/PropertyGrid/g" xspp/PropertyGridInterface.h #undef WXPERL_IN_PROPERTYGRID #endif Wx-0.9923/ext/propgrid/XS/PropertyGridEvent.xsp000664000000000000 523512306612240 17632 0ustar00Mark000000000000############################################################################# ## Name: ext/propgrid/XS/PropertyGridEvent.xsp ## Purpose: XS++ for Wx::PropertyGridEvent ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_PROPGRID %loadplugin{build::Wx::XSP::Overload}; %loadplugin{build::Wx::XSP::Event}; %Event{%EVT_PG_SELECTED(id, func)%} {wxEVT_PG_SELECTED}; %Event{%EVT_PG_CHANGED(id, func)%} {wxEVT_PG_CHANGED}; %Event{%EVT_PG_CHANGING(id, func)%} {wxEVT_PG_CHANGING}; %Event{%EVT_PG_HIGHLIGHTED(id, func)%} {wxEVT_PG_HIGHLIGHTED}; %Event{%EVT_PG_RIGHT_CLICK(id, func)%} {wxEVT_PG_RIGHT_CLICK}; %Event{%EVT_PG_DOUBLE_CLICK(id, func)%} {wxEVT_PG_DOUBLE_CLICK}; %Event{%EVT_PG_ITEM_COLLAPSED(id, func)%} {wxEVT_PG_ITEM_COLLAPSED}; %Event{%EVT_PG_ITEM_EXPANDED(id, func)%} {wxEVT_PG_ITEM_EXPANDED}; %Event{%EVT_PG_LABEL_EDIT_BEGIN(id, func)%} {wxEVT_PG_LABEL_EDIT_BEGIN}; %Event{%EVT_PG_LABEL_EDIT_ENDING(id, func)%} {wxEVT_PG_LABEL_EDIT_ENDING}; %Event{%EVT_PG_COL_BEGIN_DRAG(id, func)%} {wxEVT_PG_COL_BEGIN_DRAG}; %Event{%EVT_PG_COL_DRAGGING(id, func)%} {wxEVT_PG_COL_DRAGGING}; %Event{%EVT_PG_COL_END_DRAG(id, func)%} {wxEVT_PG_COL_END_DRAG}; %Event{%EVT_PG_PAGE_CHANGED(id, func)%} {wxEVT_PG_PAGE_CHANGED}; %name{Wx::PropertyGridEvent} class wxPropertyGridEvent : public %name{Wx::CommandEvent} wxCommandEvent { public: /** Constructor. */ %name{newFull} wxPropertyGridEvent(wxEventType commandType=0, int id=0) %Overload; /** Copy constructor. */ %name{newCopy} wxPropertyGridEvent(const wxPropertyGridEvent& event) %Overload; /** Destructor. */ %name{Destroy} ~wxPropertyGridEvent(); bool CanVeto() const; unsigned int GetColumn() const; wxPGProperty__parsed_nodelete* GetMainParent() const; wxPGProperty__parsed_nodelete* GetProperty() const; wxByte GetValidationFailureBehavior() const; wxString GetPropertyName() const; wxVariant GetPropertyValue() const; wxVariant GetValue() const; void SetCanVeto( bool canVeto ); void SetProperty( wxPGProperty__parsed_nodelete* p ); void SetValidationFailureBehavior( wxByte flags ); void SetValidationFailureMessage( const wxString& message ); void Veto( bool veto = true ); bool WasVetoed() const; }; #endif Wx-0.9923/ext/propgrid/XS/PropertyGridInterface.xsp000664000000000000 6612612306612240 20477 0ustar00Mark000000000000############################################################################# ## Name: viface/PropertyGridInterface.xsp ## Purpose: XS++ for wxPropertyGridInterface ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id:$ ## Copyright: (c) 2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %file{xspp/PropertyGridInterface.h}; %module{Wx}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_PROPGRID ## DECLARE_OVERLOAD( wpge, Wx::PGEditor ) ## DECLARE_OVERLOAD( wpgp, Wx::PGProperty ) ## DECLARE_OVERLOAD( wdtm, Wx::DateTime ) ## DECLARE_OVERLOAD( wobj, Wx::Object ) ## DECLARE_OVERLOAD( wvar, Wx::Variant ) %loadplugin{build::Wx::XSP::Overload}; %name{Wx::PGPGridInterfaceBase} class wxPGPGridInterfaceBase { public: /* virtual wxPGVIterator GetVIterator( int flags ) const; virtual bool IsPropertySelected( wxString& id ) const %Overload; void ShowPropertyError( wxString& id, const wxString& msg ); */ wxPGProperty__parsed_nodelete* Append( wxPGProperty__parsed_nodelete* property ); %name{AppendInString} wxPGProperty__parsed_nodelete* AppendIn( wxString& id, wxPGProperty__parsed_nodelete* newProperty ) %Overload; %name{AppendInProperty} wxPGProperty__parsed_nodelete* AppendIn( wxPGProperty* id, wxPGProperty__parsed_nodelete* newProperty ) %Overload; %name{BeginAddChildrenString} void BeginAddChildren( wxString& id ) %Overload; %name{BeginAddChildrenProperty} void BeginAddChildren( wxPGProperty* id ) %Overload; bool ClearSelection( bool validation = false); void ClearModifiedStatus(); %name{CollapseString} bool Collapse( wxString& id ) %Overload; %name{CollapseProperty} bool Collapse( wxPGProperty* id ) %Overload; bool CollapseAll(); %name{DeletePropertyString} void DeleteProperty( wxString& id ) %Overload; %name{DeletePropertyProperty} void DeleteProperty( wxPGProperty* id ) %Overload; %name{DisablePropertyString} bool DisableProperty( wxString& id ) %Overload; %name{DisablePropertyProperty} bool DisableProperty( wxPGProperty* id ) %Overload; bool EditorValidate(); %name{EnablePropertyString} bool EnableProperty( wxString& id, bool enable = true ) %Overload; %name{EnablePropertyProperty} bool EnableProperty( wxPGProperty* id, bool enable = true ) %Overload; %name{EndAddChildrenString} void EndAddChildren( wxString& id ) %Overload; %name{EndAddChildrenProperty} void EndAddChildren( wxPGProperty* id ) %Overload; %name{ExpandString} bool Expand( wxString& id ) %Overload; %name{ExpandProperty} bool Expand( wxPGProperty* id ) %Overload; bool ExpandAll( bool expand = true ); int GetColumnProportion( unsigned int column ) const; %name{GetFirstChildString} wxPGProperty__parsed_nodelete* GetFirstChild( wxString& id ) %Overload; %name{GetFirstChildProperty} wxPGProperty__parsed_nodelete* GetFirstChild( wxPGProperty* id ) %Overload; %name{GetIteratorPropertyOverload} wxPropertyGridIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT, wxPGProperty* firstProp = NULL ) %Overload; /* wxPropertyGridConstIterator GetIterator( int flags = wxPG_ITERATE_DEFAULT, wxPGProperty* firstProp = NULL ) const; */ %name{GetIteratorPosOverload} wxPropertyGridIterator GetIterator( int flags, int startPos ) %Overload; /* wxPropertyGridConstIterator GetIterator( int flags, int startPos ) const; */ wxPGProperty__parsed_nodelete* GetFirst( int flags = wxPG_ITERATE_ALL ) %code{% RETVAL = THIS->wxPropertyGridInterface::GetFirst( flags ); %}; wxPGProperty__parsed_nodelete* GetProperty( const wxString& name ) const; /* void GetPropertiesWithFlag( wxArrayPGProperty* targetArr, wxByte flags, bool inverse = false, int iterFlags = wxPerl_build_default_propertyflags ) const; */ %{ void wxPGPGridInterfaceBase::GetPropertiesWithFlag(wxByte flags, bool inverse = false, int iterFlags = wxPerl_build_default_propertyflags ) PREINIT: wxArrayPGProperty* targetArr; PPCODE: THIS->GetPropertiesWithFlag( targetArr, flags, inverse, iterFlags ); size_t num = targetArr->GetCount(); EXTEND( SP, (IV)num ); for( size_t i = 0; i < num; ++i ) { SV* rvar = wxPli_object_2_sv( aTHX_ sv_newmortal(), targetArr->Item( i ) ); wxPli_object_set_deleteable( aTHX_ rvar, false ); PUSHs( rvar ); } %} %name{GetPropertyAttributeString} wxVariant GetPropertyAttribute( wxString& id, const wxString& attrName ) const %Overload; %name{GetPropertyAttributeProperty} wxVariant GetPropertyAttribute( wxPGProperty* id, const wxString& attrName ) const %Overload; %name{GetPropertyBackgroundColourString} wxColour GetPropertyBackgroundColour( wxString& id ) const %Overload; %name{GetPropertyBackgroundColourProperty} wxColour GetPropertyBackgroundColour( wxPGProperty* id ) const %Overload; #if !defined(WXPERL_IN_PROPERTYGRIDPAGE) wxPGProperty__parsed_nodelete* GetPropertyByLabel( const wxString& label ) const; #endif Wx_UserDataCD* GetPropertyClientData( wxString& id ) const %code{% wxPGProperty *prop = THIS->GetPropertyByName( id ); if( prop ) { RETVAL = (wxPliUserDataCD*)prop->GetClientObject(); } else { RETVAL = NULL; } %}; %name{GetPropertyByNameName} wxPGProperty__parsed_nodelete* GetPropertyByName( const wxString& name ) const %Overload; %name{GetPropertyByNameSubName} wxPGProperty__parsed_nodelete* GetPropertyByName( const wxString& name, const wxString& subname ) const %Overload; %name{GetPropertyEditorString} const wxPGEditor__parsed_nodelete* GetPropertyEditor( wxString& id ) const %Overload; %name{GetPropertyEditorProperty} const wxPGEditor__parsed_nodelete* GetPropertyEditor( wxPGProperty* id ) const %Overload; %name{GetPropertyHelpStringString} wxString GetPropertyHelpString( wxString& id ) const %Overload; %name{GetPropertyHelpStringProperty} wxString GetPropertyHelpString( wxPGProperty* id ) const %Overload; %name{GetPropertyImageString} wxBitmap* GetPropertyImage( wxString& id ) const %Overload; %name{GetPropertyImageProperty} wxBitmap* GetPropertyImage( wxPGProperty* id ) const %Overload; %name{GetPropertyLabelString} const wxString& GetPropertyLabel( wxString& id ) %Overload; %name{GetPropertyLabelProperty} const wxString& GetPropertyLabel( wxPGProperty* id ) %Overload; wxString GetPropertyName( wxPGProperty* property ); %name{GetPropertyTextColourString} wxColour GetPropertyTextColour( wxString& id ) const %Overload; %name{GetPropertyTextColourProperty} wxColour GetPropertyTextColour( wxPGProperty* id ) const %Overload; %name{GetPropertyValidatorString} wxValidator* GetPropertyValidator( wxString& id ) %Overload; %name{GetPropertyValidatorProperty} wxValidator* GetPropertyValidator( wxPGProperty* id ) %Overload; %name{GetPropertyValueString} wxVariant GetPropertyValue( wxString& id ) %Overload; %name{GetPropertyValueProperty} wxVariant GetPropertyValue( wxPGProperty* id ) %Overload; %name{GetPropertyValueAsArrayIntString} wxArrayInt GetPropertyValueAsArrayInt( wxString& id ) const %Overload; %name{GetPropertyValueAsArrayIntProperty} wxArrayInt GetPropertyValueAsArrayInt( wxPGProperty* id ) const %Overload; %name{GetPropertyValueAsArrayStringString} wxArrayString GetPropertyValueAsArrayString( wxString& id ) const %Overload; %name{GetPropertyValueAsArrayStringProperty} wxArrayString GetPropertyValueAsArrayString( wxPGProperty* id) const %Overload; %name{GetPropertyValueAsBoolString} bool GetPropertyValueAsBool( wxString& id ) const %Overload; %name{GetPropertyValueAsBoolProperty} bool GetPropertyValueAsBool( wxPGProperty* id ) const %Overload; %name{GetPropertyValueAsDateTimeString} wxDateTime GetPropertyValueAsDateTime( wxString& id ) const %Overload; %name{GetPropertyValueAsDateTimeProperty} wxDateTime GetPropertyValueAsDateTime(wxPGProperty* id ) const %Overload; %name{GetPropertyValueAsDoubleString} double GetPropertyValueAsDouble( wxString& id ) const %Overload; %name{GetPropertyValueAsDoubleProperty} double GetPropertyValueAsDouble( wxPGProperty* id ) const %Overload; %name{GetPropertyValueAsIntString} int GetPropertyValueAsInt( wxString& id ) const %Overload; %name{GetPropertyValueAsIntProperty} int GetPropertyValueAsInt( wxPGProperty* id ) const %Overload; %name{GetPropertyValueAsLongString} long GetPropertyValueAsLong( wxString& id ) const %Overload; %name{GetPropertyValueAsLongProperty} long GetPropertyValueAsLong( wxPGProperty* id ) const %Overload; %name{GetPropertyValueAsLongLongString} wxLongLong_t GetPropertyValueAsLongLong( wxString& id ) const %Overload; %name{GetPropertyValueAsLongLongProperty} wxLongLong_t GetPropertyValueAsLongLong( wxPGProperty* id ) const %Overload; %name{GetPropertyValueAsStringString} wxString GetPropertyValueAsString( wxString& id ) const %Overload; %name{GetPropertyValueAsStringProperty} wxString GetPropertyValueAsString( wxPGProperty* id ) const %Overload; %name{GetPropertyValueAsULongString} unsigned long GetPropertyValueAsULong( wxString& id ) const %Overload; %name{GetPropertyValueAsULongProperty} unsigned long GetPropertyValueAsULong( wxPGProperty* id ) const %Overload; %name{GetPropertyValueAsULongLongString} wxULongLong_t GetPropertyValueAsULongLong( wxString& id ) const %Overload; %name{GetPropertyValueAsULongLongProperty} wxULongLong_t GetPropertyValueAsULongLong( wxPGProperty* id ) const %Overload; wxVariant GetPropertyValues( const wxString& listname = wxEmptyString, wxPGProperty* baseparent = NULL, long flags = 0 ) const; %{ void wxPGPGridInterfaceBase::GetSelectedProperties( ) PPCODE: const wxArrayPGProperty& targetArr = THIS->GetSelectedProperties(); size_t num = targetArr.GetCount(); EXTEND( SP, (IV)num ); for( size_t i = 0; i < num; ++i ) { SV* rvar = wxPli_object_2_sv( aTHX_ sv_newmortal(), targetArr.Item( i ) ); wxPli_object_set_deleteable( aTHX_ rvar, false ); PUSHs( rvar ); } %} #if !defined(WXPERL_IN_PROPERTYGRID) && !defined(WXPERL_IN_PROPERTYGRIDMANAGER) wxPGProperty__parsed_nodelete* GetSelection() const; #endif %name{HidePropertyString} bool HideProperty( wxString& id, bool hide = true, int flags = wxPG_RECURSE ) %Overload; %name{HidePropertyProperty} bool HideProperty( wxPGProperty* id, bool hide = true, int flags = wxPG_RECURSE ) %Overload; static void InitAllTypeHandlers(); %name{InsertString} wxPGProperty__parsed_nodelete* Insert( wxString& priorThis, wxPGProperty__parsed_nodelete* newProperty ) %Overload; %name{InsertProperty} wxPGProperty__parsed_nodelete* Insert( wxPGProperty* priorThis, wxPGProperty__parsed_nodelete* newProperty ) %Overload; %name{InsertIndexString} wxPGProperty__parsed_nodelete* Insert( wxString& parent, int index, wxPGProperty__parsed_nodelete* newProperty ) %Overload; %name{InsertIndexProperty} wxPGProperty__parsed_nodelete* Insert( wxPGProperty* parent, int index, wxPGProperty__parsed_nodelete* newProperty ) %Overload; %name{IsPropertyCategoryString} bool IsPropertyCategory( wxString& id ) const %Overload; %name{IsPropertyCategoryProperty} bool IsPropertyCategory( wxPGProperty* id ) const %Overload; %name{IsPropertyEnabledString} bool IsPropertyEnabled( wxString& id ) const %Overload; %name{IsPropertyEnabledProperty} bool IsPropertyEnabled( wxPGProperty* id ) const %Overload; %name{IsPropertyExpandedString} bool IsPropertyExpanded( wxString& id ) const %Overload; %name{IsPropertyExpandedProperty} bool IsPropertyExpanded( wxPGProperty* id ) const %Overload; %name{IsPropertyModifiedString} bool IsPropertyModified( wxString& id ) const %Overload; %name{IsPropertyModifiedProperty} bool IsPropertyModified( wxPGProperty* id ) const %Overload; %name{IsPropertyShownString} bool IsPropertyShown( wxString& id ) const %Overload; %name{IsPropertyShownProperty} bool IsPropertyShown( wxPGProperty* id ) const %Overload; %name{IsPropertyValueUnspecifiedString} bool IsPropertyValueUnspecified( wxString& id ) const %Overload; %name{IsPropertyValueUnspecifiedProperty} bool IsPropertyValueUnspecified( wxPGProperty* id ) const %Overload; %name{LimitPropertyEditingString} void LimitPropertyEditing( wxString& id, bool limit = true ) %Overload; %name{LimitPropertyEditingProperty} void LimitPropertyEditing( wxPGProperty* id, bool limit = true ) %Overload; static void RegisterAdditionalEditors(); %name{RemovePropertyString} wxPGProperty__parsed_allowdelete* RemoveProperty( wxString& id ) %Overload; %name{RemovePropertyProperty} wxPGProperty__parsed_allowdelete* RemoveProperty( wxPGProperty__parsed_allowdelete* id ) %Overload; %name{ReplacePropertyString} wxPGProperty__parsed_nodelete* ReplaceProperty( wxString& id, wxPGProperty__parsed_nodelete* property ) %Overload; %name{ReplacePropertyProperty} wxPGProperty__parsed_nodelete* ReplaceProperty( wxPGProperty__parsed_allowdelete* id, wxPGProperty__parsed_nodelete* property ) %Overload; bool RestoreEditableState( const wxString& src, int restoreStates = 0x3F ); wxString SaveEditableState( int includedStates = 0x3F ) const; static void SetBoolChoices( const wxString& trueChoice, const wxString& falseChoice ); bool SetColumnProportion( unsigned int column, int proportion ); %name{SetPropertyAttributeString} void SetPropertyAttribute( wxString& id, const wxString& attrName, wxVariantArg value, long argFlags = 0 ) %Overload; %name{SetPropertyAttributeProperty} void SetPropertyAttribute( wxPGProperty* id, const wxString& attrName, wxVariantArg value, long argFlags = 0 ) %Overload; void SetPropertyAttributeAll( const wxString& attrName, wxVariantArg value ); %name{SetPropertyBackgroundColourString} void SetPropertyBackgroundColour( wxString& id, const wxColour& colour, int flags = wxPG_RECURSE ) %Overload; %name{SetPropertyBackgroundColourProperty} void SetPropertyBackgroundColour( wxPGProperty* id, const wxColour& colour, int flags = wxPG_RECURSE ) %Overload; %name{SetPropertyCellString} void SetPropertyCell( wxString& id, int column, const wxString& text = wxEmptyString, const wxBitmap& bitmap = wxNullBitmapPtr, const wxColour& fgCol = wxNullColourPtr, const wxColour& bgCol = wxNullColourPtr ) %Overload; %name{SetPropertyCellProperty} void SetPropertyCell( wxPGProperty* id, int column, const wxString& text = wxEmptyString, const wxBitmap& bitmap = wxNullBitmapPtr, const wxColour& fgCol = wxNullColourPtr, const wxColour& bgCol = wxNullColourPtr ) %Overload; void SetPropertyClientData( wxString& id, Wx_UserDataCD* data ) %code{% wxPGProperty *prop = THIS->GetPropertyByName( id ); if( prop ) prop->SetClientObject( data ); %}; %name{SetPropertyColoursToDefaultString} void SetPropertyColoursToDefault( wxString& id ) %Overload; %name{SetPropertyColoursToDefaultProperty} void SetPropertyColoursToDefault( wxPGProperty* id ) %Overload; %name{SetPropertyEditorString} void SetPropertyEditor( wxString& id, const wxPGEditor__parsed_nodelete* editor ) %Overload; %name{SetPropertyEditorProperty} void SetPropertyEditor( wxPGProperty* id, const wxPGEditor__parsed_nodelete* editor ) %Overload; %name{SetPropertyEditorNameString} void SetPropertyEditor( wxString& id, const wxString& editorName ) %Overload; %name{SetPropertyEditorNameProperty} void SetPropertyEditor( wxPGProperty* id, const wxString& editorName ) %Overload; %name{SetPropertyLabelString} void SetPropertyLabel( wxString& id, const wxString& newproplabel ) %Overload; %name{SetPropertyLabelProperty} void SetPropertyLabel( wxPGProperty* id, const wxString& newproplabel ) %Overload; %name{SetPropertyNameString} void SetPropertyName( wxString& id, const wxString& newName ) %Overload; %name{SetPropertyNameProperty} void SetPropertyName( wxPGProperty* id, const wxString& newName ) %Overload; %name{SetPropertyReadOnlyString} void SetPropertyReadOnly( wxString& id, bool set = true, int flags = wxPG_RECURSE ) %Overload; %name{SetPropertyReadOnlyProperty} void SetPropertyReadOnly( wxPGProperty* id, bool set = true, int flags = wxPG_RECURSE ) %Overload; %name{SetPropertyValueUnspecifiedString} void SetPropertyValueUnspecified( wxString& id ) %Overload; %name{SetPropertyValueUnspecifiedProperty} void SetPropertyValueUnspecified( wxPGProperty* id ) %Overload; /* void SetPropertyValues( const wxVariantList& list, wxPGProperty& defaultCategory = wxNullPropertyPtr ); */ %name{SetPropertyValuesString} void SetPropertyValues( const wxVariant& list, wxString& defaultCategory = wxEmptyString ) %Overload; %name{SetPropertyValuesProperty} void SetPropertyValues( const wxVariant& list, wxPGProperty* defaultCategory = wxNullProperty ) %Overload; %name{SetPropertyHelpStringString} void SetPropertyHelpString( wxString& id , const wxString& helpString ) %Overload; %name{SetPropertyHelpStringProperty} void SetPropertyHelpString( wxPGProperty* id , const wxString& helpString ) %Overload; %name{SetPropertyImageString} void SetPropertyImage( wxString& id, wxBitmap& bmp ) %Overload; %name{SetPropertyImageProperty} void SetPropertyImage( wxPGProperty* id, wxBitmap& bmp ) %Overload; %name{SetPropertyMaxLengthString} bool SetPropertyMaxLength( wxString& id, int maxLen ) %Overload; %name{SetPropertyMaxLengthProperty} bool SetPropertyMaxLength( wxPGProperty* id, int maxLen ) %Overload; %name{SetPropertyTextColourString} void SetPropertyTextColour( wxString& id, const wxColour& colour, int flags = wxPG_RECURSE ) %Overload; %name{SetPropertyTextColourProperty} void SetPropertyTextColour( wxPGProperty* id, const wxColour& colour, int flags = wxPG_RECURSE ) %Overload; %name{SetPropertyValidatorString} void SetPropertyValidator( wxString& id, const wxValidator& validator ) %Overload; %name{SetPropertyValidatorProperty} void SetPropertyValidator( wxPGProperty* id, const wxValidator& validator ) %Overload; %{ void wxPGPGridInterfaceBase::SetPropertyValue( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_s, SetPropertyValueAsString_string ) MATCH_REDISP( wxPliOvl_wpgp_s, SetPropertyValueAsString_property ) MATCH_REDISP( wxPliOvl_s_n, SetPropertyValueAsDouble_string ) MATCH_REDISP( wxPliOvl_wpgp_n, SetPropertyValueAsDouble_property ) MATCH_REDISP( wxPliOvl_s_arr, SetPropertyValueAsArrayString_string ) MATCH_REDISP( wxPliOvl_wpgp_arr, SetPropertyValueAsArrayString_property ) MATCH_REDISP( wxPliOvl_s_wdtm, SetPropertyValueAsDateTime_string ) MATCH_REDISP( wxPliOvl_wpgp_wdtm, SetPropertyValueAsDateTime_property ) MATCH_REDISP( wxPliOvl_s_wobj, SetPropertyValueAsObject_string ) MATCH_REDISP( wxPliOvl_wpgp_wobj, SetPropertyValueAsObject_property ) END_OVERLOAD( Wx::PGPGridInterfaceBase::SetPropertyValue ) void wxPGPGridInterfaceBase::SetPropertyValueAsLong( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_n, SetPropertyValueAsLong_string ) MATCH_REDISP( wxPliOvl_wpgp_n, SetPropertyValueAsLong_property ) END_OVERLOAD( Wx::PGPGridInterfaceBase::SetPropertyValueAsLong ) void wxPGPGridInterfaceBase::SetPropertyValueAsInt( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_n, SetPropertyValueAsInt_string ) MATCH_REDISP( wxPliOvl_wpgp_n, SetPropertyValueAsInt_property ) END_OVERLOAD( Wx::PGPGridInterfaceBase::SetPropertyValueAsInt ) void wxPGPGridInterfaceBase::SetPropertyValueAsDouble( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_n, SetPropertyValueAsDouble_string ) MATCH_REDISP( wxPliOvl_wpgp_n, SetPropertyValueAsDouble_property ) END_OVERLOAD( Wx::PGPGridInterfaceBase::SetPropertyValueAsDouble ) void wxPGPGridInterfaceBase::SetPropertyValueAsBool( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_n, SetPropertyValueAsBool_string ) MATCH_REDISP( wxPliOvl_wpgp_n, SetPropertyValueAsBool_property ) END_OVERLOAD( Wx::PGPGridInterfaceBase::SetPropertyValueAsBool ) void wxPGPGridInterfaceBase::SetPropertyValueAsString( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_s, SetPropertyValueAsString_string ) MATCH_REDISP( wxPliOvl_wpgp_s, SetPropertyValueAsString_property ) END_OVERLOAD( Wx::PGPGridInterfaceBase::SetPropertyValueAsString ) void wxPGPGridInterfaceBase::SetPropertyValueAsArrayString( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_arr, SetPropertyValueAsArrayString_string ) MATCH_REDISP( wxPliOvl_wpgp_arr, SetPropertyValueAsArrayString_property ) END_OVERLOAD( Wx::PGPGridInterfaceBase::SetPropertyValueAsArrayString ) void wxPGPGridInterfaceBase::SetPropertyValueAsArrayInt( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_arr, SetPropertyValueAsArrayInt_string ) MATCH_REDISP( wxPliOvl_wpgp_arr, SetPropertyValueAsArrayInt_property ) END_OVERLOAD( Wx::PGPGridInterfaceBase::SetPropertyValueAsArrayInt ) void wxPGPGridInterfaceBase::SetPropertyValueAsDateTime( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_wdtm, SetPropertyValueAsDateTime_string ) MATCH_REDISP( wxPliOvl_wpgp_wdtm, SetPropertyValueAsDateTime_property ) END_OVERLOAD( Wx::PGPGridInterfaceBase::SetPropertyValueAsDateTime ) void wxPGPGridInterfaceBase::SetPropertyValueAsObject( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_wobj, SetPropertyValueAsObject_string ) MATCH_REDISP( wxPliOvl_wpgp_wobj, SetPropertyValueAsObject_property ) END_OVERLOAD( Wx::PGPGridInterfaceBase::SetPropertyValueAsObject ) void wxPGPGridInterfaceBase::SetPropertyValueAsLongLong( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_n, SetPropertyValueAsLongLong_string ) MATCH_REDISP( wxPliOvl_wpgp_n, SetPropertyValueAsLongLong_property ) END_OVERLOAD( Wx::PGPGridInterfaceBase::SetPropertyValueAsLongLong ) void wxPGPGridInterfaceBase::SetPropertyValueAsULongLong( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_n, SetPropertyValueAsULongLong_string ) MATCH_REDISP( wxPliOvl_wpgp_n, SetPropertyValueAsULongLong_property ) END_OVERLOAD( Wx::PGPGridInterfaceBase::SetPropertyValueAsULongLong ) void wxPGPGridInterfaceBase::SetPropertyValueAsVariant( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_wvar, SetPropertyValueAsVariant_string ) MATCH_REDISP( wxPliOvl_wpgp_wvar, SetPropertyValueAsVariant_property ) END_OVERLOAD( Wx::PGPGridInterfaceBase::SetPropertyValueAsVariant ) %} /** Sets value (integer) of a property. */ %name{SetPropertyValueAsLong_string} void SetPropertyValue( wxString& id, long value ); %name{SetPropertyValueAsLong_property} void SetPropertyValue( wxPGProperty* id, long value ); /** Sets value (integer) of a property. */ %name{SetPropertyValueAsInt_string} void SetPropertyValue( wxString& id, int value ); %name{SetPropertyValueAsInt_property} void SetPropertyValue( wxPGProperty* id, int value ); /** Sets value (floating point) of a property. */ %name{SetPropertyValueAsDouble_string} void SetPropertyValue( wxString& id, double value ); %name{SetPropertyValueAsDouble_property} void SetPropertyValue( wxPGProperty* id, double value ); /** Sets value (bool) of a property. */ %name{SetPropertyValueAsBool_string} void SetPropertyValue( wxString& id, bool value ); %name{SetPropertyValueAsBool_property} void SetPropertyValue( wxPGProperty* id, bool value ); /** Sets value (string) of a property. */ %name{SetPropertyValueAsString_string} void SetPropertyValue( wxString& id, const wxString& value ); %name{SetPropertyValueAsString_property} void SetPropertyValue( wxPGProperty* id, const wxString& value ); /** Sets value (wxArrayString) of a property. */ %name{SetPropertyValueAsArrayString_string} void SetPropertyValue( wxString& id, const wxArrayString& value ); %name{SetPropertyValueAsArrayString_property} void SetPropertyValue( wxPGProperty* id, const wxArrayString& value ); /** Sets value (wxDateTime) of a property. */ %name{SetPropertyValueAsDateTime_string} void SetPropertyValue( wxString& id, const wxDateTime& value ); %name{SetPropertyValueAsDateTime_property} void SetPropertyValue( wxPGProperty* id, const wxDateTime& value ); /** Sets value (wxObject*) of a property. */ %name{SetPropertyValueAsObject_string} void SetPropertyValue( wxString& id, wxObject* value ); %name{SetPropertyValueAsObject_property} void SetPropertyValue(wxPGProperty* id, wxObject* value ); /** Sets value (wxObject&) of a property. */ /** void SetPropertyValue( wxString& id, wxObject& value ); */ /** Sets value (native 64-bit int) of a property. */ %name{SetPropertyValueAsLongLong_string} void SetPropertyValue( wxString& id, wxLongLong_t value ); %name{SetPropertyValueAsLongLong_property} void SetPropertyValue( wxPGProperty* id, wxLongLong_t value ); /** Sets value (native 64-bit unsigned int) of a property. */ %name{SetPropertyValueAsULongLong_string} void SetPropertyValue( wxString& id, wxULongLong_t value ); %name{SetPropertyValueAsULongLong_property} void SetPropertyValue( wxPGProperty* id, wxULongLong_t value ); /** Sets value (wxArrayInt&) of a property. */ %name{SetPropertyValueAsArrayInt_string} void SetPropertyValue( wxString& id, const wxArrayInt& value ); %name{SetPropertyValueAsArrayInt_property} void SetPropertyValue( wxPGProperty* id, const wxArrayInt& value ); %name{SetPropertyValueString_string} void SetPropertyValueString( wxString& id, const wxString& value ); %name{SetPropertyValueString_property} void SetPropertyValueString( wxPGProperty* id, const wxString& value ); %name{SetPropertyValueAsVariant_string} void SetPropertyValue( wxString& id, wxVariant value ); %name{SetPropertyValueAsVariant_property} void SetPropertyValue( wxPGProperty* id, wxVariant value ); void SetValidationFailureBehavior( int vfbFlags ); void Sort( int flags = 0 ); %name{SortChildrenString} void SortChildren( wxString& id, int flags = 0 ) %Overload; %name{SortChildrenProperty} void SortChildren( wxPGProperty* id, int flags = 0 ) %Overload; static wxPGEditor__parsed_nodelete* GetEditorByName( const wxString& editorName ); }; #endif %file{-}; Wx-0.9923/ext/propgrid/XS/PropertyGridManager.xsp000664000000000000 1414012306612240 20136 0ustar00Mark000000000000############################################################################# ## Name: ext/propgrid/XS/PropertyGridManager.xsp ## Purpose: XS++ for Wx::PropertyGridManager ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_PROPGRID %loadplugin{build::Wx::XSP::Overload}; %name{Wx::PropertyGridManager} class wxPropertyGridManager : public %name{Wx::Panel} wxPanel { public: %name{newDefault} wxPropertyGridManager() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxPropertyGridManager( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPGMAN_DEFAULT_STYLE, const wxString& name = wxPropertyGridManagerNameStr ) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /* Virtual wxPropertyGridInterface */ virtual void Clear(); /* %Virtual; */ virtual wxPGVIterator GetVIterator( int flags ) const; /* %Virtual; */ virtual bool IsPropertySelected( wxString& id ) const; /* %Virtual; */ /* Virtual wxPropertyGridInterface End*/ wxPropertyGridPage* AddPage( const wxString& label = wxEmptyString, const wxBitmap& bmp = wxNullBitmapPtr, wxPropertyGridPage* pageObj = NULL ); wxPropertyGridPage* AddPageDefaultBitmap( const wxString& label = wxEmptyString, wxPropertyGridPage* pageObj = NULL ) %code{% RETVAL = THIS->AddPage( label, wxNullBitmap, pageObj ); %}; void ClearPage( int page ); bool CommitChangesFromEditor( wxUint32 flags = 0 ); bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPGMAN_DEFAULT_STYLE, const wxString& name = wxPropertyGridManagerNameStr ); bool EnableCategories( bool enable ); bool EnsureVisible( wxString& id ); int GetColumnCount( int page = -1 ) const; /** Returns height of the description text box. */ int GetDescBoxHeight() const; wxPropertyGrid* GetGrid(); wxPropertyGridPage* GetCurrentPage() const; wxPropertyGridPage* GetPage( unsigned int ind ) const; wxPropertyGridPage* GetPage( const wxString& name ) const; int GetPageByName( const wxString& name ) const; size_t GetPageCount() const; const wxString& GetPageName( int index ) const; wxPGProperty__parsed_nodelete* GetPageRoot( int index ) const; %name{GetPropertyCategoryString} wxPropertyCategory__parsed_nodelete* GetPropertyCategory( wxString& id ) const %Overload; %name{GetPropertyCategoryProperty} wxPropertyCategory__parsed_nodelete* GetPropertyCategory( wxPGProperty* id ) const %Overload; /** Returns index to currently selected page. */ int GetSelectedPage() const; /** Shortcut for GetGrid()->GetSelection(). */ wxPGProperty__parsed_nodelete* GetSelectedProperty() const; /** Synonyme for GetSelectedPage. */ wxPGProperty__parsed_nodelete* GetSelection() const; wxToolBar* GetToolBar() const; virtual wxPropertyGridPage* InsertPage( int index, const wxString& label, const wxBitmap& bmp = wxNullBitmapPtr, wxPropertyGridPage* pageObj = NULL ); bool IsAnyModified() const; bool IsFrozen() const; bool IsPageModified( size_t index ) const; virtual bool RemovePage( int page ); /* %Virtual; */ %name{SelectPageOLInt} void SelectPage( int index ) %Overload; %name{SelectPageOLString} void SelectPage( const wxString& label ) %Overload; %name{SelectPageOLGridPage} void SelectPage( wxPropertyGridPage* page ) %Overload; bool SelectProperty( wxString& id, bool focus = false ); void SetColumnCount( int colCount, int page = -1 ); void SetColumnTitle( int idx, const wxString& title ); void SetDescription( const wxString& label, const wxString& content ); /** Sets y coordinate of the description box splitter. */ void SetDescBoxHeight( int ht, bool refresh = true ); void SetSplitterLeft( bool subProps = false, bool allPages = true ); void SetPageSplitterPosition( int page, int pos, int column = 0 ); void SetSplitterPosition( int pos, int column = 0 ); /** Synonyme for SelectPage(name). */ /* void SetStringSelection( const wxChar* name ); */ void ShowHeader(bool show = true); // // Subclassing helpers // /** Creates property grid for the manager. Reimplement in derived class to use subclassed wxPropertyGrid. However, if you do this then you must also use the two-step construction (ie. default constructor and Create() instead of constructor with arguments) when creating the manager. */ protected: virtual wxPropertyGrid* CreatePropertyGrid() const; /* %Virtual; */ }; /**************************************************************************/ /* */ /* wxPropertyGridInterface */ /* */ /**************************************************************************/ #define WXPERL_IN_PROPERTYGRIDMANAGER INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/PropertyGridInterface.xsp INCLUDE_COMMAND: $^X -pe "s/PGPGridInterfaceBase/PropertyGridManager/g" xspp/PropertyGridInterface.h #unded WXPERL_IN_PROPERTYGRIDMANAGER #endif Wx-0.9923/ext/propgrid/XS/PropertyGridPage.xsp000664000000000000 527012306612240 17424 0ustar00Mark000000000000############################################################################# ## Name: ext/propgrid/XS/PropertyGridPage.xsp ## Purpose: XS++ for Wx::PropertyGridPage ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_PROPGRID %loadplugin{build::Wx::XSP::Overload}; %loadplugin{build::Wx::XSP::Virtual}; %name{Wx::PropertyGridPage} class wxPropertyGridPage : public %name{Wx::EvtHandler} wxEvtHandler { public: wxPropertyGridPage() %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /* Virtual wxPropertyGridInterface */ virtual void Clear(); /* %Virtual; */ virtual wxPGVIterator GetVIterator( int flags ) const; /* %Virtual; */ virtual bool IsPropertySelected( wxString& id ) const; /* %Virtual; */ /* Virtual wxPropertyGridInterface End*/ wxSize FitColumns(); int GetIndex() const; wxPGProperty__parsed_nodelete* GetRoot() const; int GetSplitterPosition( int col = 0 ) const; int GetToolId() const; virtual void Init(); /* %Virtual; */ virtual bool IsHandlingAllEvents() const; /* %Virtual; */ virtual void OnShow(); /* %Virtual; */ virtual void RefreshProperty( wxPGProperty* p ); /* %Virtual; */ void SetSplitterPosition( int splitterPos, int col = 0 ); wxPropertyCategory__parsed_nodelete* GetPropertyCategory( wxPGProperty& id ) const %code{% RETVAL = (wxPropertyCategory*)THIS->wxPropertyGridPageState::GetPropertyCategory( id ); %}; wxPGProperty__parsed_nodelete* GetPropertyByLabel( const wxString& label ) const %code{% RETVAL = (wxPGProperty*)THIS->wxPropertyGridPageState::GetPropertyByLabel( label ); %}; }; /**************************************************************************/ /* */ /* wxPropertyGridInterface */ /* */ /**************************************************************************/ #define WXPERL_IN_PROPERTYGRIDPAGE INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/PropertyGridInterface.xsp INCLUDE_COMMAND: $^X -pe "s/PGPGridInterfaceBase/PropertyGridPage/g" xspp/PropertyGridInterface.h #unded WXPERL_IN_PROPERTYGRIDPAGE #endif Wx-0.9923/ext/propgrid/XS/PropertyGridPageState.xsp000664000000000000 305112306612240 20420 0ustar00Mark000000000000############################################################################# ## Name: ext/propgrid/XS/PropertyGridPageState.xsp ## Purpose: XS++ for Wx::PropertyGridPageState ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_PROPGRID %loadplugin{build::Wx::XSP::Overload}; %name{Wx::PropertyGridIterator} class wxPropertyGridIterator : public %name{Wx::PropertyGridIteratorBase} wxPropertyGridIteratorBase { public: void Assign( const wxPropertyGridIteratorBase& it ); bool AtEnd() const; wxPGProperty__parsed_nodelete* GetProperty() const; void Next( bool iterateChildren = true ); void Prev(); void SetBaseParent( wxPGProperty__parsed_nodelete* baseParent ); }; %name{Wx::PGVIterator} class wxPGVIterator { public: %name{newDefault} wxPGVIterator() %Overload; /* %name{newObject} wxPGVIterator( wxPGVIteratorBase* obj ) %Overload; */ %name{newCopy} wxPGVIterator( const wxPGVIterator& it ) %Overload; %name{Destroy} ~wxPGVIterator(); void UnRef(); /* const wxPGVIterator& operator=( const wxPGVIterator& it ); */ void Next(); bool AtEnd(); wxPGProperty__parsed_nodelete* GetProperty(); }; #endif Wx-0.9923/ext/ribbon/000775000000000000 012316265011 12451 5ustar00Mark000000000000Wx-0.9923/ext/ribbon/cpp/000775000000000000 012316265011 13233 5ustar00Mark000000000000Wx-0.9923/ext/ribbon/cpp/ribbongalleryitem.h000664000000000000 337112306612260 17203 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ribbongalleryitem.h // Purpose: wxRibbonGalleryItem declaration // Author: Mark Dootson // SVN ID: $Id: $ // Copyright: (c) 2012 Mattia barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// /// // declaration for this class is in src/ribbon/gallery.cpp which we // cannot include so we need it here // ///////////////////////////////////////////////////////////////////////////// #ifndef _WXPERL_RIBBON_GALLERY_ITEM_DECL_H_ #define _WXPERL_RIBBON_GALLERY_ITEM_DECL_H_ class wxRibbonGalleryItem { public: wxRibbonGalleryItem() { m_id = 0; m_is_visible = false; } void SetId(int id) {m_id = id;} void SetBitmap(const wxBitmap& bitmap) {m_bitmap = bitmap;} const wxBitmap& GetBitmap() const {return m_bitmap;} void SetIsVisible(bool visible) {m_is_visible = visible;} void SetPosition(int x, int y, const wxSize& size) { m_position = wxRect(wxPoint(x, y), size); } bool IsVisible() const {return m_is_visible;} const wxRect& GetPosition() const {return m_position;} void SetClientObject(wxClientData *data) {m_client_data.SetClientObject(data);} wxClientData *GetClientObject() const {return m_client_data.GetClientObject();} void SetClientData(void *data) {m_client_data.SetClientData(data);} void *GetClientData() const {return m_client_data.GetClientData();} protected: wxBitmap m_bitmap; wxClientDataContainer m_client_data; wxRect m_position; int m_id; bool m_is_visible; }; #endif Wx-0.9923/ext/ribbon/cpp/ribbon_constants.cpp000664000000000000 1130312306612260 17405 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ribbon_constants.cpp // Purpose: wxRibbon constants // Author: Mark Dootson // SVN ID: $Id: $ // Copyright: (c) 2012 Mattia barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include #include #include #include double ribbon_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: ribbon #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'R': r( wxRIBBON_BAR_SHOW_PAGE_LABELS ); r( wxRIBBON_BAR_SHOW_PAGE_ICONS ); r( wxRIBBON_BAR_FLOW_HORIZONTAL ); r( wxRIBBON_BAR_FLOW_VERTICAL ); r( wxRIBBON_BAR_SHOW_PANEL_EXT_BUTTONS ); r( wxRIBBON_BAR_SHOW_PANEL_MINIMISE_BUTTONS ); r( wxRIBBON_BAR_ALWAYS_SHOW_TABS ); r( wxRIBBON_BAR_DEFAULT_STYLE ); r( wxRIBBON_BAR_FOLDBAR_STYLE ); r( wxRIBBON_PANEL_NO_AUTO_MINIMISE ); r( wxRIBBON_PANEL_EXT_BUTTON ); r( wxRIBBON_PANEL_MINIMISE_BUTTON ); r( wxRIBBON_PANEL_DEFAULT_STYLE ); r( wxRIBBON_TOOLBAR_TOOL_FIRST ); r( wxRIBBON_TOOLBAR_TOOL_LAST ); r( wxRIBBON_TOOLBAR_TOOL_POSITION_MASK ); r( wxRIBBON_TOOLBAR_TOOL_NORMAL_HOVERED ); r( wxRIBBON_TOOLBAR_TOOL_DROPDOWN_HOVERED ); r( wxRIBBON_TOOLBAR_TOOL_HOVER_MASK ); r( wxRIBBON_TOOLBAR_TOOL_NORMAL_HOVERED ); r( wxRIBBON_TOOLBAR_TOOL_DROPDOWN_HOVERED ); r( wxRIBBON_TOOLBAR_TOOL_NORMAL_ACTIVE ); r( wxRIBBON_TOOLBAR_TOOL_DROPDOWN_ACTIVE ); r( wxRIBBON_TOOLBAR_TOOL_ACTIVE_MASK ); r( wxRIBBON_TOOLBAR_TOOL_NORMAL_ACTIVE ); r( wxRIBBON_TOOLBAR_TOOL_DROPDOWN_ACTIVE ); r( wxRIBBON_TOOLBAR_TOOL_DISABLED ); r( wxRIBBON_TOOLBAR_TOOL_STATE_MASK ); r( wxRIBBON_SCROLL_BTN_LEFT ); r( wxRIBBON_SCROLL_BTN_RIGHT ); r( wxRIBBON_SCROLL_BTN_UP ); r( wxRIBBON_SCROLL_BTN_DOWN ); r( wxRIBBON_SCROLL_BTN_DIRECTION_MASK ); r( wxRIBBON_SCROLL_BTN_NORMAL ); r( wxRIBBON_SCROLL_BTN_HOVERED ); r( wxRIBBON_SCROLL_BTN_ACTIVE ); r( wxRIBBON_SCROLL_BTN_STATE_MASK ); r( wxRIBBON_SCROLL_BTN_FOR_OTHER ); r( wxRIBBON_SCROLL_BTN_FOR_TABS ); r( wxRIBBON_SCROLL_BTN_FOR_PAGE ); r( wxRIBBON_SCROLL_BTN_FOR_MASK ); r( wxRIBBON_BUTTON_NORMAL ); r( wxRIBBON_BUTTON_DROPDOWN ); r( wxRIBBON_BUTTON_HYBRID ); r( wxRIBBON_BUTTON_TOGGLE ); r( wxRIBBON_BUTTONBAR_BUTTON_SMALL ); r( wxRIBBON_BUTTONBAR_BUTTON_MEDIUM ); r( wxRIBBON_BUTTONBAR_BUTTON_LARGE ); r( wxRIBBON_BUTTONBAR_BUTTON_SIZE_MASK ); r( wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED ); r( wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_HOVERED ); r( wxRIBBON_BUTTONBAR_BUTTON_HOVER_MASK ); r( wxRIBBON_BUTTONBAR_BUTTON_NORMAL_ACTIVE ); r( wxRIBBON_BUTTONBAR_BUTTON_DROPDOWN_ACTIVE ); r( wxRIBBON_BUTTONBAR_BUTTON_DISABLED ); r( wxRIBBON_BUTTONBAR_BUTTON_TOGGLED ); r( wxRIBBON_BUTTONBAR_BUTTON_STATE_MASK ); r( wxRIBBON_GALLERY_BUTTON_NORMAL ); r( wxRIBBON_GALLERY_BUTTON_HOVERED ); r( wxRIBBON_GALLERY_BUTTON_ACTIVE ); r( wxRIBBON_GALLERY_BUTTON_DISABLED ); break; case 'E': r( wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED ); r( wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGING ); r( wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_DOWN ); r( wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP ); r( wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN ); r( wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP ); r( wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK ); r( wxEVT_COMMAND_RIBBONBUTTON_CLICKED ); r( wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED ); r( wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED ); r( wxEVT_COMMAND_RIBBONGALLERY_SELECTED ); r( wxEVT_COMMAND_RIBBONGALLERY_CLICKED ); r( wxEVT_COMMAND_RIBBONTOOL_CLICKED ); r( wxEVT_COMMAND_RIBBONTOOL_DROPDOWN_CLICKED ); break; default: break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants ribbon_module( &ribbon_constant ); Wx-0.9923/ext/ribbon/cpp/toolbarbases.h000664000000000000 651512306612260 16154 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ribbongalleryitem.h // Purpose: wxRibbonGalleryItem declaration // Author: Mark Dootson // SVN ID: $Id: $ // Copyright: (c) 2012 Mattia barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// // // Declaration for these classes is in source CPP files so we need a // declaration here. It is horrible and means we have to review every // wxWidgets release. // ///////////////////////////////////////////////////////////////////////////// #ifndef _WXPERL_RIBBON_BUTTON_TOOL_BASES_H_ #define _WXPERL_RIBBON_BUTTON_TOOL_BASES_H_ class wxRibbonButtonBarButtonSizeInfo { public: bool is_supported; wxSize size; wxRect normal_region; wxRect dropdown_region; }; class wxRibbonButtonBarButtonInstance { public: wxPoint position; wxRibbonButtonBarButtonBase* base; wxRibbonButtonBarButtonState size; }; class wxRibbonToolBarToolBase { public: wxString help_string; wxBitmap bitmap; wxBitmap bitmap_disabled; wxRect dropdown; wxPoint position; wxSize size; wxObject* client_data; int id; wxRibbonButtonKind kind; long state; }; class wxRibbonButtonBarButtonBase { public: wxRibbonButtonBarButtonInstance NewInstance() { wxRibbonButtonBarButtonInstance i; i.base = this; return i; } wxRibbonButtonBarButtonState GetLargestSize() { if(sizes[wxRIBBON_BUTTONBAR_BUTTON_LARGE].is_supported) return wxRIBBON_BUTTONBAR_BUTTON_LARGE; if(sizes[wxRIBBON_BUTTONBAR_BUTTON_MEDIUM].is_supported) return wxRIBBON_BUTTONBAR_BUTTON_MEDIUM; wxASSERT(sizes[wxRIBBON_BUTTONBAR_BUTTON_SMALL].is_supported); return wxRIBBON_BUTTONBAR_BUTTON_SMALL; } bool GetSmallerSize( wxRibbonButtonBarButtonState* size, int n = 1) { for(; n > 0; --n) { switch(*size) { case wxRIBBON_BUTTONBAR_BUTTON_LARGE: if(sizes[wxRIBBON_BUTTONBAR_BUTTON_MEDIUM].is_supported) { *size = wxRIBBON_BUTTONBAR_BUTTON_MEDIUM; break; } case wxRIBBON_BUTTONBAR_BUTTON_MEDIUM: if(sizes[wxRIBBON_BUTTONBAR_BUTTON_SMALL].is_supported) { *size = wxRIBBON_BUTTONBAR_BUTTON_SMALL; break; } case wxRIBBON_BUTTONBAR_BUTTON_SMALL: default: return false; } } return true; } wxString label; wxString help_string; wxBitmap bitmap_large; wxBitmap bitmap_large_disabled; wxBitmap bitmap_small; wxBitmap bitmap_small_disabled; wxRibbonButtonBarButtonSizeInfo sizes[3]; wxObject* client_data; int id; wxRibbonButtonKind kind; long state; }; WX_DEFINE_ARRAY_PTR(wxRibbonToolBarToolBase*, wxArrayRibbonToolBarToolBase); class wxRibbonToolBarToolGroup { public: // To identify the group as a wxRibbonToolBarToolBase* wxRibbonToolBarToolBase dummy_tool; wxArrayRibbonToolBarToolBase tools; wxPoint position; wxSize size; }; #endif Wx-0.9923/ext/ribbon/lib/000775000000000000 012316265011 13217 5ustar00Mark000000000000Wx-0.9923/ext/ribbon/lib/Wx/000775000000000000 012316265011 13615 5ustar00Mark000000000000Wx-0.9923/ext/ribbon/lib/Wx/Ribbon.pm000664000000000000 230212306612262 15446 0ustar00Mark000000000000############################################################################# ## Name: ext/ribbon/lib/Wx/Ribbon.pm ## Purpose: Wx::Ribbon and related classes ## Author: Mark Dootson ## Created: 01/03/2012 ## SVN-ID: $Id: Ribbon.pm 3342 2012-09-14 14:03:27Z mdootson $ ## Copyright: (c) 2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# BEGIN { package Wx::Ribbon; our $__wx_ribbon_present = Wx::_wx_optmod_ribbon(); } package Wx::Ribbon; use strict; our $VERSION = '0.01'; our $__wx_ribbon_present; if( $__wx_ribbon_present ) { Wx::load_dll( 'adv' ); Wx::load_dll( 'ribbon' ); Wx::wx_boot( 'Wx::Ribbon', $VERSION ); } # # properly setup inheritance tree # no strict; package Wx::RibbonArtProvider; package Wx::RibbonMSWArtProvider; @ISA = qw( Wx::RibbonArtProvider ); package Wx::RibbonAUIArtProvider; @ISA = qw( Wx::RibbonMSWArtProvider ); package Wx::RibbonDefaultArtProvider; @ISA = ( Wx::wxMSW() ) ? qw( Wx::RibbonMSWArtProvider ) : qw( Wx::RibbonAUIArtProvider ) ; 1; Wx-0.9923/ext/ribbon/Makefile.PL000664000000000000 165712306612263 14520 0ustar00Mark000000000000############################################################################# ## Name: ext/ribbon/Makefile.PL ## Purpose: Makefile.PL for wxRibbonBar ## Author: Mark Dootson ## Modified by: ## Created: 05/03/2012 ## SVN-ID: $Id: Makefile.PL 3176 2012-03-08 03:26:08Z mdootson $ ## Copyright: (c) 2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use Config; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::Ribbon', VERSION_FROM => 'lib/Wx/Ribbon.pm', REQUIRE_WX => 2.009003, WX_CORE_LIB => 'ribbon adv core base', REQUIRE_WX_LIB => 'ribbon', NO_WX_PLATFORMS => [ ], ); Wx-0.9923/ext/ribbon/Ribbon.xs000664000000000000 466712306612262 14340 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/ribbon/Ribbon.xs // Purpose: XS for Wx::Ribbon // Author: Mark Dootson // Modified by: // Created: 01/03/2012 // SVN-ID: $Id: RichText.xs 3134 2012-02-27 23:15:23Z mdootson $ // Copyright: (c) 2012 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/constants.h" #include "cpp/overload.h" // re-include for client data #include #include "cpp/helpers.h" #include "cpp/array_helpers.h" #undef THIS #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_RIBBON #define wxNullBitmapPtr (wxBitmap*)&wxNullBitmap #define wxDefaultValidatorPtr (wxValidator*)&wxDefaultValidator #include #include #include #include #include #include #include #include #endif MODULE=Wx__Ribbon BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_RIBBON INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RibbonGallery.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RibbonBar.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RibbonButtonBar.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RibbonControl.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RibbonPage.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RibbonPanel.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RibbonToolBar.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RibbonArtProvider.xsp MODULE=Wx__Ribbon PACKAGE=Wx::Ribbon #include "cpp/ovl_const.cpp" #include #endif # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__Ribbon Wx-0.9923/ext/ribbon/t/000775000000000000 012316265011 12714 5ustar00Mark000000000000Wx-0.9923/ext/ribbon/t/01_load.t000775000000000000 14112306612261 14361 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Test::More tests => 1; use Wx; use_ok( 'Wx::Ribbon' ); 1; Wx-0.9923/ext/ribbon/t/02_inheritance.t000775000000000000 42612306612261 15742 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use if !Wx::_wx_optmod_ribbon(), 'Test::More' => skip_all => 'No Ribbon Support'; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::Ribbon; test_inheritance_end(); Wx-0.9923/ext/ribbon/t/03_threads.t000775000000000000 1053112313654634 15152 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::_wx_optmod_ribbon(), 'Test::More' => skip_all => 'No Ribbon Support'; use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use if Wx::wxMOTIF, 'Test::More' => skip_all => 'Hangs under Motif'; use Test::More tests => 8; use Wx::Ribbon; package MyDataContainer; sub new { my $class = shift; my $self = bless {}, $class; $self->{somedata} = $_[0]; return $self; } package main; my $app = Wx::App->new( sub { 1 } ); my $frame = Wx::Frame->new(undef, -1, 'Test Frame'); my $rcontrol = Wx::RibbonControl->new($frame, -1); my $rgallery = Wx::RibbonGallery->new($frame, -1); my $rpanel = Wx::RibbonPanel->new($frame, -1); my $rbar = Wx::RibbonBar->new($frame, -1); my $rpage = Wx::RibbonPage->new($rbar, -1); my $rbbar = Wx::RibbonButtonBar->new($frame, -1); my $rtbar = Wx::RibbonToolBar->new($frame, -1); my $artprov1 = $rbar->GetArtProvider->Clone; my $artprov2 = $rbar->GetArtProvider->Clone; my $artprov3 = Wx::RibbonDefaultArtProvider->new(); my $artprov4 = Wx::RibbonDefaultArtProvider->new(); my $rgitem1 = $rgallery->Append( Wx::Bitmap->new( 100, 100, -1 ), -1, MyDataContainer->new('Stashed Data 0')); my $rgitem2 = $rgallery->Append( Wx::Bitmap->new( 100, 100, -1 ), -1, MyDataContainer->new('Stashed Data 1')); my $cdata1 = $rgallery->GetItemClientData( $rgitem1 ); my $cdata2 = $rgitem2->GetClientData(); my ( $buttonbar, $button, $buttonbar2, $button2, $buttonbar3, $button3 ); if ( Wx::wxVERSION < 3.000000 ) { $buttonbar = Wx::RibbonButtonBar->new($rpanel, -1 ); $button = $buttonbar->AddButton(-1, "Hello World", Wx::Bitmap->new( 100, 100, -1 ), wxNullBitmap, wxNullBitmap, wxNullBitmap, Wx::wxRIBBON_BUTTON_NORMAL(), "HW Help", { data => 'Stashed Data' } ); $buttonbar2 = Wx::RibbonButtonBar->new($rpanel, -1 ); $button2 = $buttonbar2->AddButton(-1, "Hello World", Wx::Bitmap->new( 100, 100, -1 ), wxNullBitmap, wxNullBitmap, wxNullBitmap, Wx::wxRIBBON_BUTTON_NORMAL(), "HW Help", { data => 'Stashed Data' } ); $buttonbar3 = Wx::RibbonButtonBar->new($rpanel, -1 ); $button3 = $buttonbar3->AddButton(-1, "Hello World", Wx::Bitmap->new( 100, 100, -1 ), wxNullBitmap, wxNullBitmap, wxNullBitmap, Wx::wxRIBBON_BUTTON_NORMAL(), "HW Help", { data => 'Stashed Data' } ); } else { $buttonbar = Wx::RibbonButtonBar->new($rpanel, -1 ); $button = $buttonbar->AddButton(-1, "Hello World", Wx::Bitmap->new( 100, 100, -1 ), wxNullBitmap, wxNullBitmap, wxNullBitmap, Wx::wxRIBBON_BUTTON_NORMAL(), "HW Help"); $buttonbar2 = Wx::RibbonButtonBar->new($rpanel, -1 ); $button2 = $buttonbar2->AddButton(-1, "Hello World", Wx::Bitmap->new( 100, 100, -1 ), wxNullBitmap, wxNullBitmap, wxNullBitmap, Wx::wxRIBBON_BUTTON_NORMAL(), "HW Help"); $buttonbar3 = Wx::RibbonButtonBar->new($rpanel, -1 ); $button3 = $buttonbar3->AddButton(-1, "Hello World", Wx::Bitmap->new( 100, 100, -1 ), wxNullBitmap, wxNullBitmap, wxNullBitmap, Wx::wxRIBBON_BUTTON_NORMAL(), "HW Help"); } my $toolbar = Wx::RibbonToolBar->new($rpanel, 1 ); my $tool = $toolbar->AddTool(-1, Wx::Bitmap->new( 100, 100, -1 ), wxNullBitmap, "HW Help", Wx::wxRIBBON_BUTTON_NORMAL(), { data => 'Stashed Data' } ); my $toolbar2 = Wx::RibbonToolBar->new($rpanel, 1 ); my $tool2 = $toolbar2->AddTool(-1, Wx::Bitmap->new( 100, 100, -1 ), wxNullBitmap, "HW Help", Wx::wxRIBBON_BUTTON_NORMAL(), { data => 'Stashed Data' } ); my $toolbar3 = Wx::RibbonToolBar->new($rpanel, 1 ); my $tool3 = $toolbar3->AddTool(-1, Wx::Bitmap->new( 100, 100, -1 ), wxNullBitmap, "HW Help", Wx::wxRIBBON_BUTTON_NORMAL(), { data => 'Stashed Data' } ); isa_ok($cdata1, 'MyDataContainer'); is( $cdata1->{somedata}, 'Stashed Data 0' ); isa_ok($cdata2, 'MyDataContainer'); is( $cdata2->{somedata}, 'Stashed Data 1' ); undef $artprov2; undef $artprov4; undef $rgitem2; undef $buttonbar2; $buttonbar3->Destroy; undef $buttonbar3; undef $button2; undef $button3; undef $toolbar2; $toolbar3->Destroy; undef $toolbar3; undef $tool2; undef $tool3; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/ribbon/t/04_userdata.t000775000000000000 1432712313655370 15336 0ustar00Mark000000000000#!/usr/bin/perl -w # test for client data handling in various controls use strict; use Wx; use lib '../../t'; use if !Wx::_wx_optmod_ribbon(), 'Test::More' => skip_all => 'No Ribbon Support'; use Tests_Helper qw(in_frame); use Wx::Event qw(EVT_BUTTON); use Wx::Ribbon; use Wx qw( :bitmap ); # Currently asserts cause wxRibbonButtonBar to fault # in some released wxWidgets versions. # Switch asserts off for this test Wx::DisableAssertHandler(); #------------------------------------------------------------- package MyClass; sub new { my $class = shift; my $code = shift; die "want a CODE reference" unless ref $code eq 'CODE'; return bless [ $code ], $class; } sub DESTROY { &{$_[0][0]} } #-------------------------------------------------------------- package MyDataContainer; sub new { my $class = shift; my $self = bless {}, $class; $self->{somedata} = $_[0]; return $self; } sub get_data { $_[0]->{somedata}; } #-------------------------------------------------------------- package main; use Test::More 'tests' => 15; use strict; #use base 'Wx::Frame'; use vars '$TODO'; sub cdata($) { MyClass->new( $_[0] ) } sub tests { my $this = shift; ############################################################################ # wxRibbonGallery ############################################################################ my $gallery = Wx::RibbonGallery->new( $this, -1 ); my $rgitem3 = $gallery->Append( Wx::Bitmap->new( 100, 100, -1 ), -1, MyDataContainer->new('Stashed Data 0')); my $rgitem4 = $gallery->Append( Wx::Bitmap->new( 100, 100, -1 ), -1, MyDataContainer->new('Stashed Data 1')); is( $gallery->GetItemClientData( $rgitem4 )->get_data, 'Stashed Data 1', "Wx::RibbonGallery::GetItemClientData" ); is( $rgitem3->GetClientData()->get_data, 'Stashed Data 0', "Wx::RibbonGalleryItem::GetClientData" ); $rgitem3->SetClientData( MyDataContainer->new('Stashed Data 3') ); is( $gallery->GetItemClientData( $rgitem3 )->get_data, 'Stashed Data 3', "Wx::RibbonGallery::GetItemClientData ( again )" ); my $ctrldelete = 0; my $ctrlitem = $gallery->AppendClientData( Wx::Bitmap->new( 100, 100, -1 ), -1, cdata(sub { $ctrldelete = 1 }) ); $gallery->Destroy; ok( $ctrldelete, 'Wx::RibbonGallery: deleting the gallery deletes the data' ); ############################################################################ # wxRibbonButtonBar ############################################################################ my $bitmap = Wx::Bitmap->new('../../wxpl.xpm', Wx::wxBITMAP_TYPE_XPM() ); my $ribbonpanel = Wx::RibbonPanel->new($this, -1); # client data in wxRibbonButtonBar seems not useful # unless we hang on to the button references ? SKIP: { skip 'No ClientData in wxRibbonButtonBar 3.x.x', 3 if Wx::wxVERSION >= 3.000000; my $buttonbar = Wx::RibbonButtonBar->new($ribbonpanel, 1 ); my $button = $buttonbar->AddButton(-1, "Hello World", $bitmap, wxNullBitmap, wxNullBitmap, wxNullBitmap, Wx::wxRIBBON_BUTTON_NORMAL(), "HW Help", MyDataContainer->new('Stashed Data 4') ); $ctrldelete = 0; my $delbutton = $buttonbar->AddButton(-1, "Hello World", $bitmap, wxNullBitmap, wxNullBitmap, wxNullBitmap, Wx::wxRIBBON_BUTTON_NORMAL(), "HW Help", cdata(sub { $ctrldelete = 1 } ) ); is( $button->GetClientData()->get_data, 'Stashed Data 4', "Wx::RibbonButtonBarButtonBase::GetClientData" ); ok( $ctrldelete == 0, 'Wx::RibbonButtonBar: Data not changed before delete' ); $delbutton->SetClientData(undef); $buttonbar->Destroy; ok( $ctrldelete, 'Wx::RibbonButtonBar: deleting the ribbonbuttonbar deletes the data' ); }; ############################################################################ # wxRibbonToolBar ############################################################################ my $toolbar = Wx::RibbonToolBar->new($ribbonpanel, 1 ); # no client data my $toolid0 = $toolbar->AddTool(-1, $bitmap, "HW Help", Wx::wxRIBBON_BUTTON_NORMAL())->id; # check that getting && setting some client data where none exists works my $firstdata = $toolbar->GetToolClientData( $toolid0 ); ok( !defined($firstdata), "Wx::RibbonToolBar::GetToolClientData undefined"); $toolbar->SetToolClientData( $toolid0, MyDataContainer->new('Stashed Data X') ); $firstdata = $toolbar->GetToolClientData( $toolid0 ); is( $firstdata->get_data, 'Stashed Data X', "Wx::RibbonToolBar::GetToolClientData defined"); my $toolid1 = $toolbar->AddTool(-1, $bitmap, wxNullBitmap, "HW Help", Wx::wxRIBBON_BUTTON_NORMAL(), MyDataContainer->new('Stashed Data 5') )->id; my $toolid2 = $toolbar->AddTool(-1, $bitmap, wxNullBitmap, "HW Help", Wx::wxRIBBON_BUTTON_NORMAL(), MyDataContainer->new('Stashed Data 6') )->id; my $persistentdata = MyDataContainer->new('Stashed Persistent Data 1'); my $tbarbutton = $toolbar->AddTool(-1, $bitmap, wxNullBitmap, "HW Help", Wx::wxRIBBON_BUTTON_NORMAL(), $persistentdata ); $ctrldelete = 0; my $autoid = $toolbar->AddTool(-1, $bitmap, wxNullBitmap, "HW Help", Wx::wxRIBBON_BUTTON_NORMAL(), cdata( sub { $ctrldelete = 1 } ) )->id; ; is( $toolbar->GetToolClientData($toolid2)->get_data, 'Stashed Data 6', "Wx::RibbonToolBar::GetToolClientData For Tool 2" ); is( $toolbar->GetToolClientData($toolid1)->get_data, 'Stashed Data 5', "Wx::RibbonToolBar::GetToolClientData For Tool 1" ); is( $toolbar->GetToolClientData( $tbarbutton->id )->get_data, 'Stashed Persistent Data 1', "Wx::RibbonToolBar::GetToolClientData For Persistent data" ); ok( $ctrldelete == 0, 'Wx::RibbonToolBar: Data not changed before delete' ); # in wxRibbonToolBar ClientData is untyped void so we must delete the clientdata before we delete the tool # our XSUB checks SvOK so pass undef $toolbar->SetToolClientData( $autoid, undef ); ok( $ctrldelete, 'Wx::RibbonToolBar: setting client data undef deletes the data' ); $toolbar->Destroy; # The persistent data should still be in the $datatype is( $persistentdata->get_data, 'Stashed Persistent Data 1', "Wx::UserDataO Data Persists" ); } in_frame( \&tests ); # local variables: # mode: cperl # end: Wx-0.9923/ext/ribbon/typemap000664000000000000 325612306612260 14142 0ustar00Mark000000000000############################################################################# ## Name: ext/ribbon/typemap ## Purpose: typemap ## Author: Mark Dootson ## Modified by: ## Created: 01/03/2012 ## SVN-ID: $Id:$ ## Copyright: (c) 2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxRibbonArtProvider * O_NON_WXOBJECT_THR wxRibbonMSWArtProvider * O_NON_WXOBJECT_THR wxRibbonAUIArtProvider * O_NON_WXOBJECT_THR wxRibbonBarEvent * O_WXOBJECT wxRibbonButtonBarEvent * O_WXOBJECT wxRibbonGalleryEvent * O_WXOBJECT wxRibbonToolBarEvent * O_WXOBJECT wxRibbonPage * O_WXEVTHANDLER const wxRibbonPage * O_WXEVTHANDLER wxRibbonBar * O_WXEVTHANDLER wxRibbonButtonBar * O_WXEVTHANDLER wxPliRibbonButtonBar * O_WXEVTHANDLER wxRibbonToolBar * O_WXEVTHANDLER wxPliRibbonToolBar * O_WXEVTHANDLER wxRibbonControl * O_WXEVTHANDLER wxRibbonPanel * O_WXEVTHANDLER const wxRibbonPanel* O_WXEVTHANDLER wxRibbonGallery * O_WXEVTHANDLER const wxRibbonGallery * O_WXEVTHANDLER wxRibbonGalleryItem * O_NON_WXOBJECT_THR const wxRibbonGalleryItem * O_NON_WXOBJECT_THR wxRibbonButtonBarButtonKind T_ENUM wxRibbonButtonKind T_ENUM wxOrientation T_ENUM wxRibbonGalleryButtonState T_ENUM wxRibbonButtonBarButtonState T_ENUM wxRibbonButtonBarButtonBase * O_NON_WXOBJECT wxRibbonToolBarToolBase * O_NON_WXOBJECT const wxRibbonToolBarToolBase * O_NON_WXOBJECT Wx-0.9923/ext/ribbon/typemap.xsp000664000000000000 346212306612263 14755 0ustar00Mark000000000000############################################################################# ## Name: ext/ribbon/typemap.xsp ## Purpose: typemap file for xsubppp.pl ## Author: Mark Dootson ## Modified by: ## Created: 01/03/2012 ## SVN-ID: $Id: typemap.xsp 2962 2010-08-23 19:33:35Z mbarbon $ ## Copyright: (c) 2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %typemap{wxRibbonArtProvider*}{simple}; %typemap{wxRibbonPage*}{simple}; %typemap{const wxRibbonPage*}{simple}; %typemap{wxRibbonBarEvent*}{simple}; %typemap{wxRibbonToolBarEvent*}{simple}; %typemap{wxRibbonBar*}{simple}; %typemap{wxRibbonPanel*}{simple}; %typemap{const wxRibbonPanel*}{simple}; %typemap{wxRibbonGallery*}{simple}; %typemap{const wxRibbonGallery*}{simple}; %typemap{wxRibbonGalleryItem*}{simple}; %typemap{const wxRibbonGalleryItem*}{simple}; %typemap{wxRibbonButtonBarButtonKind}{simple}; %typemap{wxRibbonButtonKind}{simple}; %typemap{wxRibbonButtonBarButtonBase*}{simple}; %typemap{wxRibbonButtonBar*}{simple}; %typemap{wxRibbonToolBar*}{simple}; %typemap{wxRibbonToolBarToolBase*}{simple}; %typemap{const wxRibbonToolBarToolBase*}{simple}; %typemap{wxRibbonGalleryButtonState}{simple}; %typemap{wxRibbonButtonBarButtonState}{simple}; %typemap{wxClientData*}{parsed}{%Wx_UserDataCD*%}; %typemap{wxWindowBase*}{parsed}{%wxWindow*%}; %typemap{wxBitmap&}{reference}; %typemap{wxRect}{reference}; %typemap{wxRect*}{simple}; %typemap{wxEvent*}{simple}; %typemap{wxOrientation}{simple}; %typemap{wxString*}{simple}; %typemap{wxBitmap*}{simple}; %typemap{wxSize*}{simple}; %typemap{wxPoint*}{simple}; %typemap{Wx_UserDataCD*}{simple}; %typemap{Wx_UserDataO*}{simple}; Wx-0.9923/ext/ribbon/XS/000775000000000000 012316265011 13003 5ustar00Mark000000000000Wx-0.9923/ext/ribbon/XS/RibbonArtProvider.xsp000664000000000000 4124712306612264 17251 0ustar00Mark000000000000############################################################################# ## Name: ext/ribbon/XS/RibbonArtProvider.xsp ## Purpose: XS++ for Wx::RibbonArtProvider ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_RIBBON %loadplugin{build::Wx::XSP::Enum}; %EnumExportTag{ribbonart}; enum wxRibbonArtSetting { wxRIBBON_ART_TAB_SEPARATION_SIZE, wxRIBBON_ART_PAGE_BORDER_LEFT_SIZE, wxRIBBON_ART_PAGE_BORDER_TOP_SIZE, wxRIBBON_ART_PAGE_BORDER_RIGHT_SIZE, wxRIBBON_ART_PAGE_BORDER_BOTTOM_SIZE, wxRIBBON_ART_PANEL_X_SEPARATION_SIZE, wxRIBBON_ART_PANEL_Y_SEPARATION_SIZE, wxRIBBON_ART_TOOL_GROUP_SEPARATION_SIZE, wxRIBBON_ART_GALLERY_BITMAP_PADDING_LEFT_SIZE, wxRIBBON_ART_GALLERY_BITMAP_PADDING_RIGHT_SIZE, wxRIBBON_ART_GALLERY_BITMAP_PADDING_TOP_SIZE, wxRIBBON_ART_GALLERY_BITMAP_PADDING_BOTTOM_SIZE, wxRIBBON_ART_PANEL_LABEL_FONT, wxRIBBON_ART_BUTTON_BAR_LABEL_FONT, wxRIBBON_ART_TAB_LABEL_FONT, wxRIBBON_ART_BUTTON_BAR_LABEL_COLOUR, wxRIBBON_ART_BUTTON_BAR_HOVER_BORDER_COLOUR, wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR, wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_COLOUR, wxRIBBON_ART_BUTTON_BAR_HOVER_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_BUTTON_BAR_ACTIVE_BORDER_COLOUR, wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR, wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_COLOUR, wxRIBBON_ART_BUTTON_BAR_ACTIVE_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_GALLERY_BORDER_COLOUR, wxRIBBON_ART_GALLERY_HOVER_BACKGROUND_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_FACE_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_HOVER_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_HOVER_FACE_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_ACTIVE_FACE_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_DISABLED_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_GALLERY_BUTTON_DISABLED_FACE_COLOUR, wxRIBBON_ART_GALLERY_ITEM_BORDER_COLOUR, wxRIBBON_ART_TAB_LABEL_COLOUR, wxRIBBON_ART_TAB_SEPARATOR_COLOUR, wxRIBBON_ART_TAB_SEPARATOR_GRADIENT_COLOUR, wxRIBBON_ART_TAB_CTRL_BACKGROUND_COLOUR, wxRIBBON_ART_TAB_CTRL_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_TAB_HOVER_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_TAB_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR, wxRIBBON_ART_TAB_HOVER_BACKGROUND_COLOUR, wxRIBBON_ART_TAB_HOVER_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR, wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_COLOUR, wxRIBBON_ART_TAB_ACTIVE_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_TAB_BORDER_COLOUR, wxRIBBON_ART_PANEL_BORDER_COLOUR, wxRIBBON_ART_PANEL_BORDER_GRADIENT_COLOUR, wxRIBBON_ART_PANEL_MINIMISED_BORDER_COLOUR, wxRIBBON_ART_PANEL_MINIMISED_BORDER_GRADIENT_COLOUR, wxRIBBON_ART_PANEL_LABEL_BACKGROUND_COLOUR, wxRIBBON_ART_PANEL_LABEL_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_PANEL_LABEL_COLOUR, wxRIBBON_ART_PANEL_HOVER_LABEL_BACKGROUND_COLOUR, wxRIBBON_ART_PANEL_HOVER_LABEL_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_PANEL_HOVER_LABEL_COLOUR, wxRIBBON_ART_PANEL_MINIMISED_LABEL_COLOUR, wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR, wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_COLOUR, wxRIBBON_ART_PANEL_ACTIVE_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_PAGE_BORDER_COLOUR, wxRIBBON_ART_PAGE_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_PAGE_BACKGROUND_TOP_GRADIENT_COLOUR, wxRIBBON_ART_PAGE_BACKGROUND_COLOUR, wxRIBBON_ART_PAGE_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_PAGE_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR, wxRIBBON_ART_PAGE_HOVER_BACKGROUND_COLOUR, wxRIBBON_ART_PAGE_HOVER_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_TOOLBAR_BORDER_COLOUR, wxRIBBON_ART_TOOLBAR_HOVER_BORDER_COLOUR, wxRIBBON_ART_TOOLBAR_FACE_COLOUR, wxRIBBON_ART_TOOL_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_TOOL_BACKGROUND_TOP_GRADIENT_COLOUR, wxRIBBON_ART_TOOL_BACKGROUND_COLOUR, wxRIBBON_ART_TOOL_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_TOOL_HOVER_BACKGROUND_TOP_GRADIENT_COLOUR, wxRIBBON_ART_TOOL_HOVER_BACKGROUND_COLOUR, wxRIBBON_ART_TOOL_HOVER_BACKGROUND_GRADIENT_COLOUR, wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_COLOUR, wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_TOP_GRADIENT_COLOUR, wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_COLOUR, wxRIBBON_ART_TOOL_ACTIVE_BACKGROUND_GRADIENT_COLOUR, }; %name{Wx::RibbonArtProvider} class wxRibbonArtProvider { %{ static void wxRibbonArtProvider::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: virtual wxRibbonArtProvider* Clone() const; /* = 0 %Virtual{pure}; */ virtual void SetFlags(long flags); /* = 0 %Virtual{pure}; */ virtual long GetFlags() const; /* = 0 %Virtual{pure}; */ virtual int GetMetric(int id) const; /* = 0 %Virtual{pure}; */ virtual void SetMetric(int id, int new_val); /* = 0 %Virtual{pure}; */ virtual void SetFont(int id, const wxFont& font); /* = 0 %Virtual{pure}; */ virtual wxFont GetFont(int id) const; /* = 0 %Virtual{pure}; */ virtual wxColour GetColour(int id) const; /* = 0 %Virtual{pure}; */ virtual void SetColour(int id, const wxColour& colour); /* = 0 %Virtual{pure}; */ /* virtual void GetColourScheme(wxColour* primary, wxColour* secondary, wxColour* tertiary) const; */ /* = 0 %Virtual{pure}; */ %{ void wxRibbonArtProvider::GetColourScheme() PPCODE: wxColour* primary = new wxColour(); wxColour* secondary = new wxColour(); wxColour* tertiary = new wxColour(); THIS->GetColourScheme( primary, secondary, tertiary); EXTEND( SP, 3 ); SV* pret = sv_newmortal(); SV* sret = sv_newmortal(); SV* tret = sv_newmortal(); PUSHs( wxPli_non_object_2_sv( aTHX_ pret, primary, "Wx::Colour" ) ); PUSHs( wxPli_non_object_2_sv( aTHX_ sret, secondary, "Wx::Colour" ) ); PUSHs( wxPli_non_object_2_sv( aTHX_ tret, tertiary, "Wx::Colour" ) ); wxPli_thread_sv_register( aTHX_ "Wx::Colour", &primary, pret ); wxPli_thread_sv_register( aTHX_ "Wx::Colour", &secondary, sret ); wxPli_thread_sv_register( aTHX_ "Wx::Colour", &tertiary, tret ); %} virtual void SetColourScheme(const wxColour& primary, const wxColour& secondary, const wxColour& tertiary); /* = 0 %Virtual{pure}; */ /* virtual void DrawTabCtrlBackground( wxDC& dc, wxWindow* wnd, const wxRect& rect); */ /* = 0 %Virtual{pure}; */ /* virtual void DrawTab(wxDC& dc, wxWindow* wnd, const wxRibbonPageTabInfo& tab); */ /* = 0 %Virtual{pure}; */ /* virtual void DrawTabSeparator(wxDC& dc, wxWindow* wnd, const wxRect& rect, double visibility); */ /* = 0 %Virtual{pure}; */ /* virtual void DrawPageBackground( wxDC& dc, wxWindow* wnd, const wxRect& rect); */ /* = 0 %Virtual{pure}; */ /* virtual void DrawScrollButton( wxDC& dc, wxWindow* wnd, const wxRect& rect, long style); */ /* = 0 %Virtual{pure}; */ /* virtual void DrawPanelBackground( wxDC& dc, wxRibbonPanel* wnd, const wxRect& rect); */ /* = 0 %Virtual{pure}; */ /* virtual void DrawGalleryBackground( wxDC& dc, wxRibbonGallery* wnd, const wxRect& rect); */ /* = 0 %Virtual{pure}; */ /* virtual void DrawGalleryItemBackground( wxDC& dc, wxRibbonGallery* wnd, const wxRect& rect, wxRibbonGalleryItem* item); */ /* = 0 %Virtual{pure}; */ /* virtual void DrawMinimisedPanel( wxDC& dc, wxRibbonPanel* wnd, const wxRect& rect, wxBitmap& bitmap); */ /* = 0 %Virtual{pure}; */ /* virtual void DrawButtonBarBackground( wxDC& dc, wxWindow* wnd, const wxRect& rect); */ /* = 0 %Virtual{pure}; */ /* virtual void DrawButtonBarButton( wxDC& dc, wxWindow* wnd, const wxRect& rect, wxRibbonButtonBarButtonKind kind, long state, const wxString& label, const wxBitmap& bitmap_large, const wxBitmap& bitmap_small); */ /* = 0 %Virtual{pure}; */ /* virtual void DrawToolBarBackground( wxDC& dc, wxWindow* wnd, const wxRect& rect); */ /* = 0 %Virtual{pure}; */ /* virtual void DrawToolGroupBackground( wxDC& dc, wxWindow* wnd, const wxRect& rect); */ /* = 0 %Virtual{pure}; */ /* virtual void DrawTool( wxDC& dc, wxWindow* wnd, const wxRect& rect, const wxBitmap& bitmap, wxRibbonButtonKind kind, long state); */ /* = 0 %Virtual{pure}; */ /* virtual void GetBarTabWidth( wxDC& dc, wxWindow* wnd, const wxString& label, const wxBitmap& bitmap, int* ideal, int* small_begin_need_separator, int* small_must_have_separator, int* minimum); */ /* = 0 %Virtual{pure}; */ /* virtual int GetTabCtrlHeight( wxDC& dc, wxWindow* wnd, const wxRibbonPageTabInfoArray& pages); */ /* = 0 %Virtual{pure}; */ /* virtual wxSize GetScrollButtonMinimumSize( wxDC& dc, wxWindow* wnd, long style); */ /* = 0 %Virtual{pure}; */ /* virtual wxSize GetPanelSize( wxDC& dc, const wxRibbonPanel* wnd, wxSize client_size, wxPoint* client_offset); */ /* = 0 %Virtual{pure}; */ /* virtual wxSize GetPanelClientSize( wxDC& dc, const wxRibbonPanel* wnd, wxSize size, wxPoint* client_offset); */ /* = 0 %Virtual{pure}; */ /* virtual wxSize GetGallerySize( wxDC& dc, const wxRibbonGallery* wnd, wxSize client_size); */ /* = 0 %Virtual{pure}; */ /* virtual wxSize GetGalleryClientSize( wxDC& dc, const wxRibbonGallery* wnd, wxSize size, wxPoint* client_offset, wxRect* scroll_up_button, wxRect* scroll_down_button, wxRect* extension_button); */ /* = 0 %Virtual{pure}; */ /* virtual wxRect GetPageBackgroundRedrawArea( wxDC& dc, const wxRibbonPage* wnd, wxSize page_old_size, wxSize page_new_size); */ /* = 0 %Virtual{pure}; */ /* virtual bool GetButtonBarButtonSize( wxDC& dc, wxWindow* wnd, wxRibbonButtonBarButtonKind kind, wxRibbonButtonBarButtonState size, const wxString& label, wxSize bitmap_size_large, wxSize bitmap_size_small, wxSize* button_size, wxRect* normal_region, wxRect* dropdown_region); */ /* = 0 %Virtual{pure}; */ /* virtual wxSize GetMinimisedPanelMinimumSize( wxDC& dc, const wxRibbonPanel* wnd, wxSize* desired_bitmap_size, wxDirection* expanded_panel_direction); */ /* = 0 %Virtual{pure}; */ /* virtual wxSize GetToolSize( wxDC& dc, wxWindow* wnd, wxSize bitmap_size, wxRibbonButtonKind kind, bool is_first, bool is_last, wxRect* dropdown_region); */ /* = 0 %Virtual{pure}; */ }; %name{Wx::RibbonMSWArtProvider} class wxRibbonMSWArtProvider : public %name{Wx::RibbonArtProvider} wxRibbonArtProvider { %{ static void wxRibbonMSWArtProvider::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: wxRibbonMSWArtProvider(bool set_colour_scheme = true); virtual ~wxRibbonMSWArtProvider() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); %}; wxRibbonArtProvider* Clone() const; void SetFlags(long flags); long GetFlags() const; int GetMetric(int id) const; void SetMetric(int id, int new_val); void SetFont(int id, const wxFont& font); wxFont GetFont(int id) const; wxColour GetColour(int id) const; void SetColour(int id, const wxColour& colour); /* void GetColourScheme(wxColour* primary, wxColour* secondary, wxColour* tertiary) const; */ %{ void wxRibbonMSWArtProvider::GetColourScheme() PPCODE: wxColour* primary = new wxColour(); wxColour* secondary = new wxColour(); wxColour* tertiary = new wxColour(); THIS->GetColourScheme( primary, secondary, tertiary); EXTEND( SP, 3 ); SV* pret = sv_newmortal(); SV* sret = sv_newmortal(); SV* tret = sv_newmortal(); PUSHs( wxPli_non_object_2_sv( aTHX_ pret, primary, "Wx::Colour" ) ); PUSHs( wxPli_non_object_2_sv( aTHX_ sret, secondary, "Wx::Colour" ) ); PUSHs( wxPli_non_object_2_sv( aTHX_ tret, tertiary, "Wx::Colour" ) ); wxPli_thread_sv_register( aTHX_ "Wx::Colour", &primary, pret ); wxPli_thread_sv_register( aTHX_ "Wx::Colour", &secondary, sret ); wxPli_thread_sv_register( aTHX_ "Wx::Colour", &tertiary, tret ); %} void SetColourScheme(const wxColour& primary, const wxColour& secondary, const wxColour& tertiary); }; %name{Wx::RibbonAUIArtProvider} class wxRibbonAUIArtProvider : public %name{Wx::RibbonMSWArtProvider} wxRibbonMSWArtProvider { %{ static void wxRibbonAUIArtProvider::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: wxRibbonAUIArtProvider(); virtual ~wxRibbonAUIArtProvider() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); %}; wxRibbonArtProvider* Clone() const; wxColour GetColour(int id) const; void SetColour(int id, const wxColour& colour); void SetColourScheme(const wxColour& primary, const wxColour& secondary, const wxColour& tertiary); void SetFont(int id, const wxFont& font); }; #endif Wx-0.9923/ext/ribbon/XS/RibbonBar.xsp000664000000000000 635112306612264 15471 0ustar00Mark000000000000############################################################################# ## Name: ext/ribbon/XS/RibbonBar.xsp ## Purpose: XS++ for Wx::RibbonBar ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_RIBBON #include %loadplugin{build::Wx::XSP::Overload}; %loadplugin{build::Wx::XSP::Event}; %name{Wx::RibbonBarEvent} class wxRibbonBarEvent : public %name{Wx::NotifyEvent} wxNotifyEvent { public: wxRibbonBarEvent(wxEventType command_type = wxEVT_NULL, int win_id = 0, wxRibbonPage* page = NULL); wxRibbonPage* GetPage(); void SetPage(wxRibbonPage* page); wxEvent *Clone(); }; %Event{%EVT_RIBBONBAR_PAGE_CHANGED(id, func)%} {wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED}; %Event{%EVT_RIBBONBAR_PAGE_CHANGING(id, func)%} {wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGING}; %Event{%EVT_RIBBONBAR_TAB_MIDDLE_DOWN(id, func)%} {wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_DOWN}; %Event{%EVT_RIBBONBAR_TAB_MIDDLE_UP(id, func)%} {wxEVT_COMMAND_RIBBONBAR_TAB_MIDDLE_UP}; %Event{%EVT_RIBBONBAR_TAB_RIGHT_DOWN(id, func)%} {wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_DOWN}; %Event{%EVT_RIBBONBAR_TAB_RIGHT_UP(id, func)%} {wxEVT_COMMAND_RIBBONBAR_TAB_RIGHT_UP}; %Event{%EVT_RIBBONBAR_TAB_LEFT_DCLICK(id, func)%} {wxEVT_COMMAND_RIBBONBAR_TAB_LEFT_DCLICK}; %name{Wx::RibbonBar} class wxRibbonBar : public %name{Wx::RibbonControl} wxRibbonControl { public: %name{newDefault} wxRibbonBar() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxRibbonBar(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxRIBBON_BAR_DEFAULT_STYLE) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxRIBBON_BAR_DEFAULT_STYLE); void SetTabCtrlMargins(int left, int right); void SetArtProvider(wxRibbonArtProvider* art); %name{SetActivePageByIndex} bool SetActivePage(size_t page) %Overload; %name{SetActivePageByPage} bool SetActivePage(wxRibbonPage* page) %Overload; int GetActivePage() const; wxRibbonPage* GetPage(int n); bool DismissExpandedPanel(); void ShowPanels(bool show = true); void HidePanels(); bool ArePanelsShown() const; virtual bool Realize(); void SetWindowStyleFlag(long style); long GetWindowStyleFlag() const; virtual bool HasMultiplePages() const; #if WXPERL_W_VERSION_GE( 2, 9, 4 ) size_t GetPageCount() const; void DeletePage(size_t n); void ClearPages(); #endif }; #endif Wx-0.9923/ext/ribbon/XS/RibbonButtonBar.xsp000664000000000000 3005512313636114 16701 0ustar00Mark000000000000############################################################################# ## Name: ext/ribbon/XS/RibbonButtonBar.xsp ## Purpose: XS++ for Wx::RibbonButtonBar ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_RIBBON #include #include %loadplugin{build::Wx::XSP::Overload}; %loadplugin{build::Wx::XSP::Event}; %Event{%EVT_RIBBONBUTTONBAR_CLICKED(id, func)%} {wxEVT_COMMAND_RIBBONBUTTON_CLICKED}; %Event{%EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED(id, func)%} {wxEVT_COMMAND_RIBBONBUTTON_DROPDOWN_CLICKED}; %name{Wx::RibbonButtonBarButtonBase} class wxRibbonButtonBarButtonBase { public: wxRibbonButtonBarButtonState GetLargestSize(); %{ void wxRibbonButtonBarButtonBase::GetSmallerSize( size, n = 1 ) wxRibbonButtonBarButtonState size int n PPCODE: /* return size or undef if !success */ wxRibbonButtonBarButtonState passsize; passsize = size; EXTEND( SP, 1 ); bool result = THIS->GetSmallerSize( &passsize, n); if( result ) { PUSHs( sv_2mortal( newSVuv( UV(size) ) ) ); } else { PUSHs( &PL_sv_undef ); } %} wxString GetLabel() %code{% RETVAL = THIS->label; %}; wxString GetHelpString() %code{% RETVAL = THIS->help_string; %}; wxBitmap* GetBitmapLarge() %code{% RETVAL = new wxBitmap(THIS->bitmap_large); %}; wxBitmap* GetBitmapLargeDisabled() %code{% RETVAL = new wxBitmap(THIS->bitmap_large_disabled); %}; wxBitmap* GetBitmapSmall() %code{% RETVAL = new wxBitmap(THIS->bitmap_small); %}; wxBitmap* GetBitmapSmallDisabled() %code{% RETVAL = new wxBitmap(THIS->bitmap_small_disabled); %}; /* wxRibbonButtonBarButtonSizeInfo sizes[3]; */ Wx_UserDataO* GetClientData() %code{% RETVAL = (Wx_UserDataO*)(THIS->client_data); %}; int GetId() %code{% RETVAL = THIS->id; %}; wxRibbonButtonKind GetKind() %code{% RETVAL = THIS->kind; %}; long GetState() %code{% RETVAL = THIS->state; %}; void SetClientData ( Wx_UserDataO* clientdata ) %code{% delete THIS->client_data; THIS->client_data = clientdata; %}; /* documented ?? names */ wxString label() %code{% RETVAL = THIS->label; %}; wxString help_string() %code{% RETVAL = THIS->help_string; %}; wxBitmap* bitmap_large() %code{% RETVAL = new wxBitmap(THIS->bitmap_large); %}; wxBitmap* bitmap_large_disabled() %code{% RETVAL = new wxBitmap(THIS->bitmap_large_disabled); %}; wxBitmap* bitmap_small() %code{% RETVAL = new wxBitmap(THIS->bitmap_small); %}; wxBitmap* bitmap_small_disabled() %code{% RETVAL = new wxBitmap(THIS->bitmap_small_disabled); %}; Wx_UserDataO* client_data() %code{% RETVAL = (Wx_UserDataO*)(THIS->client_data); %}; int id() %code{% RETVAL = THIS->id; %}; wxRibbonButtonKind kind() %code{% RETVAL = THIS->kind; %}; long state() %code{% RETVAL = THIS->state; %}; }; %name{Wx::RibbonButtonBar} class wxRibbonButtonBar : public %name{Wx::RibbonControl} wxRibbonControl { public: %name{newDefault} wxRibbonButtonBar() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxRibbonButtonBar( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); /* for add methods assign a buttonid and return it so that it may be used for event functions etc. */ wxRibbonButtonBarButtonBase* AddDropdownButton( int button_id, const wxString& label, const wxBitmap& bitmap, const wxString& help_string = wxEmptyString) %code{% int useid = ( button_id == wxID_ANY ) ? wxWindow::NewControlId() : button_id; RETVAL = THIS->AddDropdownButton( useid, label, *bitmap, help_string ); %}; wxRibbonButtonBarButtonBase* AddHybridButton( int button_id, const wxString& label, const wxBitmap& bitmap, const wxString& help_string = wxEmptyString) %code{% int useid = ( button_id == wxID_ANY ) ? wxWindow::NewControlId() : button_id; RETVAL = THIS->AddHybridButton( useid, label, *bitmap, help_string ); %}; wxRibbonButtonBarButtonBase* AddToggleButton( int button_id, const wxString& label, const wxBitmap& bitmap, const wxString& help_string = wxEmptyString) %code{% int useid = ( button_id == wxID_ANY ) ? wxWindow::NewControlId() : button_id; RETVAL = THIS->AddToggleButton( useid, label, *bitmap, help_string ); %}; %name{AddButtonShortParams} wxRibbonButtonBarButtonBase* AddButton( int button_id, const wxString& label, const wxBitmap& bitmap, const wxString& help_string, unsigned int kind = wxRIBBON_BUTTON_NORMAL) %Overload %code{% int useid = ( button_id == wxID_ANY ) ? wxWindow::NewControlId() : button_id; RETVAL = THIS->AddButton(useid, label, *bitmap, help_string, (wxRibbonButtonKind)kind); %}; #if WXPERL_W_VERSION_LE( 2, 9, 5 ) %name{AddButtonLongParams} wxRibbonButtonBarButtonBase* AddButton( int button_id, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bitmap_small = wxNullBitmapPtr, const wxBitmap& bitmap_disabled = wxNullBitmapPtr, const wxBitmap& bitmap_small_disabled = wxNullBitmapPtr, unsigned int kind = wxRIBBON_BUTTON_NORMAL, const wxString& help_string = wxEmptyString, Wx_UserDataO* client_data = NULL) %Overload %code{% int useid = ( button_id == wxID_ANY ) ? wxWindow::NewControlId() : button_id; RETVAL = THIS->AddButton(useid, label, *bitmap, *bitmap_small, *bitmap_disabled, *bitmap_small_disabled, (wxRibbonButtonKind)kind, help_string, client_data); %}; #else %name{AddButtonLongParams} wxRibbonButtonBarButtonBase* AddButton( int button_id, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bitmap_small = wxNullBitmapPtr, const wxBitmap& bitmap_disabled = wxNullBitmapPtr, const wxBitmap& bitmap_small_disabled = wxNullBitmapPtr, unsigned int kind = wxRIBBON_BUTTON_NORMAL, const wxString& help_string = wxEmptyString) %Overload %code{% int useid = ( button_id == wxID_ANY ) ? wxWindow::NewControlId() : button_id; RETVAL = THIS->AddButton(useid, label, *bitmap, *bitmap_small, *bitmap_disabled, *bitmap_small_disabled, (wxRibbonButtonKind)kind, help_string); %}; #endif virtual bool Realize(); virtual void ClearButtons(); virtual bool DeleteButton(int button_id); virtual void EnableButton(int button_id, bool enable = true); virtual void ToggleButton(int button_id, bool checked); virtual void SetArtProvider(wxRibbonArtProvider* art); virtual bool IsSizingContinuous() const; #if WXPERL_W_VERSION_GE( 2, 9, 4 ) wxRibbonButtonBarButtonBase* InsertDropdownButton( size_t pos, int button_id, const wxString& label, const wxBitmap& bitmap, const wxString& help_string = wxEmptyString) %code{% int useid = ( button_id == wxID_ANY ) ? wxWindow::NewControlId() : button_id; RETVAL = THIS->InsertDropdownButton( pos, useid, label, *bitmap, help_string ); %}; wxRibbonButtonBarButtonBase* InsertHybridButton( size_t pos, int button_id, const wxString& label, const wxBitmap& bitmap, const wxString& help_string = wxEmptyString) %code{% int useid = ( button_id == wxID_ANY ) ? wxWindow::NewControlId() : button_id; RETVAL = THIS->InsertHybridButton( pos, useid, label, *bitmap, help_string ); %}; wxRibbonButtonBarButtonBase* InsertToggleButton( size_t pos, int button_id, const wxString& label, const wxBitmap& bitmap, const wxString& help_string = wxEmptyString) %code{% int useid = ( button_id == wxID_ANY ) ? wxWindow::NewControlId() : button_id; RETVAL = THIS->InsertToggleButton( pos, useid, label, *bitmap, help_string ); %}; %name{InsertButtonShortParams} wxRibbonButtonBarButtonBase* InsertButton( size_t pos, int button_id, const wxString& label, const wxBitmap& bitmap, const wxString& help_string, unsigned int kind = wxRIBBON_BUTTON_NORMAL) %Overload %code{% int useid = ( button_id == wxID_ANY ) ? wxWindow::NewControlId() : button_id; RETVAL = THIS->InsertButton( pos, useid, label, *bitmap, help_string, (wxRibbonButtonKind)kind); %}; #if WXPERL_W_VERSION_LE( 2, 9, 5 ) %name{InsertButtonLongParams} wxRibbonButtonBarButtonBase* InsertButton( size_t pos, int button_id, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bitmap_small = wxNullBitmapPtr, const wxBitmap& bitmap_disabled = wxNullBitmapPtr, const wxBitmap& bitmap_small_disabled = wxNullBitmapPtr, unsigned int kind = wxRIBBON_BUTTON_NORMAL, const wxString& help_string = wxEmptyString, Wx_UserDataO* client_data = NULL) %Overload %code{% int useid = ( button_id == wxID_ANY ) ? wxWindow::NewControlId() : button_id; RETVAL = THIS->InsertButton( pos, useid, label, *bitmap, *bitmap_small, *bitmap_disabled, *bitmap_small_disabled, (wxRibbonButtonKind)kind, help_string, client_data); %}; #else %name{InsertButtonLongParams} wxRibbonButtonBarButtonBase* InsertButton( size_t pos, int button_id, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bitmap_small = wxNullBitmapPtr, const wxBitmap& bitmap_disabled = wxNullBitmapPtr, const wxBitmap& bitmap_small_disabled = wxNullBitmapPtr, unsigned int kind = wxRIBBON_BUTTON_NORMAL, const wxString& help_string = wxEmptyString) %Overload %code{% int useid = ( button_id == wxID_ANY ) ? wxWindow::NewControlId() : button_id; RETVAL = THIS->InsertButton( pos, useid, label, *bitmap, *bitmap_small, *bitmap_disabled, *bitmap_small_disabled, (wxRibbonButtonKind)kind, help_string); %}; #endif virtual size_t GetButtonCount() const; virtual wxSize GetMinSize() const; #endif }; %name{Wx::RibbonButtonBarEvent} class wxRibbonButtonBarEvent : public %name{Wx::CommandEvent} wxCommandEvent { public: wxRibbonButtonBarEvent(wxEventType command_type = wxEVT_NULL, int win_id = 0, wxRibbonButtonBar* bar = NULL); wxRibbonButtonBar* GetBar(); void SetBar(wxRibbonButtonBar* bar); bool PopupMenu(wxMenu* menu); wxEvent *Clone(); }; #endif Wx-0.9923/ext/ribbon/XS/RibbonControl.xsp000664000000000000 452412306612264 16405 0ustar00Mark000000000000############################################################################# ## Name: ext/ribbon/XS/RibbonControl.xsp ## Purpose: XS++ for Wx::RibbonControl ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_RIBBON #include %loadplugin{build::Wx::XSP::Overload}; %name{Wx::RibbonControl} class wxRibbonControl : public %name{Wx::Control} wxControl { public: %name{newDefault} wxRibbonControl() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxRibbonControl(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxControlNameStr) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxControlNameStr); virtual void SetArtProvider(wxRibbonArtProvider* art); wxRibbonArtProvider* GetArtProvider() const; virtual bool IsSizingContinuous() const; wxSize GetNextSmallerSize(wxOrientation direction) const; wxSize GetNextSmallerSize(wxOrientation direction, wxSize relative_to) const; wxSize GetNextLargerSize(wxOrientation direction) const; wxSize GetNextLargerSize(wxOrientation direction, wxSize relative_to) const; virtual bool Realize(); bool Realise(); #if WXPERL_W_VERSION_GE( 2, 9, 4 ) virtual wxRibbonBar* GetAncestorRibbonBar()const; // Finds the best width and height given the parent's width and height virtual wxSize GetBestSizeForParentSize(const wxSize& parentSize) const; #endif }; #endif Wx-0.9923/ext/ribbon/XS/RibbonGallery.xsp000664000000000000 1121312306612264 16375 0ustar00Mark000000000000############################################################################# ## Name: ext/ribbon/XS/RibbonGallery.xsp ## Purpose: XS++ for Wx::RibbonGallery ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_RIBBON #include #include %loadplugin{build::Wx::XSP::Overload}; %loadplugin{build::Wx::XSP::Event}; %Event{%EVT_RIBBONGALLERY_HOVER_CHANGED(id, func)%} {wxEVT_COMMAND_RIBBONGALLERY_HOVER_CHANGED}; %Event{%EVT_RIBBONGALLERY_SELECTED(id, func)%} {wxEVT_COMMAND_RIBBONGALLERY_SELECTED}; %Event{%EVT_RIBBONGALLERY_CLICKED(id, func)%} {wxEVT_COMMAND_RIBBONGALLERY_CLICKED}; %name{Wx::RibbonGallery} class wxRibbonGallery : public %name{Wx::RibbonControl} wxRibbonControl { public: %name{newDefault} wxRibbonGallery() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxRibbonGallery(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); void Clear(); bool IsEmpty() const; unsigned int GetCount() const; wxRibbonGalleryItem* GetItem(unsigned int n); %name{AppendBasic} wxRibbonGalleryItem* Append(const wxBitmap& bitmap, int id) %Overload %code{% int useid = ( id == wxID_ANY ) ? wxWindow::NewControlId() : id; RETVAL = THIS->Append( *bitmap, useid ); %}; %name{AppendClientData} wxRibbonGalleryItem* Append(const wxBitmap& bitmap, int id, Wx_UserDataCD *clientData) %Overload %code{% int useid = ( id == wxID_ANY ) ? wxWindow::NewControlId() : id; RETVAL = THIS->Append( *bitmap, useid, clientData ); %}; %name{SetItemClientData} void SetItemClientObject( wxRibbonGalleryItem* item, Wx_UserDataCD* data ); Wx_UserDataCD* GetItemClientData( const wxRibbonGalleryItem* item ) const %code{% RETVAL = (Wx_UserDataCD*)THIS->GetItemClientObject( item ); %}; void SetSelection(wxRibbonGalleryItem* item); wxRibbonGalleryItem* GetSelection() const; wxRibbonGalleryItem* GetHoveredItem() const; wxRibbonGalleryItem* GetActiveItem() const; wxRibbonGalleryButtonState GetUpButtonState() const; wxRibbonGalleryButtonState GetDownButtonState() const; wxRibbonGalleryButtonState GetExtensionButtonState() const; bool IsHovered() const; virtual bool ScrollLines(int lines); bool ScrollPixels(int pixels); void EnsureVisible(const wxRibbonGalleryItem* item); virtual bool IsSizingContinuous() const; virtual bool Realize(); virtual bool Layout(); }; %name{Wx::RibbonGalleryEvent} class wxRibbonGalleryEvent : public %name{Wx::CommandEvent} wxCommandEvent { public: wxRibbonGalleryEvent(wxEventType command_type = wxEVT_NULL, int win_id = 0, wxRibbonGallery* gallery = NULL, wxRibbonGalleryItem* item = NULL); wxRibbonGallery* GetGallery(); wxRibbonGalleryItem* GetGalleryItem(); void SetGallery(wxRibbonGallery* gallery); void SetGalleryItem(wxRibbonGalleryItem* item); wxEvent *Clone(); }; %name{Wx::RibbonGalleryItem} class wxRibbonGalleryItem { %{ static void wxRibbonGalleryItem::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: ~wxRibbonGalleryItem() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::RibbonGalleryItem", THIS, ST(0) ); %}; void SetId(int id); void SetBitmap(const wxBitmap& bitmap); const wxBitmap& GetBitmap() const; void SetIsVisible(bool visible); void SetPosition(int x, int y, const wxSize& size); bool IsVisible() const; const wxRect& GetPosition() const; %name{SetClientData} void SetClientObject( Wx_UserDataCD* data ); Wx_UserDataCD* GetClientData() const %code{% RETVAL = (Wx_UserDataCD*)THIS->GetClientObject(); %}; }; #endif Wx-0.9923/ext/ribbon/XS/RibbonPage.xsp000664000000000000 400612306612264 15634 0ustar00Mark000000000000############################################################################# ## Name: ext/ribbon/XS/RibbonPage.xsp ## Purpose: XS++ for Wx::RibbonPage ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_RIBBON #include %loadplugin{build::Wx::XSP::Overload}; %name{Wx::RibbonPage} class wxRibbonPage : public %name{Wx::RibbonControl} wxRibbonControl { public: %name{newDefault} wxRibbonPage() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxRibbonPage(wxRibbonBar* parent, wxWindowID id = wxID_ANY, const wxString& label = wxEmptyString, const wxBitmap& icon = wxNullBitmapPtr, long style = 0) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxRibbonBar* parent, wxWindowID id = wxID_ANY, const wxString& label = wxEmptyString, const wxBitmap& icon = wxNullBitmapPtr, long style = 0); void SetArtProvider(wxRibbonArtProvider* art); wxBitmap& GetIcon(); void SetSizeWithScrollButtonAdjustment(int x, int y, int width, int height); void AdjustRectToIncludeScrollButtons(wxRect* rect) const; bool DismissExpandedPanel(); virtual bool Realize(); virtual bool ScrollLines(int lines); bool ScrollPixels(int pixels); wxOrientation GetMajorAxis() const; virtual wxSize GetMinSize() const; virtual bool Show(bool show = true); virtual bool Layout(); virtual bool ScrollLines(int lines); virtual void RemoveChild(wxWindowBase *child); }; #endif Wx-0.9923/ext/ribbon/XS/RibbonPanel.xsp000664000000000000 514612306612264 16025 0ustar00Mark000000000000############################################################################# ## Name: ext/ribbon/XS/RibbonPanel.xsp ## Purpose: XS++ for Wx::RibbonPanel ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_RIBBON #include %loadplugin{build::Wx::XSP::Overload}; %name{Wx::RibbonPanel} class wxRibbonPanel : public %name{Wx::RibbonControl} wxRibbonControl { public: %name{newDefault} wxRibbonPanel() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxRibbonPanel(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& label = wxEmptyString, const wxBitmap& minimised_icon = wxNullBitmapPtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxRIBBON_PANEL_DEFAULT_STYLE) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& label = wxEmptyString, const wxBitmap& icon = wxNullBitmapPtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxRIBBON_PANEL_DEFAULT_STYLE); wxBitmap& GetMinimisedIcon(); %name{IsMinimisedDefault} bool IsMinimised() const %Overload; %name{IsMinimisedSize} bool IsMinimised(wxSize at_size) const %Overload; bool IsHovered() const; bool CanAutoMinimise() const; bool ShowExpanded(); bool HideExpanded(); void SetArtProvider(wxRibbonArtProvider* art); bool Realize(); wxRibbonPanel* GetExpandedDummy(); wxRibbonPanel* GetExpandedPanel(); virtual bool Layout(); virtual wxSize GetMinSize() const; virtual bool IsSizingContinuous() const; virtual void AddChild(wxWindowBase *child); virtual void RemoveChild(wxWindowBase *child); #if WXPERL_W_VERSION_GE( 2, 9, 4 ) bool IsExtButtonHovered() const; virtual bool HasExtButton() const; virtual wxSize GetBestSizeForParentSize(const wxSize& parentSize) const; long GetFlags(); #endif }; #endif Wx-0.9923/ext/ribbon/XS/RibbonToolBar.xsp000664000000000000 2374212306612264 16352 0ustar00Mark000000000000############################################################################# ## Name: ext/ribbon/XS/RibbonToolBar.xsp ## Purpose: XS++ for Wx::RibbonToolBar ## Author: Mark Dootson ## Modified by: ## Created: 04/03/2012 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 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}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_RIBBON #include #include %loadplugin{build::Wx::XSP::Overload}; %loadplugin{build::Wx::XSP::Event}; %Event{%EVT_RIBBONTOOLBAR_CLICKED(id, func)%} {wxEVT_COMMAND_RIBBONTOOL_CLICKED}; %Event{%EVT_RIBBONTOOLBAR_DROPDOWN_CLICKED(id, func)%} {wxEVT_COMMAND_RIBBONTOOL_DROPDOWN_CLICKED}; %name{Wx::RibbonToolBarToolBase} class wxRibbonToolBarToolBase { public: /* standard style method names */ wxString GetHelpString() %code{% RETVAL = THIS->help_string; %}; wxBitmap* GetBitmap() %code{% RETVAL = new wxBitmap(THIS->bitmap); %}; wxBitmap* GetBitmapDisabled() %code{% RETVAL = new wxBitmap(THIS->bitmap_disabled); %}; wxRect* GetDropDown() %code{% RETVAL = new wxRect(THIS->dropdown); %}; wxPoint* GetPosition() %code{% RETVAL = new wxPoint(THIS->position); %}; wxSize* GetSize() %code{% RETVAL = new wxSize(THIS->size); %}; Wx_UserDataO* GetClientData() %code{% RETVAL = (Wx_UserDataO*)(THIS->client_data); %}; int GetId() %code{% RETVAL = THIS->id; %}; wxRibbonButtonKind GetKind() %code{% RETVAL = THIS->kind; %}; long GetState() %code{% RETVAL = THIS->state; %}; /* wxperl method */ void SetClientData ( Wx_UserDataO* clientdata ) %code{% delete THIS->client_data; THIS->client_data = clientdata; %}; /* documented ??? names */ wxString help_string() %code{% RETVAL = THIS->help_string; %}; wxBitmap* bitmap() %code{% RETVAL = new wxBitmap(THIS->bitmap); %}; wxBitmap* bitmap_disabled() %code{% RETVAL = new wxBitmap(THIS->bitmap_disabled); %}; wxRect* dropdown() %code{% RETVAL = new wxRect(THIS->dropdown); %}; wxPoint* position() %code{% RETVAL = new wxPoint(THIS->position); %}; wxSize* size() %code{% RETVAL = new wxSize(THIS->size); %}; Wx_UserDataO* client_data() %code{% RETVAL = (Wx_UserDataO*)(THIS->client_data); %}; int id() %code{% RETVAL = THIS->id; %}; wxRibbonButtonKind kind() %code{% RETVAL = THIS->kind; %}; long state() %code{% RETVAL = THIS->state; %}; }; %name{Wx::RibbonToolBar} class wxRibbonToolBar : public %name{Wx::RibbonControl} wxRibbonControl { public: %name{newDefault} wxRibbonToolBar() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxRibbonToolBar(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0); /* for add methods assign a toolid and return it so that it may be used for event functions etc. */ %name{AddToolSimple} wxRibbonToolBarToolBase* AddTool( int tool_id, const wxBitmap& bitmap, const wxString& help_string, unsigned int kind = wxRIBBON_BUTTON_NORMAL) %Overload %code{% int useid = ( tool_id == wxID_ANY ) ? wxWindow::NewControlId() : tool_id; RETVAL = THIS->AddTool(useid, *bitmap, help_string, (wxRibbonButtonKind)kind ); %}; %name{AddToolClientData} wxRibbonToolBarToolBase* AddTool( int tool_id, const wxBitmap& bitmap, const wxBitmap& bitmap_disabled = wxNullBitmapPtr, const wxString& help_string = wxEmptyString, unsigned int kind = wxRIBBON_BUTTON_NORMAL, Wx_UserDataO* client_data = NULL) %Overload %code{% int useid = ( tool_id == wxID_ANY ) ? wxWindow::NewControlId() : tool_id; RETVAL = THIS->AddTool(useid, *bitmap, *bitmap_disabled, help_string, (wxRibbonButtonKind)kind, client_data); %}; wxRibbonToolBarToolBase* AddDropdownTool( int tool_id, const wxBitmap& bitmap, const wxString& help_string = wxEmptyString) %code{% int useid = ( tool_id == wxID_ANY ) ? wxWindow::NewControlId() : tool_id; RETVAL = THIS->AddDropdownTool( useid, *bitmap, help_string ); %}; wxRibbonToolBarToolBase* AddHybridTool( int tool_id, const wxBitmap& bitmap, const wxString& help_string = wxEmptyString) %code{% int useid = ( tool_id == wxID_ANY ) ? wxWindow::NewControlId() : tool_id; RETVAL = THIS->AddHybridTool( useid, *bitmap, help_string ); %}; wxRibbonToolBarToolBase* AddSeparator(); virtual void SetRows(int nMin, int nMax = -1); virtual bool Realize(); virtual bool IsSizingContinuous() const; #if WXPERL_W_VERSION_GE( 2, 9, 4 ) wxRibbonToolBarToolBase* AddToggleTool( int tool_id, const wxBitmap& bitmap, const wxString& help_string = wxEmptyString) %code{% int useid = ( tool_id == wxID_ANY ) ? wxWindow::NewControlId() : tool_id; RETVAL = THIS->AddToggleTool( useid, *bitmap, help_string ); %}; %name{InsertToolSimple} wxRibbonToolBarToolBase* InsertTool( size_t pos, int tool_id, const wxBitmap& bitmap, const wxString& help_string, unsigned int kind = wxRIBBON_BUTTON_NORMAL) %Overload %code{% int useid = ( tool_id == wxID_ANY ) ? wxWindow::NewControlId() : tool_id; RETVAL = THIS->InsertTool(pos, useid, *bitmap, help_string,(wxRibbonButtonKind)kind ); %}; %name{InsertToolClientData} wxRibbonToolBarToolBase* InsertTool( size_t pos, int tool_id, const wxBitmap& bitmap, const wxBitmap& bitmap_disabled = wxNullBitmapPtr, const wxString& help_string = wxEmptyString, unsigned int kind = wxRIBBON_BUTTON_NORMAL, Wx_UserDataO* client_data = NULL) %Overload %code{% int useid = ( tool_id == wxID_ANY ) ? wxWindow::NewControlId() : tool_id; RETVAL = THIS->InsertTool(pos, useid, *bitmap, *bitmap_disabled, help_string, (wxRibbonButtonKind)kind, client_data ); %}; wxRibbonToolBarToolBase* InsertDropdownTool( size_t pos, int tool_id, const wxBitmap& bitmap, const wxString& help_string = wxEmptyString) %code{% int useid = ( tool_id == wxID_ANY ) ? wxWindow::NewControlId() : tool_id; RETVAL = THIS->InsertDropdownTool( pos, useid, *bitmap, help_string ); %}; wxRibbonToolBarToolBase* InsertHybridTool( size_t pos, int tool_id, const wxBitmap& bitmap, const wxString& help_string = wxEmptyString) %code{% int useid = ( tool_id == wxID_ANY ) ? wxWindow::NewControlId() : tool_id; RETVAL = THIS->InsertHybridTool( pos, useid, *bitmap, help_string ); %}; wxRibbonToolBarToolBase* InsertToggleTool( size_t pos, int tool_id, const wxBitmap& bitmap, const wxString& help_string = wxEmptyString) %code{% int useid = ( tool_id == wxID_ANY ) ? wxWindow::NewControlId() : tool_id; RETVAL = THIS->InsertToggleTool( pos, useid, *bitmap, help_string ); %}; virtual wxRibbonToolBarToolBase* InsertSeparator(size_t pos); virtual void ClearTools(); virtual bool DeleteTool(int tool_id); virtual bool DeleteToolByPos(size_t pos); virtual wxRibbonToolBarToolBase* FindById(int tool_id)const; virtual wxRibbonToolBarToolBase* GetToolByPos(size_t pos)const; virtual size_t GetToolCount() const; virtual int GetToolId(const wxRibbonToolBarToolBase* tool)const; virtual Wx_UserDataO* GetToolClientData(int tool_id)const %code{% RETVAL = (Wx_UserDataO*)THIS->GetToolClientData( tool_id ); %}; virtual bool GetToolEnabled(int tool_id)const; virtual wxString GetToolHelpString(int tool_id)const; virtual wxRibbonButtonKind GetToolKind(int tool_id)const; virtual int GetToolPos(int tool_id)const; virtual bool GetToolState(int tool_id)const; virtual void SetToolClientData(int tool_id, Wx_UserDataO* clientdata) %code{% delete THIS->GetToolClientData( tool_id ); THIS->SetToolClientData( tool_id, clientdata ); %}; virtual void SetToolDisabledBitmap(int tool_id, const wxBitmap &bitmap); virtual void SetToolHelpString(int tool_id, const wxString& helpString); virtual void SetToolNormalBitmap(int tool_id, const wxBitmap &bitmap); virtual void EnableTool(int tool_id, bool enable = true); virtual void ToggleTool(int tool_id, bool checked); // Finds the best width and height given the parent's width and height virtual wxSize GetBestSizeForParentSize(const wxSize& parentSize) const; #endif }; %name{Wx::RibbonToolBarEvent} class wxRibbonToolBarEvent : public %name{Wx::CommandEvent} wxCommandEvent { public: wxRibbonToolBarEvent(wxEventType command_type = wxEVT_NULL, int win_id = 0, wxRibbonToolBar* bar = NULL); wxEvent *Clone() const; wxRibbonToolBar* GetBar(); void SetBar(wxRibbonToolBar* bar); bool PopupMenu(wxMenu* menu); }; #endif Wx-0.9923/ext/richtext/000775000000000000 012316265011 13030 5ustar00Mark000000000000Wx-0.9923/ext/richtext/lib/000775000000000000 012316265010 13575 5ustar00Mark000000000000Wx-0.9923/ext/richtext/lib/Wx/000775000000000000 012316265010 14173 5ustar00Mark000000000000Wx-0.9923/ext/richtext/lib/Wx/RichText.pm000664000000000000 530112306612241 16343 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/lib/Wx/RichText.pm ## Purpose: Wx::RichTextCtrl and related classes ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2006 ## RCS-ID: $Id: RichText.pm 3325 2012-08-16 03:41:14Z mdootson $ ## Copyright: (c) 2006-2007, 2010-2011 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::RichText; use strict; use Wx::Print; our $VERSION = '0.01'; Wx::load_dll( 'adv' ); Wx::load_dll( 'html' ); Wx::load_dll( 'xml' ); Wx::load_dll( 'richtext' ); Wx::wx_boot( 'Wx::RichText', $VERSION ); SetEvents(); # # properly setup inheritance tree # no strict; package Wx::Printout; package Wx::RichTextCtrl; @ISA = ( Wx::wxVERSION() <= 2.009001 ? qw(Wx::TextCtrl) : qw(Wx::Control) ); package Wx::TextAttrEx; @ISA = qw(Wx::TextAttr); package Wx::RichTextEvent; @ISA = qw(Wx::NotifyEvent); package Wx::RichTextStyleDefinition; package Wx::RichTextCharacterStyleDefinition; @ISA = qw(Wx::RichTextStyleDefinition); package Wx::RichTextParagraphStyleDefinition; @ISA = qw(Wx::RichTextStyleDefinition); package Wx::RichTextListStyleDefinition; @ISA = qw(Wx::RichTextParagraphStyleDefinition); package Wx::RichTextStyleListCtrl; @ISA = qw(Wx::Control); package Wx::HtmlListBox; @ISA = qw(Wx::VListBox); package Wx::RichTextStyleListBox; @ISA = qw(Wx::HtmlListBox); package Wx::RichTextStyleComboCtrl; @ISA = qw(Wx::ComboCtrl); package Wx::RichTextFormattingDialog; @ISA = qw(Wx::PropertySheetDialog); package Wx::RichTextXMLHandler; @ISA = qw(Wx::RichTextFileHandler); package Wx::RichTextHTMLHandler; @ISA = qw(Wx::RichTextFileHandler); package Wx::RichTextObject; package Wx::RichTextCompositeObject; @ISA = qw(Wx::RichTextObject); package Wx::RichTextBox; @ISA = ( Wx::wxVERSION() <= 2.009001 ? qw(Wx::RichTextCompositeObject) : qw(Wx::RichTextParagraphLayoutBox) ); package Wx::RichTextParagraphLayoutBox; @ISA = ( Wx::wxVERSION() <= 2.009001 ? qw(Wx::RichTextBox) : qw(Wx::RichTextCompositeObject) ); package Wx::RichTextBuffer; @ISA = qw(Wx::RichTextParagraphLayoutBox); package Wx::RichTextPrinting; @ISA = qw(Wx::Object); package Wx::RichTextHeaderFooterData; @ISA = qw(Wx::Object); package Wx::SymbolPickerDialog; @ISA = qw(Wx::Dialog); package Wx::RichTextStyleOrganiserDialog; @ISA = qw(Wx::Dialog); # # constants # package Wx; # !parser: sub { $_[0] =~ m/^\s*sub\s+(wx\w+)/ } # !package: Wx # !tag: richtextctrl sub wxRichTextLineBreakChar() { chr(29) } 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/richtext/Makefile.PL000664000000000000 155612306612241 15071 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/Makefile.PL ## Purpose: Makefile.PL for wxRichTextCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2006 ## RCS-ID: $Id: Makefile.PL 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2006, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use Config; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::RichText', VERSION_FROM => 'lib/Wx/RichText.pm', REQUIRE_WX => 2.007000, WX_CORE_LIB => 'richtext html adv core base', ); Wx-0.9923/ext/richtext/RichText.xs000664000000000000 1005312306612241 15235 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/richtext/RichText.xs // Purpose: XS for Wx::RichTextCtrl // Author: Mattia Barbon // Modified by: // Created: 05/11/2006 // RCS-ID: $Id: RichText.xs 3281 2012-05-06 07:25:12Z mdootson $ // Copyright: (c) 2006-2010 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/constants.h" #include "cpp/overload.h" #define wxNullColourPtr (wxColour*)&wxNullColour #define wxNullFontPtr (wxFont*)&wxNullFont #undef THIS #include // event macros #define SEVT( NAME, ARGS ) wxPli_StdEvent( NAME, ARGS ) #define EVT( NAME, ARGS, ID ) wxPli_Event( NAME, ARGS, ID ) // !package: Wx::Event // !tag: // !parser: sub { $_[0] =~ m<^\s*S?EVT\(\s*(\w+)\s*\,> } static wxPliEventDescription evts[] = { #if WXPERL_W_VERSION_LE( 2, 7, 2 ) EVT( EVT_RICHTEXT_ITEM_SELECTED, 3, wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED ) EVT( EVT_RICHTEXT_ITEM_DESELECTED, 3, wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED ) #endif EVT( EVT_RICHTEXT_LEFT_CLICK, 3, wxEVT_COMMAND_RICHTEXT_LEFT_CLICK ) EVT( EVT_RICHTEXT_RIGHT_CLICK, 3, wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK ) EVT( EVT_RICHTEXT_MIDDLE_CLICK, 3, wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK ) EVT( EVT_RICHTEXT_LEFT_DCLICK, 3, wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK ) EVT( EVT_RICHTEXT_RETURN, 3, wxEVT_COMMAND_RICHTEXT_RETURN ) #if WXPERL_W_VERSION_GE( 2, 7, 2 ) EVT( EVT_RICHTEXT_STYLESHEET_CHANGING, 3, wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGING ) EVT( EVT_RICHTEXT_STYLESHEET_CHANGED, 3, wxEVT_COMMAND_RICHTEXT_STYLESHEET_CHANGED ) EVT( EVT_RICHTEXT_STYLESHEET_REPLACING, 3, wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACING ) EVT( EVT_RICHTEXT_STYLESHEET_REPLACED, 3, wxEVT_COMMAND_RICHTEXT_STYLESHEET_REPLACED ) #endif #if WXPERL_W_VERSION_GE( 2, 8, 11 ) EVT( EVT_RICHTEXT_CHARACTER, 3, wxEVT_COMMAND_RICHTEXT_CHARACTER ) EVT( EVT_RICHTEXT_DELETE, 3, wxEVT_COMMAND_RICHTEXT_DELETE ) EVT( EVT_RICHTEXT_STYLE_CHANGED, 3, wxEVT_COMMAND_RICHTEXT_STYLE_CHANGED ) EVT( EVT_RICHTEXT_CONTENT_INSERTED, 3, wxEVT_COMMAND_RICHTEXT_CONTENT_INSERTED ) EVT( EVT_RICHTEXT_CONTENT_DELETED, 3, wxEVT_COMMAND_RICHTEXT_CONTENT_DELETED ) #endif { 0, 0, 0 } }; #define wxPliRichTextStyleType wxRichTextStyleListBox::wxRichTextStyleType #if WXPERL_W_VERSION_LT( 2, 8, 0 ) #undef _ #define _( s ) wxT( s ) #endif MODULE=Wx__RichText BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RichTextCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RichTextAttr.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RichTextStyle.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RichTextStyleCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RichTextFormattingDialog.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RichTextFileHandler.xsp INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RichTextBuffer.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/SymbolPickerDialog.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RichTextStyleOrganiserDialog.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/RichTextPrinting.xsp MODULE=Wx__RichText PACKAGE=Wx::RichText void SetEvents() CODE: wxPli_set_events( evts ); #include "cpp/ovl_const.cpp" # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__RichText Wx-0.9923/ext/richtext/t/000775000000000000 012316265011 13273 5ustar00Mark000000000000Wx-0.9923/ext/richtext/t/01_load.t000775000000000000 14012306612241 14735 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Test::More tests => 1; use Wx; use_ok( 'Wx::RichText' ); Wx-0.9923/ext/richtext/t/02_inheritance.t000775000000000000 30612306612241 16314 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::RichText; test_inheritance_end(); Wx-0.9923/ext/richtext/t/03_threads.t000775000000000000 372112306612241 15502 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use if Wx::wxMOTIF, 'Test::More' => skip_all => 'Hangs under Motif'; use Test::More tests => 4; use Wx::RichText; my $app = Wx::App->new( sub { 1 } ); my $frame = Wx::Frame->new( undef, -1, 'a' ); my $rtc = Wx::RichTextCtrl->new( $frame ); my $rtb = $rtc->GetBuffer; my $rtr = Wx::RichTextRange->new; my $rtr2 = Wx::RichTextRange->new; my $tae = Wx::TextAttrEx->new; my $tae2 = Wx::TextAttrEx->new; my $rta = Wx::RichTextAttr->new; my $rta2 = Wx::RichTextAttr->new; my $rtsd = Wx::RichTextParagraphStyleDefinition->new; my $rtsd2 = Wx::RichTextParagraphStyleDefinition->new; my $rtss = Wx::RichTextStyleSheet->new; my $rtss2 = Wx::RichTextStyleSheet->new; my $rtp = Wx::RichTextPrinting->new; my $rtp2 = Wx::RichTextPrinting->new; my $rtpo = Wx::RichTextPrintout->new; my $rtpo2 = Wx::RichTextPrintout->new; my $rthfd = Wx::RichTextHeaderFooterData->new; my $rthfd2 = Wx::RichTextHeaderFooterData->new; my $rtb1 = Wx::RichTextBuffer->new($rtb); my $rtb2 = Wx::RichTextBuffer->new($rtb); my $rtb3 = Wx::RichTextBuffer->new($rtb); my $rtb4 = Wx::RichTextBuffer->new($rtb); my $rtb5 = Wx::RichTextBuffer->new($rtb); my $rtb6 = Wx::RichTextBuffer->new($rtb); my $rtp3 = Wx::RichTextPrinting->new; my $rtp4 = Wx::RichTextPrinting->new; my $rtpo3 = Wx::RichTextPrintout->new; my $rtpo4 = Wx::RichTextPrintout->new; $rtp3->SetRichTextBufferPreview($rtb1); $rtp4->SetRichTextBufferPreview($rtb2); $rtpo3->SetRichTextBuffer($rtb3); $rtpo4->SetRichTextBuffer($rtb4); undef $rtr2; undef $tae2; undef $rta2; undef $rtsd2; undef $rtss2; undef $rtp2; undef $rtpo2; undef $rthfd2; undef $rtp4; undef $rtpo4; undef $rtb6; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/richtext/t/08_ovl_func.t000775000000000000 713612306612241 15674 0ustar00Mark000000000000#!/usr/bin/perl -w # test that overload dispatch works for # specific functions use strict; use Wx; use Wx::RichText; use lib '../../t'; use Test::More 'tests' => 26; use Tests_Helper qw(test_app :overload); use Fatal qw(open); my $nolog = Wx::LogNull->new; test_app( sub { my $frame = Wx::Frame->new( undef, -1, 'a' ); my $rtc = Wx::RichTextCtrl->new( $frame ); my $rtb = $rtc->GetBuffer; my $ran = Wx::RichTextRange->new( 0, 1 ); my $ta = Wx::TextAttr->new; my $tae = Wx::TextAttrEx->new; my $rta = Wx::RichTextAttr->new; # Wx::RichTextBuffer test_override { $rtb->SetBasicStyle( $tae ) } 'Wx::RichTextBuffer::SetBasicStyleEx'; test_override { $rtb->SetBasicStyle( $rta ) } 'Wx::RichTextBuffer::SetBasicStyleRich'; if( Wx::wxVERSION() >= 2.007002 ) { test_override { $rtb->SetStyle( $ran, $rta ) } 'Wx::RichTextBuffer::SetStyleRich'; test_override { $rtb->SetStyle( $ran, $tae ) } 'Wx::RichTextBuffer::SetStyleEx'; } else { ok( 1, 'skipped' ); ok( 1, 'skipped' ); } # Wx::RichTextCtrl test_override { $rtc->SetBasicStyle( $tae ) } 'Wx::RichTextCtrl::SetBasicStyleEx'; test_override { $rtc->SetBasicStyle( $rta ) } 'Wx::RichTextCtrl::SetBasicStyleRich'; test_override { $rtc->SetStyle( $ran, $rta ) } 'Wx::RichTextCtrl::SetStyleRange'; test_override { $rtc->SetStyle( 0, 1, $tae ) } 'Wx::RichTextCtrl::SetStyleExFromTo'; test_override { $rtc->SetStyle( 0, 1, $ta ) } 'Wx::RichTextCtrl::SetStyleFromTo'; if( Wx::wxVERSION() >= 2.007002 ) { if( Wx::wxVERSION() < 2.009 ) { test_override { $rtc->SetStyleEx( 0, 1, $tae ) } 'Wx::RichTextCtrl::SetStyleExExFromTo'; ok( 1, 'balance test count' ); } else { test_override { $rtc->SetStyleEx( $ran, $rta ) } 'Wx::RichTextCtrl::SetStyleExExRange'; test_override { $rtc->SetStyleEx( $ran, $tae ) } 'Wx::RichTextCtrl::SetStyleExRange'; } } else { ok( 1, 'skipped' ); ok( 1, 'skipped' ); } test_override { $rtc->HasCharacterAttributes( $ran, $rta ) } 'Wx::RichTextCtrl::HasCARich'; test_override { $rtc->HasCharacterAttributes( $ran, $tae ) } 'Wx::RichTextCtrl::HasCAEx'; test_override { $rtc->HasParagraphAttributes( $ran, $rta ) } 'Wx::RichTextCtrl::HasPARich'; test_override { $rtc->HasParagraphAttributes( $ran, $tae ) } 'Wx::RichTextCtrl::HasPAEx'; # Wx::RichTextRange test_override { Wx::RichTextRange->new } 'Wx::RichTextRange::newDefault'; test_override { Wx::RichTextRange->new( 0, 1 ) } 'Wx::RichTextRange::newFromTo'; test_override { Wx::RichTextRange->new( $ran ) } 'Wx::RichTextRange::newCopy'; # Wx::TextAttrEx test_override { Wx::TextAttrEx->new } 'Wx::TextAttrEx::newDefault'; test_override { Wx::TextAttrEx->new( $tae ) } 'Wx::TextAttrEx::newCopy'; test_override { Wx::TextAttrEx->new( $ta ) } 'Wx::TextAttrEx::newAttr'; # Wx::RichTextAttr test_override { Wx::RichTextAttr->new } 'Wx::RichTextAttr::newDefault'; test_override { Wx::RichTextAttr->new( $rta ) } 'Wx::RichTextAttr::newCopy'; test_override { Wx::RichTextAttr->new( $tae ) } 'Wx::RichTextAttr::newAttrEx'; test_override { Wx::RichTextAttr->new( $ta ) } 'Wx::RichTextAttr::newAttr'; if( Wx::wxVERSION() <= 2.009001 ) { test_override { Wx::RichTextAttr->new( Wx::wxRED(), Wx::wxRED() ) } 'Wx::RichTextAttr::newFull'; } else { ok( 1, "skipped" ); } } ); Wx-0.9923/ext/richtext/typemap000664000000000000 346312306612241 14520 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2006 ## RCS-ID: $Id: typemap 3293 2012-05-16 20:02:24Z mdootson $ ## Copyright: (c) 2006-2007, 2009-2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxFontStyle T_ENUM wxFontWeight T_ENUM wxTextAttrAlignment T_ENUM wxPliRichTextStyleType T_ENUM wxRichTextStyleSheet * O_WXOBJECT_THR wxRichTextEvent * O_WXOBJECT wxRichTextCtrl * O_WXEVTHANDLER wxRichTextStyleListBox * O_WXEVTHANDLER wxRichTextStyleListCtrl * O_WXEVTHANDLER wxRichTextStyleComboCtrl * O_WXEVTHANDLER wxRichTextAttr * O_NON_WXOBJECT_THR wxTextAttrEx * O_NON_WXOBJECT_THR wxRichTextRange * O_NON_WXOBJECT_THR wxRichTextStyleDefinition * O_WXOBJECT_THR wxRichTextCharacterStyleDefinition * O_WXOBJECT_THR wxRichTextParagraphStyleDefinition * O_WXOBJECT_THR wxRichTextListStyleDefinition * O_WXOBJECT_THR wxRichTextFormattingDialog * O_WXOBJECT wxRichTextBuffer * O_WXOBJECT_THR wxRichTextFileHandler * O_WXOBJECT wxPlRichTextFileHandler * O_WXOBJECT wxRichTextXMLHandler * O_WXOBJECT wxRichTextHTMLHandler * O_WXOBJECT wxSymbolPickerDialog * O_WXOBJECT wxRichTextStyleOrganiserDialog * O_WXOBJECT wxPrintData * O_WXOBJECT wxPageSetupDialogData * O_WXOBJECT ## no RTTI info for wxRichTextPrinting wxRichTextPrinting * O_NON_WXOBJECT_THR wxRichTextPrintout * O_NON_WXOBJECT wxRichTextHeaderFooterData * O_WXOBJECT_THR wxRichTextOddEvenPage T_ENUM wxRichTextPageLocation T_ENUM Wx-0.9923/ext/richtext/typemap.xsp000664000000000000 742012306612241 15326 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/typemap.xsp ## Purpose: typemap file for xsubppp.pl ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2006 ## RCS-ID: $Id: typemap.xsp 2962 2010-08-23 19:33:35Z mbarbon $ ## Copyright: (c) 2006-2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %typemap{wxFontStyle}{simple}; %typemap{wxFontWeight}{simple}; %typemap{wxBitmapType}{simple}; %typemap{wxPliRichTextStyleType}{simple}; %typemap{wxRichTextOddEvenPage}{simple}; %typemap{wxRichTextPageLocation}{simple}; %typemap{const wxRichTextAttr&}{reference}; %typemap{wxRichTextAttr&}{reference}; %typemap{const wxRichTextRange&}{reference}; %typemap{const wxTextAttr&}{reference}; %typemap{const wxTextAttrEx&}{reference}; %typemap{wxRichTextAttr*}{simple}; %typemap{wxRichTextAttrDisown*}{parsed}{ %cpp_type{%wxRichTextAttr*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; %typemap{wxRichTextBuffer*}{simple}; %typemap{wxRichTextCtrl*}{simple}; %typemap{wxRichTextStyleListBox*}{simple}; %typemap{wxRichTextStyleListCtrl*}{simple}; %typemap{wxRichTextStyleComboCtrl*}{simple}; %typemap{wxRichTextEvent*}{simple}; %typemap{wxRichTextRange*}{simple}; %typemap{wxRichTextStyleSheet*}{simple}; %typemap{wxRichTextStyleSheetDisown*}{parsed}{ %cpp_type{%wxRichTextStyleSheet*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; %typemap{const wxRichTextStyleSheet&}{reference}; %typemap{wxTextAttrAlignment}{simple}; %typemap{wxTextAttrEx*}{simple}; %typemap{wxRichTextRange}{reference}; %typemap{const wxImage&}{reference}; %typemap{wxRichTextStyleDefinition*}{simple}; %typemap{wxRichTextStyleDefinition*}{simple}; %typemap{wxRichTextStyleDefinitionDisown*}{parsed}{ %cpp_type{%wxRichTextStyleDefinition*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; %precall_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; %typemap{const wxRichTextStyleDefinition&}{reference}; %typemap{wxRichTextCharacterStyleDefinition*}{simple}; %typemap{wxRichTextCharacterStyleDefinitionDisown*}{parsed}{ %cpp_type{%wxRichTextCharacterStyleDefinition*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; %precall_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; %typemap{wxRichTextParagraphStyleDefinition*}{simple}; %typemap{wxRichTextParagraphStyleDefinitionDisown*}{parsed}{ %cpp_type{%wxRichTextParagraphStyleDefinition*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; %precall_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; %typemap{const wxRichTextParagraphStyleDefinition&}{reference}; %typemap{wxRichTextListStyleDefinition*}{simple}; %typemap{wxRichTextListStyleDefinitionDisown*}{parsed}{ %cpp_type{%wxRichTextListStyleDefinition*%}; %cleanup_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; %precall_code{%wxPli_object_set_deleteable( aTHX_ $PerlVar, false )%}; }; %typemap{const wxRichTextListStyleDefinition&}{reference}; %typemap{wxRichTextFormattingDialog*}{simple}; %typemap{wxRichTextFileHandler*}{simple}; %typemap{wxPlRichTextFileHandler*}{simple}; %typemap{wxPrintData*}{simple}; %typemap{const wxPrintData&}{reference}; %typemap{const wxRichTextBuffer&}{reference}; %typemap{wxRichTextPrinting*}{simple}; %typemap{const wxPageSetupDialogData&}{reference}; %typemap{wxPageSetupDialogData*}{simple}; %typemap{wxRichTextHeaderFooterData*}{simple}; %typemap{const wxRichTextHeaderFooterData&}{reference}; %typemap{wxRect&}{reference}; Wx-0.9923/ext/richtext/XS/000775000000000000 012316265011 13362 5ustar00Mark000000000000Wx-0.9923/ext/richtext/XS/RichTextAttr.xsp000664000000000000 2441612306612241 16612 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/XS/RichTextAttr.xsp ## Purpose: XS++ for Wx::RichTextAttr and Wx::TextAttrEx ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2006 ## RCS-ID: $Id: RichTextAttr.xsp 3035 2011-03-13 21:57:38Z mbarbon $ ## Copyright: (c) 2006-2011 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include %module{Wx}; %name{Wx::RichTextRange} class wxRichTextRange { %name{newDefault} wxRichTextRange(); %name{newFromTo} wxRichTextRange( long start, long end ); %name{newCopy} wxRichTextRange( const wxRichTextRange& range ); %{ static void wxRichTextRange::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxRichTextRange() %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::RichTextRange", THIS, ST(0) ); delete THIS; %}; void SetRange( long start, long end ); void SetStart( long start ); long GetStart() const; void SetEnd( long end ); long GetEnd() const; bool IsOutside( const wxRichTextRange& range ) const; bool IsWithin( const wxRichTextRange& range ) const; bool Contains( long pos ) const; bool LimitTo( const wxRichTextRange& range ); long GetLength() const; }; ## DECLARE_OVERLOAD( wrtr, Wx::RichTextRange ) %{ void wxRichTextRange::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_REDISP( wxPliOvl_n_n, newFromTo ) MATCH_REDISP( wxPliOvl_wrtr, newCopy ) END_OVERLOAD( Wx::RichTextRange::new ) %} %name{Wx::TextAttrEx} class wxTextAttrEx { %name{newDefault} wxTextAttrEx(); %name{newCopy} wxTextAttrEx( const wxTextAttrEx& attr ); %name{newAttr} wxTextAttrEx( const wxTextAttr& attr ); %{ static void wxTextAttrEx::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxTextAttrEx() %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::TextAttrEx", THIS, ST(0) ); delete THIS; %}; void SetCharacterStyleName( const wxString& name ); void SetParagraphStyleName( const wxString& name ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void SetListStyleName( const wxString& name ); #endif void SetParagraphSpacingAfter( int spacing ); void SetParagraphSpacingBefore( int spacing ); void SetLineSpacing( int spacing ); void SetBulletStyle( int style ); void SetBulletNumber( int n ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void SetBulletText( const wxString& text ); void SetBulletName( const wxString& name ); void SetBulletFont( const wxString& bulletFont ); void SetURL( const wxString& url ); void SetPageBreak( bool pageBreak = true ); #endif const wxString& GetCharacterStyleName() const; const wxString& GetParagraphStyleName() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) const wxString& GetListStyleName() const; #endif int GetParagraphSpacingAfter() const; int GetParagraphSpacingBefore() const; int GetLineSpacing() const; int GetBulletStyle() const; int GetBulletNumber() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) const wxString& GetBulletText() const; const wxString& GetBulletName() const; const wxString& GetBulletFont() const; const wxString& GetURL() const; #endif #if WXPERL_W_VERSION_LT( 2, 8, 0 ) bool HasWeight() const; bool HasSize() const; bool HasItalic() const; bool HasUnderlined() const; bool HasFaceName() const; #endif bool HasParagraphSpacingAfter() const; bool HasParagraphSpacingBefore() const; bool HasLineSpacing() const; bool HasCharacterStyleName() const; bool HasParagraphStyleName() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool HasListStyleName() const; #endif bool HasBulletStyle() const; bool HasBulletNumber() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool HasBulletText() const; bool HasBulletName() const; bool HasURL() const; bool HasPageBreak() const; #endif bool IsCharacterStyle() const; bool IsParagraphStyle() const; bool IsDefault() const; #if WXPERL_W_VERSION_LT( 2, 9, 0 ) && WXPERL_W_VERSION_GE( 2, 8, 0 ) int GetOutlineLevel() const; bool HasOutlineLevel() const; void SetOutlineLevel( int level ); int GetTextEffects() const; bool HasTextEffects() const; void SetTextEffects( int effects ); int GetTextEffectFlags() const; bool HasTextEffect( int effect ) const; void SetTextEffectFlags( int effects ); #endif }; ## DECLARE_OVERLOAD( wtae, Wx::TextAttrEx ) ## DECLARE_OVERLOAD( wtat, Wx::TextAttr ) %{ void wxTextAttrEx::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_REDISP( wxPliOvl_wtae, newCopy ) MATCH_REDISP( wxPliOvl_wtat, newAttr ) END_OVERLOAD( Wx::TextAttrEx::new ) %} %name{Wx::RichTextAttr} class wxRichTextAttr { %name{newDefault} wxRichTextAttr(); %name{newCopy} wxRichTextAttr( const wxRichTextAttr& attr ); %name{newAttrEx} wxRichTextAttr( const wxTextAttrEx& attr ); %name{newAttr} wxRichTextAttr( const wxTextAttr& attr ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) && WXPERL_W_VERSION_LT( 2, 9, 2 ) %name{newFull} wxRichTextAttr ( const wxColour& colText, const wxColour& colBack = wxNullColourPtr, const wxFont& font = wxNullFontPtr, wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT ); #else #if WXPERL_W_VERSION_LT( 2, 9, 0 ) %name{newFull} wxRichTextAttr ( const wxColour& colText, const wxColour& colBack = wxNullColourPtr, wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT ); #endif #endif %{ static void wxRichTextAttr::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxRichTextAttr() %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::RichTextAttr", THIS, ST(0) ); delete THIS; %}; #if WXPERL_W_VERSION_LT( 2, 9, 0 ) wxFont CreateFont() const; #endif bool GetFontAttributes( const wxFont& font ); void SetTextColour( const wxColour& colText ); void SetBackgroundColour( const wxColour& colBack ); void SetAlignment( wxTextAttrAlignment alignment ); void SetTabs( const wxArrayInt& tabs ); void SetLeftIndent( int indent, int subIndent = 0 ); void SetRightIndent( int indent ); void SetFontSize( int pointSize ); void SetFontStyle( wxFontStyle fontStyle ); void SetFontWeight( wxFontWeight fontWeight ); void SetFontFaceName( const wxString& faceName ); void SetFontUnderlined( bool underlined ); void SetFlags( long flags ); void SetCharacterStyleName( const wxString& name ); void SetParagraphStyleName( const wxString& name ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void SetListStyleName( const wxString& name ); #endif void SetParagraphSpacingAfter( int spacing ); void SetParagraphSpacingBefore( int spacing ); void SetLineSpacing( int spacing ); void SetBulletStyle( int style ); void SetBulletNumber( int n ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void SetBulletText( const wxString& text ); void SetBulletFont( const wxString& bulletFont ); void SetBulletName( const wxString& name ); void SetURL( const wxString& url ); void SetPageBreak( bool pageBreak = true ); #endif const wxColour& GetTextColour() const; const wxColour& GetBackgroundColour() const; wxTextAttrAlignment GetAlignment() const; long GetLeftIndent() const; long GetLeftSubIndent() const; long GetRightIndent() const; long GetFlags() const; int GetFontSize() const; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxFontStyle GetFontStyle() const; wxFontWeight GetFontWeight() const; #else int GetFontStyle() const; int GetFontWeight() const; #endif bool GetFontUnderlined() const; const wxString& GetFontFaceName() const; const wxString& GetCharacterStyleName() const; const wxString& GetParagraphStyleName() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) const wxString& GetListStyleName() const; #endif int GetParagraphSpacingAfter() const; int GetParagraphSpacingBefore() const; int GetLineSpacing() const; int GetBulletStyle() const; int GetBulletNumber() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) const wxString& GetBulletText() const; const wxString& GetBulletFont() const; const wxString& GetBulletName() const; const wxString& GetURL() const; #endif bool HasTextColour() const; bool HasBackgroundColour() const; bool HasAlignment() const; bool HasTabs() const; bool HasLeftIndent() const; bool HasRightIndent() const; #if WXPERL_W_VERSION_LT( 2, 8, 0 ) bool HasWeight() const; bool HasSize() const; bool HasItalic() const; bool HasUnderlined() const; bool HasFaceName() const; #endif bool HasFont() const; bool HasParagraphSpacingAfter() const; bool HasParagraphSpacingBefore() const; bool HasLineSpacing() const; bool HasCharacterStyleName() const; bool HasParagraphStyleName() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool HasListStyleName() const; #endif bool HasBulletStyle() const; bool HasBulletNumber() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool HasBulletText() const; bool HasBulletName() const; bool HasURL() const; bool HasPageBreak() const; #endif bool IsCharacterStyle() const; bool IsParagraphStyle() const; bool IsDefault() const; }; ## DECLARE_OVERLOAD( wrta, Wx::RichTextAttr ) %{ void wxRichTextAttr::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_REDISP( wxPliOvl_wrta, newCopy ) MATCH_REDISP( wxPliOvl_wtae, newAttrEx ) MATCH_REDISP( wxPliOvl_wtat, newAttr ) #if WXPERL_W_VERSION_LT( 2, 9, 2 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wcol_wcol_n, newFull, 2 ) #endif END_OVERLOAD( Wx::RichTextAttr::new ) void wxRichTextAttr::GetTabs() PPCODE: const wxArrayInt& tabs = THIS->GetTabs(); PUTBACK; wxPli_intarray_push( aTHX_ tabs ); SPAGAIN; %} Wx-0.9923/ext/richtext/XS/RichTextBuffer.xsp000664000000000000 2134612306612241 17110 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/XS/RichTextBuffer.xsp ## Purpose: XS++ for Wx::RichTextBuffer ## Author: Mattia Barbon ## Modified by: ## Created: 03/09/2007 ## RCS-ID: $Id: RichTextBuffer.xsp 3293 2012-05-16 20:02:24Z mdootson $ ## Copyright: (c) 2007, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include %module{Wx}; ## DECLARE_OVERLOAD( wrta, Wx::RichTextAttr ) ## DECLARE_OVERLOAD( wrtr, Wx::RichTextRange ) ## DECLARE_OVERLOAD( wtae, Wx::TextAttrEx ) %loadplugin{build::Wx::XSP::Overload}; %name{Wx::RichTextBuffer} class wxRichTextBuffer { %{ static void wxRichTextBuffer::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} // allow copy of wxRichTextBuffer wxRichTextBuffer(const wxRichTextBuffer& obj); %name{Destroy} virtual ~wxRichTextBuffer() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::RichTextBuffer", THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; %}; virtual void ResetAndClearCommands(); bool AddEventHandler( wxEvtHandler* handler ); void AddHandler( wxRichTextFileHandler* handler ); #if WXPERL_W_VERSION_GE( 2, 7, 1 ) %name{SetStyleEx} bool SetStyle ( const wxRichTextRange& range, const wxTextAttrEx& style, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO ); %name{SetStyleRich} bool SetStyle ( const wxRichTextRange& range, const wxRichTextAttr& style, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO ); %{ void wxRichTextBuffer::SetStyle( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wrtr_wrta_n, SetStyleRich, 2 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wrtr_wtae_n, SetStyleEx, 2 ) END_OVERLOAD( "Wx::RichTextBuffer::SetStyle" ) %} #endif bool InsertTextWithUndo( long pos, const wxString& text, wxRichTextCtrl* ctrl, int flags = 0 ); bool InsertNewlineWithUndo( long pos, wxRichTextCtrl* ctrl, int flags = 0 ); const wxTextAttrEx& GetBasicStyle() const; const wxTextAttrEx& GetDefaultStyle() const; bool BeginStyle( const wxTextAttrEx& style ); bool EndStyle(); bool EndAllStyles(); bool BeginBold(); bool EndBold(); bool BeginItalic(); bool EndItalic(); bool BeginUnderline(); bool EndUnderline(); bool BeginFontSize( int pointSize ); bool EndFontSize(); bool BeginFont( const wxFont& font ); bool EndFont(); bool BeginTextColour( const wxColour& colour ); bool EndTextColour(); bool BeginAlignment( wxTextAttrAlignment alignment ); bool EndAlignment(); bool BeginLeftIndent( int leftIndent, int leftSubIndent = 0 ); bool EndLeftIndent(); bool BeginRightIndent( int rightIndent ); bool EndRightIndent(); bool BeginParagraphSpacing( int before, int after ); bool EndParagraphSpacing(); bool BeginLineSpacing( int lineSpacing ); bool EndLineSpacing(); bool BeginNumberedBullet( int bulletNumber, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_DEFAULT_NUMBERED_BULLET ); bool EndNumberedBullet(); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool BeginSymbolBullet( const wxString& symbol, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_SYMBOL ); #else bool BeginSymbolBullet( wxChar symbol, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_SYMBOL ); #endif bool EndSymbolBullet(); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool BeginStandardBullet( const wxString& bulletName, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_STANDARD ); bool EndStandardBullet(); #endif bool BeginCharacterStyle( const wxString& characterStyle ); bool EndCharacterStyle(); bool BeginParagraphStyle( const wxString& paragraphStyle ); bool EndParagraphStyle(); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool BeginListStyle( const wxString& listStyle, int level = 1, int number = 1 ); bool EndListStyle(); bool BeginURL( const wxString& url, const wxString& characterStyle = wxEmptyString ); bool EndURL(); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool ClearListStyle( const wxRichTextRange& range, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO ); #endif wxRichTextRange AddParagraph( const wxString& text ); wxRichTextRange AddImage( const wxImage& image ); bool BeginBatchUndo( const wxString& cmdName ); bool EndBatchUndo(); bool BatchingUndo() const; bool BeginSuppressUndo(); bool EndSuppressUndo(); bool SuppressingUndo() const; void SetStyleSheet( wxRichTextStyleSheet* styleSheet ); wxRichTextStyleSheetDisown* GetStyleSheet() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool PushStyleSheet( wxRichTextStyleSheetDisown* styleSheet ); wxRichTextStyleSheetDisown* PopStyleSheet(); #endif %name{SetBasicStyleRich} void SetBasicStyle( const wxRichTextAttr& style ); %name{SetBasicStyleEx} void SetBasicStyle( const wxTextAttrEx& style ); %{ void wxRichTextBuffer::SetBasicStyle( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wrta, SetBasicStyleRich ) MATCH_REDISP( wxPliOvl_wtae, SetBasicStyleEx ) END_OVERLOAD( "Wx::RichTextBuffer::SetBasicStyle" ) %} }; %{ void wxRichTextBuffer::GetRichTextAttrStyle( position ) long position PPCODE: wxRichTextAttr attr; bool retval = THIS->GetStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxRichTextAttr( attr ), "Wx::RichTextAttr" ) : &PL_sv_undef ); #if WXPERL_W_VERSION_LT( 2, 9, 2 ) void wxRichTextBuffer::GetTextAttrExStyle( position ) long position PPCODE: wxTextAttrEx attr; bool retval = THIS->GetStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttrEx( attr ), "Wx::TextAttrEx" ) : &PL_sv_undef ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) void wxRichTextBuffer::GetRichTextAttrUncombinedStyle( position ) long position PPCODE: wxRichTextAttr attr; bool retval = THIS->GetUncombinedStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxRichTextAttr( attr ), "Wx::RichTextAttr" ) : &PL_sv_undef ); #if WXPERL_W_VERSION_LT( 2, 9, 2 ) void wxRichTextBuffer::GetTextAttrExUncombinedStyle( position ) long position PPCODE: wxTextAttrEx attr; bool retval = THIS->GetUncombinedStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttrEx( attr ), "Wx::TextAttrEx" ) : &PL_sv_undef ); #endif #endif #if WXPERL_W_VERSION_GE( 2, 8, 0 ) && WXPERL_W_VERSION_LT( 2, 9, 2 ) void wxRichTextBuffer::GetTextAttrExStyleForRange( range ) wxRichTextRange* range PPCODE: wxTextAttrEx attr; bool retval = THIS->GetStyleForRange( *range, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttrEx( attr ), "Wx::TextAttrEx" ) : &PL_sv_undef ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 2 ) void wxRichTextBuffer::GetRichTextAttrStyleForRange( range ) wxRichTextRange* range PPCODE: wxRichTextAttr attr; bool retval = THIS->GetStyleForRange( *range, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxRichTextAttr( attr ), "Wx::RichTextAttr" ) : &PL_sv_undef ); #endif %} Wx-0.9923/ext/richtext/XS/RichTextCtrl.xsp000664000000000000 6435112306612241 16606 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/XS/RichTextCtrl.xsp ## Purpose: XS++ for Wx::RichTextCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2006 ## RCS-ID: $Id: RichTextCtrl.xsp 3325 2012-08-16 03:41:14Z mdootson $ ## Copyright: (c) 2006-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 ############################################################################# #undef _ #define _(x) wxGetTranslation(wxT(x)) #include #include #include #include #include #include #include #include #include "xspp/richtextctrl.h" %module{Wx}; ## DECLARE_OVERLOAD( wrtr, Wx::RichTextRange ) ## DECLARE_OVERLOAD( wrta, Wx::RichTextAttr ) ## DECLARE_OVERLOAD( wtae, Wx::TextAttrEx ) ## DECLARE_OVERLOAD( wtat, Wx::TextAttr ) %file{xspp/richtextctrl.h}; %{ #define wxTEXT_ATTR_DEFAULT_NUMBERED_BULLET wxTEXT_ATTR_BULLET_STYLE_ARABIC|wxTEXT_ATTR_BULLET_STYLE_PERIOD #define wxRICHTEXT_STYLE_ALL wxRichTextStyleListBox::wxRICHTEXT_STYLE_ALL #define wxRICHTEXT_STYLE_CHARACTER wxRichTextStyleListBox::wxRICHTEXT_STYLE_CHARACTER #define wxRICHTEXT_STYLE_LIST wxRichTextStyleListBox::wxRICHTEXT_STYLE_LIST #define wxRICHTEXT_STYLE_PARAGRAPH wxRichTextStyleListBox::wxRICHTEXT_STYLE_PARAGRAPH double richtextctrl_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: richtextctrl #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'R': r( wxRE_READONLY ); r( wxRE_MULTILINE ); #if WXPERL_W_VERSION_GE( 2, 7, 1 ) r( wxRICHTEXT_SETSTYLE_NONE ); r( wxRICHTEXT_SETSTYLE_WITH_UNDO ); r( wxRICHTEXT_SETSTYLE_OPTIMIZE ); r( wxRICHTEXT_SETSTYLE_PARAGRAPHS_ONLY ); r( wxRICHTEXT_SETSTYLE_CHARACTERS_ONLY ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxRICHTEXT_SETSTYLE_RENUMBER ); r( wxRICHTEXT_SETSTYLE_SPECIFY_LEVEL ); #endif #if WXPERL_W_VERSION_GE( 2, 8, 7 ) r( wxRICHTEXT_SETSTYLE_REMOVE ); #endif r( wxRICHTEXT_INSERT_NONE ); r( wxRICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE ); #endif #if WXPERL_W_VERSION_GE( 2, 8, 0 ) r( wxRICHTEXT_SETSTYLE_RESET ); #endif r( wxRICHTEXT_FIXED_WIDTH ); r( wxRICHTEXT_FIXED_HEIGHT ); r( wxRICHTEXT_VARIABLE_WIDTH ); r( wxRICHTEXT_VARIABLE_HEIGHT ); r( wxRICHTEXT_LAYOUT_SPECIFIED_RECT ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxRICHTEXT_DRAW_IGNORE_CACHE ); #endif r( wxRICHTEXT_HITTEST_NONE ); r( wxRICHTEXT_HITTEST_BEFORE ); r( wxRICHTEXT_HITTEST_AFTER ); r( wxRICHTEXT_HITTEST_ON ); #if WXPERL_W_VERSION_GE( 2, 8, 7 ) r( wxRICHTEXT_HITTEST_OUTSIDE ); #endif r( wxRICHTEXT_HANDLER_INCLUDE_STYLESHEET ); r( wxRICHTEXT_HANDLER_SAVE_IMAGES_TO_MEMORY ); r( wxRICHTEXT_HANDLER_SAVE_IMAGES_TO_FILES ); r( wxRICHTEXT_HANDLER_SAVE_IMAGES_TO_BASE64 ); #if WXPERL_W_VERSION_GE( 2, 8, 0 ) r( wxRICHTEXT_HANDLER_NO_HEADER_FOOTER ); #endif #if WXPERL_W_VERSION_GE( 2, 8, 8 ) r( wxRICHTEXT_HANDLER_CONVERT_FACENAMES ); #endif r( wxRICHTEXT_FORMATTED ); r( wxRICHTEXT_UNFORMATTED ); r( wxRICHTEXT_TYPE_ANY ); r( wxRICHTEXT_TYPE_TEXT ); r( wxRICHTEXT_TYPE_XML ); r( wxRICHTEXT_TYPE_HTML ); r( wxRICHTEXT_TYPE_RTF ); r( wxRICHTEXT_TYPE_PDF ); r( wxRICHTEXT_FORMAT_STYLE_EDITOR ); r( wxRICHTEXT_FORMAT_FONT ); r( wxRICHTEXT_FORMAT_TABS ); r( wxRICHTEXT_FORMAT_BULLETS ); r( wxRICHTEXT_FORMAT_INDENTS_SPACING ); r( wxRICHTEXT_FORMAT_CHARACTER ); r( wxRICHTEXT_FORMAT_HELP_BUTTON ); r( wxRICHTEXT_FORMAT_LIST_STYLE ); r( wxRICHTEXT_FORMAT_PARAGRAPH ); r( wxRICHTEXT_FORMAT_STYLE ); r( wxRICHTEXT_ORGANISER_DELETE_STYLES ); r( wxRICHTEXT_ORGANISER_CREATE_STYLES ); r( wxRICHTEXT_ORGANISER_APPLY_STYLES ); r( wxRICHTEXT_ORGANISER_EDIT_STYLES ); r( wxRICHTEXT_ORGANISER_RENAME_STYLES ); r( wxRICHTEXT_ORGANISER_OK_CANCEL ); r( wxRICHTEXT_ORGANISER_RENUMBER ); r( wxRICHTEXT_ORGANISER_SHOW_CHARACTER ); r( wxRICHTEXT_ORGANISER_SHOW_PARAGRAPH ); r( wxRICHTEXT_ORGANISER_SHOW_LIST ); r( wxRICHTEXT_ORGANISER_SHOW_ALL ); r( wxRICHTEXT_ORGANISER_ORGANISE ); r( wxRICHTEXT_ORGANISER_BROWSE ); r( wxRICHTEXT_ORGANISER_BROWSE_NUMBERING ); r( wxRICHTEXT_PAGE_ALL ); r( wxRICHTEXT_PAGE_CENTRE ); r( wxRICHTEXT_PAGE_EVEN ); r( wxRICHTEXT_PAGE_LEFT ); r( wxRICHTEXT_PAGE_ODD ); r( wxRICHTEXT_PAGE_RIGHT ); r( wxRICHTEXT_STYLE_ALL ); r( wxRICHTEXT_STYLE_CHARACTER ); r( wxRICHTEXT_STYLE_LIST ); r( wxRICHTEXT_STYLE_PARAGRAPH ); break; case 'T': r( wxTEXT_ATTR_PARA_SPACING_AFTER ); r( wxTEXT_ATTR_PARA_SPACING_BEFORE ); r( wxTEXT_ATTR_LINE_SPACING ); r( wxTEXT_ATTR_CHARACTER_STYLE_NAME ); r( wxTEXT_ATTR_PARAGRAPH_STYLE_NAME ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxTEXT_ATTR_LIST_STYLE_NAME ); #endif r( wxTEXT_ATTR_BULLET_STYLE ); r( wxTEXT_ATTR_BULLET_NUMBER ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxTEXT_ATTR_BULLET_TEXT ); r( wxTEXT_ATTR_BULLET_NAME ); r( wxTEXT_ATTR_URL ); r( wxTEXT_ATTR_PAGE_BREAK ); #endif r( wxTEXT_ATTR_BULLET_STYLE_NONE ); r( wxTEXT_ATTR_BULLET_STYLE_ARABIC ); r( wxTEXT_ATTR_BULLET_STYLE_LETTERS_UPPER ); r( wxTEXT_ATTR_BULLET_STYLE_LETTERS_LOWER ); r( wxTEXT_ATTR_BULLET_STYLE_ROMAN_UPPER ); r( wxTEXT_ATTR_BULLET_STYLE_ROMAN_LOWER ); r( wxTEXT_ATTR_BULLET_STYLE_SYMBOL ); r( wxTEXT_ATTR_BULLET_STYLE_BITMAP ); r( wxTEXT_ATTR_BULLET_STYLE_PARENTHESES ); r( wxTEXT_ATTR_BULLET_STYLE_PERIOD ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxTEXT_ATTR_BULLET_STYLE_STANDARD ); r( wxTEXT_ATTR_BULLET_STYLE_RIGHT_PARENTHESIS ); r( wxTEXT_ATTR_BULLET_STYLE_OUTLINE ); r( wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT ); r( wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT ); r( wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE ); #endif r( wxTEXT_ATTR_LINE_SPACING_NORMAL ); r( wxTEXT_ATTR_LINE_SPACING_HALF ); r( wxTEXT_ATTR_LINE_SPACING_TWICE ); r( wxTEXT_ATTR_CHARACTER ); r( wxTEXT_ATTR_PARAGRAPH ); r( wxTEXT_ATTR_ALL ); #if WXPERL_W_VERSION_GE( 2, 8, 0 ) r( wxTEXT_ATTR_EFFECT_NONE ); r( wxTEXT_ATTR_EFFECT_CAPITALS ); r( wxTEXT_ATTR_EFFECT_SMALL_CAPITALS ); r( wxTEXT_ATTR_EFFECT_STRIKETHROUGH ); r( wxTEXT_ATTR_EFFECT_DOUBLE_STRIKETHROUGH ); r( wxTEXT_ATTR_EFFECT_SHADOW ); r( wxTEXT_ATTR_EFFECT_EMBOSS ); r( wxTEXT_ATTR_EFFECT_OUTLINE ); r( wxTEXT_ATTR_EFFECT_ENGRAVE ); r( wxTEXT_ATTR_EFFECT_SUPERSCRIPT ); r( wxTEXT_ATTR_EFFECT_SUBSCRIPT ); #endif #if WXPERL_W_VERSION_GE( 2, 8, 0 ) r( wxTEXT_ATTR_EFFECTS ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxTEXT_ATTR_FONT_ENCODING ); #endif #if WXPERL_W_VERSION_GE( 2, 8, 8 ) r( wxTEXT_ATTR_KEEP_FIRST_PARA_STYLE ); #endif #if WXPERL_W_VERSION_GE( 2, 8, 0 ) r( wxTEXT_ATTR_OUTLINE_LEVEL ); #endif break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants richtextctrl_module( &richtextctrl_constant ); %} %file{-}; %name{Wx::RichTextEvent} class wxRichTextEvent { #if WXPERL_W_VERSION_LE( 2, 7, 2 ) int GetIndex() const; void SetIndex( int n ); #endif int GetFlags() const; void SetFlags( int flags ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxRichTextStyleSheetDisown* GetOldStyleSheet() const; void SetOldStyleSheet( wxRichTextStyleSheetDisown* sheet ); wxRichTextStyleSheetDisown* GetNewStyleSheet() const; void SetNewStyleSheet( wxRichTextStyleSheetDisown* sheet ); #endif }; %name{Wx::RichTextCtrl} class wxRichTextCtrl { %name{newDefault} wxRichTextCtrl() %code{% RETVAL = new wxRichTextCtrl(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxRichTextCtrl( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& string = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxRE_MULTILINE ) %code{% RETVAL = new wxRichTextCtrl( parent, id, string, pos, size, style ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& string = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxRE_MULTILINE ); wxString GetFilename() const; void SetFilename( const wxString& filename ); void SetDelayedLayoutThreshold( long threshold ); long GetDelayedLayoutThreshold() const; %name{SetStyleFromTo} bool SetStyle( long start, long end, const wxTextAttr& style ); %name{SetStyleExFromTo} bool SetStyle( long start, long end, const wxTextAttrEx& style ); %name{SetStyleRange} bool SetStyle( const wxRichTextRange& range, const wxRichTextAttr& style ); #if WXPERL_W_VERSION_GE( 2, 7, 1 ) #if WXPERL_W_VERSION_LT( 2, 9, 0 ) %name{SetStyleExExFromTo} bool SetStyleEx ( long start, long end, const wxTextAttrEx& style, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO ); #endif %name{SetStyleExRange} bool SetStyleEx ( const wxRichTextRange& range, const wxTextAttrEx& style, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO ); %name{SetStyleExExRange} bool SetStyleEx ( const wxRichTextRange& range, const wxRichTextAttr& style, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO ); #endif const wxTextAttrEx& GetBasicStyle() const; const wxTextAttrEx& GetDefaultStyleEx() const; bool Newline(); #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool LineBreak(); #endif bool BeginStyle( const wxTextAttrEx& style ); bool EndStyle(); bool EndAllStyles(); bool BeginBold(); bool EndBold(); bool BeginItalic(); bool EndItalic(); bool BeginUnderline(); bool EndUnderline(); bool BeginFontSize( int pointSize ); bool EndFontSize(); bool BeginFont( const wxFont& font ); bool EndFont(); bool BeginTextColour( const wxColour& colour ); bool EndTextColour(); bool BeginAlignment( wxTextAttrAlignment alignment ); bool EndAlignment(); bool BeginLeftIndent( int leftIndent, int leftSubIndent = 0 ); bool EndLeftIndent(); bool BeginRightIndent( int rightIndent ); bool EndRightIndent(); bool BeginParagraphSpacing( int before, int after ); bool EndParagraphSpacing(); bool BeginLineSpacing( int lineSpacing ); bool EndLineSpacing(); bool BeginNumberedBullet( int bulletNumber, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_DEFAULT_NUMBERED_BULLET ); bool EndNumberedBullet(); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool BeginSymbolBullet( const wxString& symbol, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_SYMBOL ); #else bool BeginSymbolBullet( wxChar symbol, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_SYMBOL ); #endif bool EndSymbolBullet(); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool BeginStandardBullet( const wxString& bulletName, int leftIndent, int leftSubIndent, int bulletStyle = wxTEXT_ATTR_BULLET_STYLE_STANDARD ); bool EndStandardBullet(); #endif bool BeginCharacterStyle( const wxString& characterStyle ); bool EndCharacterStyle(); bool BeginParagraphStyle( const wxString& paragraphStyle ); bool EndParagraphStyle(); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool BeginListStyle( const wxString& listStyle, int level = 1, int number = 1 ); bool EndListStyle(); bool BeginURL( const wxString& url, const wxString& characterStyle = wxEmptyString ); bool EndURL(); #endif bool SetDefaultStyleToCursorStyle(); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool ClearListStyle( const wxRichTextRange& range, int flags = wxRICHTEXT_SETSTYLE_WITH_UNDO ); #endif void SelectNone(); #if WXPERL_W_VERSION_GE( 2, 7, 1 ) bool SelectWord( long position ); #endif wxRichTextRange GetSelectionRange() const; void SetSelectionRange( const wxRichTextRange& range ); #if WXPERL_W_VERSION_GE( 2, 7, 1 ) const wxRichTextRange& GetInternalSelectionRange() const; void SetInternalSelectionRange( const wxRichTextRange& range ); #endif #if WXPERL_W_VERSION_LE( 2, 9, 1 ) bool HasSelection() const; #endif wxRichTextRange AddParagraph( const wxString& text ); wxRichTextRange AddImage( const wxImage& image ); bool LayoutContent( bool onlyVisibleRect = false ); bool MoveCaret( long pos, bool showAtLineStart = false ); bool MoveRight( int noPositions = 1, int flags = 0 ); bool MoveLeft( int noPositions = 1, int flags = 0 ); bool MoveUp( int noLines = 1, int flags = 0 ); bool MoveDown( int noLines = 1, int flags = 0 ); bool MoveToLineEnd( int flags = 0 ); bool MoveToLineStart( int flags = 0 ); bool MoveToParagraphEnd( int flags = 0 ); bool MoveToParagraphStart( int flags = 0 ); bool MoveHome( int flags = 0 ); bool MoveEnd( int flags = 0 ); bool PageUp( int noPages = 1, int flags = 0 ); bool PageDown( int noPages = 1, int flags = 0 ); bool WordLeft( int noPages = 1, int flags = 0 ); bool WordRight( int noPages = 1, int flags = 0 ); bool BeginBatchUndo( const wxString& cmdName ); bool EndBatchUndo(); bool BatchingUndo() const; bool BeginSuppressUndo(); bool EndSuppressUndo(); bool SuppressingUndo() const; bool CanDeleteSelection() const; void DeleteSelection(); %name{HasCAEx} bool HasCharacterAttributes ( const wxRichTextRange& range, const wxTextAttrEx& style ) const; %name{HasCARich} bool HasCharacterAttributes ( const wxRichTextRange& range, const wxRichTextAttr& style) const; %name{HasPAEx} bool HasParagraphAttributes ( const wxRichTextRange& range, const wxTextAttrEx& style) const; %name{HasPARich} bool HasParagraphAttributes ( const wxRichTextRange& range, const wxRichTextAttr& style) const; bool IsSelectionBold(); bool IsSelectionItalics(); bool IsSelectionUnderlined(); bool IsSelectionAligned( wxTextAttrAlignment alignment ); bool ApplyBoldToSelection(); bool ApplyItalicToSelection(); bool ApplyUnderlineToSelection(); bool ApplyAlignmentToSelection(wxTextAttrAlignment alignment); #if WXPERL_W_VERSION_GE( 2, 7, 1 ) bool ApplyStyle( wxRichTextStyleDefinition* def ); void SetStyleSheet( wxRichTextStyleSheet* styleSheet ); wxRichTextStyleSheetDisown* GetStyleSheet() const; bool ApplyStyleSheet( wxRichTextStyleSheet* styleSheet = NULL ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool PushStyleSheet( wxRichTextStyleSheetDisown* styleSheet ); wxRichTextStyleSheetDisown* PopStyleSheet(); #endif void PositionCaret(); bool ExtendSelection( long oldPosition, long newPosition, int flags ); bool ScrollIntoView( long position, int keyCode ); void SetCaretPosition( long position, bool showAtLineStart = false ); long GetCaretPosition() const; #if WXPERL_W_VERSION_GE( 2, 7, 1 ) long GetAdjustedCaretPosition( long caretPos ) const; #endif void MoveCaretForward( long oldPosition ); void MoveCaretBack( long oldPosition ); ## bool GetCaretPositionForIndex( long position, wxRect& rect ); ## bool DeleteSelectedContent( long* newPos= NULL ); wxPoint GetPhysicalPoint( const wxPoint& ptLogical ) const; wxPoint GetLogicalPoint( const wxPoint& ptPhysical ) const; long FindNextWordPosition( int direction = 1 ) const; bool IsPositionVisible( long pos ) const; long GetFirstVisiblePosition() const; #if WXPERL_W_VERSION_GE( 2, 7, 1 ) long GetCaretPositionForDefaultStyle() const; void SetCaretPositionForDefaultStyle( long pos ); bool IsDefaultStyleShowing() const; void SetAndShowDefaultStyle( const wxRichTextAttr& attr ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxPoint GetFirstVisiblePoint() const; #endif %name{WriteImageFile} bool WriteImage( const wxString& filename, wxBitmapType bitmapType ); %name{WriteImageBitmap} bool WriteImage( const wxBitmap& bitmap, wxBitmapType bitmapType = wxBITMAP_TYPE_PNG ); %name{WriteImageImage} bool WriteImage( const wxImage& image, wxBitmapType bitmapType = wxBITMAP_TYPE_PNG ); %name{SetBasicStyleRich} void SetBasicStyle( const wxRichTextAttr& style ); %name{SetBasicStyleEx} void SetBasicStyle( const wxTextAttrEx& style ); %name{SetDefaultStyleEx} bool SetDefaultStyle(const wxTextAttrEx& style); %name{SetDefaultStyleDefault} bool SetDefaultStyle(const wxTextAttr& style); %{ void wxRichTextCtrl::SetBasicStyle( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wrta, SetBasicStyleRich ) MATCH_REDISP( wxPliOvl_wtae, SetBasicStyleEx ) END_OVERLOAD( "Wx::RichTextCtrl::SetBasicStyle" ) void wxRichTextCtrl::SetDefaultStyle( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wtae, SetDefaultStyleEx ) MATCH_REDISP( wxPliOvl_wtat, SetDefaultStyleDefault ) END_OVERLOAD( "Wx::RichTextCtrl::SetDefaultStyle" ) %} wxRichTextBuffer* GetBuffer() %code{% RETVAL = &THIS->GetBuffer(); %} %cleanup%{ wxPli_object_set_deleteable( aTHX_ ST(0), false ); %}; }; %{ void wxRichTextCtrl::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::RichTextCtrl::new" ) void wxRichTextCtrl::SetStyle( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wrtr_wrta, SetStyleRange ) MATCH_REDISP( wxPliOvl_n_n_wtae, SetStyleExFromTo ) MATCH_REDISP( wxPliOvl_n_n_wtat, SetStyleFromTo ) END_OVERLOAD( "Wx::RichTextCtrl::SetStyle" ) #if WXPERL_W_VERSION_GE( 2, 7, 1 ) void wxRichTextCtrl::SetStyleEx( ... ) PPCODE: BEGIN_OVERLOAD() #if WXPERL_W_VERSION_LT( 2, 9, 0 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_n_wtae, SetStyleExExFromTo, 2 ) #else MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wrtr_wrta_n, SetStyleExExRange, 2 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wrtr_wtae_n, SetStyleExRange, 2 ) #endif END_OVERLOAD( "Wx::RichTextCtrl::SetStyleEx" ) #endif void wxRichTextCtrl::HasCharacterAttributes( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wrtr_wrta, HasCARich ) MATCH_REDISP( wxPliOvl_wrtr_wtae, HasCAEx ) END_OVERLOAD( "Wx::RichTextCtrl::HasCharacterAttributes" ) void wxRichTextCtrl::HasParagraphAttributes( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wrtr_wrta, HasPARich ) MATCH_REDISP( wxPliOvl_wrtr_wtae, HasPAEx ) END_OVERLOAD( "Wx::RichTextCtrl::HasParagraphAttributes" ) void wxRichTextCtrl::DeleteSelectedContent() PPCODE: long newPos; bool retval = THIS->DeleteSelectedContent( &newPos ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( newSViv( retval ? newPos : -1 ) ); void wxRichTextCtrl::GetCaretPositionForIndex( position ) long position PPCODE: wxRect rect; bool retval = THIS->GetCaretPositionForIndex( position, rect ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxRect( rect ), "Wx::Rect" ) : &PL_sv_undef ); void wxRichTextCtrl::GetRichTextAttrStyle( position ) long position PPCODE: wxRichTextAttr attr; bool retval = THIS->GetStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxRichTextAttr( attr ), "Wx::RichTextAttr" ) : &PL_sv_undef ); void wxRichTextCtrl::GetTextAttrExStyle( position ) long position PPCODE: wxTextAttrEx attr; bool retval = THIS->GetStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttrEx( attr ), "Wx::TextAttrEx" ) : &PL_sv_undef ); void wxRichTextCtrl::GetTextAttrStyle( position ) long position PPCODE: wxTextAttr attr; bool retval = THIS->GetStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttr( attr ), "Wx::TextAttr" ) : &PL_sv_undef ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void wxRichTextCtrl::GetStyle( position ) long position PPCODE: wxTextAttr attr; bool retval = THIS->GetStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttr( attr ), "Wx::TextAttr" ) : &PL_sv_undef ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) void wxRichTextCtrl::GetRichTextAttrUncombinedStyle( position ) long position PPCODE: wxRichTextAttr attr; bool retval = THIS->GetUncombinedStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxRichTextAttr( attr ), "Wx::RichTextAttr" ) : &PL_sv_undef ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) && WXPERL_W_VERSION_LT( 2, 9, 2 ) void wxRichTextCtrl::GetTextAttrExUncombinedStyle( position ) long position PPCODE: wxTextAttrEx attr; bool retval = THIS->GetUncombinedStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttrEx( attr ), "Wx::TextAttrEx" ) : &PL_sv_undef ); void wxRichTextCtrl::GetTextAttrUncombinedStyle( position ) long position PPCODE: wxTextAttr attr; bool retval = THIS->GetUncombinedStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttr( attr ), "Wx::TextAttr" ) : &PL_sv_undef ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) && WXPERL_W_VERSION_LT( 2, 9, 2 ) void wxRichTextCtrl::GetUncombinedStyle( position ) long position PPCODE: wxTextAttr attr; bool retval = THIS->GetUncombinedStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttr( attr ), "Wx::TextAttr" ) : &PL_sv_undef ); #endif #if WXPERL_W_VERSION_GE( 2, 8, 0 ) void wxRichTextCtrl::GetRichTextAttrStyleForRange( range ) wxRichTextRange* range PPCODE: wxRichTextAttr attr; bool retval = THIS->GetStyleForRange( *range, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxRichTextAttr( attr ), "Wx::RichTextAttr" ) : &PL_sv_undef ); void wxRichTextCtrl::GetTextAttrExStyleForRange( range ) wxRichTextRange* range PPCODE: wxTextAttrEx attr; bool retval = THIS->GetStyleForRange( *range, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttrEx( attr ), "Wx::TextAttrEx" ) : &PL_sv_undef ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void wxRichTextCtrl::GetStyleForRange( range ) wxRichTextRange* range PPCODE: wxTextAttr attr; bool retval = THIS->GetStyleForRange( *range, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttrEx( attr ), "Wx::TextAttrEx" ) : &PL_sv_undef ); #endif void WriteImage( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wimg_n, WriteImageImage, 1 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wbmp_n, WriteImageBitmap, 1 ) MATCH_REDISP( wxPliOvl_s_n, WriteImageFile ) END_OVERLOAD( "Wx::RichTextCtrl::WriteImage" ) %} #if WXPERL_W_VERSION_GE( 2, 9, 2 ) #define WXPERL_IN_RICHTEXTCTRL INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp ../../XS/TextCtrlIface.xsp INCLUDE_COMMAND: $^X -pe "s/TextCtrlIface/RichTextCtrl/g" xspp/TextCtrlIface.h #undef WXPERL_IN_RICHTEXTCTRL #endif Wx-0.9923/ext/richtext/XS/RichTextFileHandler.xsp000664000000000000 1762512306612241 20061 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/XS/RichTextFileHandler.xsp ## Purpose: XS++ for Wx::RichTextFileHandler ## Author: Mattia Barbon ## Modified by: ## Created: 03/09/2007 ## RCS-ID: $Id: RichTextFileHandler.xsp 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2007, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include %module{Wx}; %file{xspp/filehandler.h}; %{ #include "cpp/v_cback.h" #include "cpp/streams.h" #define DEF_V_CBACK_BOOL__WXRICHTEXTBUFFER_WXINPUTSTREAM( CLASS, BASE, METHOD )\ bool CLASS::METHOD( wxRichTextBuffer* p1, wxInputStream& p2 ) \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV stream( aTHX_ sv_newmortal() ); \ wxPli_stream_2_sv( aTHX_ stream, &p2, "Wx::InputStream" ); \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, \ G_SCALAR, \ "Qs", p1, (SV*)stream ) ); \ return SvTRUE( ret ); \ } else \ return false; \ } #define DEF_V_CBACK_BOOL__WXRICHTEXTBUFFER_WXOUTPUTSTREAM( CLASS, BASE, METHOD )\ bool CLASS::METHOD( wxRichTextBuffer* p1, wxOutputStream& p2 ) \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV stream( aTHX_ sv_newmortal() ); \ wxPli_stream_2_sv( aTHX_ stream, &p2, "Wx::OutputStream" ); \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, \ G_SCALAR, \ "Qs", p1, (SV*)stream ) ); \ return SvTRUE( ret ); \ } else \ return false; \ } class wxPlRichTextFileHandler : public wxRichTextFileHandler { WXPLI_DECLARE_V_CBACK(); public: wxPlRichTextFileHandler( const char* package, const wxString& name = wxEmptyString, const wxString& ext = wxEmptyString, int type = 0 ) : wxRichTextFileHandler( name, ext, type ), m_callback( "Wx::RichTextFileHandler" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } bool base_CanHandle( const wxString& filename ) { return wxRichTextFileHandler::CanHandle( filename ); } bool base_CanLoad() { return wxRichTextFileHandler::CanLoad(); } bool base_CanSave() { return wxRichTextFileHandler::CanSave(); } DEC_V_CBACK_BOOL__WXSTRING( CanHandle ); DEC_V_CBACK_BOOL__VOID( CanLoad ); DEC_V_CBACK_BOOL__VOID( CanSave ); bool DoLoadFile( wxRichTextBuffer *buffer, wxInputStream& stream ); bool DoSaveFile( wxRichTextBuffer *buffer, wxOutputStream& stream ); }; DEF_V_CBACK_BOOL__WXSTRING( wxPlRichTextFileHandler, wxRichTextFileHandler, CanHandle ); DEF_V_CBACK_BOOL__VOID( wxPlRichTextFileHandler, wxRichTextFileHandler, CanLoad ); DEF_V_CBACK_BOOL__VOID( wxPlRichTextFileHandler, wxRichTextFileHandler, CanSave ); DEF_V_CBACK_BOOL__WXRICHTEXTBUFFER_WXINPUTSTREAM( wxPlRichTextFileHandler, wxRichTextFileHandler, DoLoadFile ); DEF_V_CBACK_BOOL__WXRICHTEXTBUFFER_WXOUTPUTSTREAM( wxPlRichTextFileHandler, wxRichTextFileHandler, DoSaveFile ); %} %file{-}; #include "xspp/filehandler.h" %name{Wx::RichTextFileHandler} class wxRichTextFileHandler { bool CanHandle( const wxString& filename ) const; bool CanLoad() const; bool CanSave() const; bool LoadFile( wxRichTextBuffer* buffer, SV* fh ) %code{% wxInputStream* stream = wxPliInputStream_ctor( fh ); RETVAL = THIS->LoadFile( buffer, *stream ); delete stream; %}; bool SaveFile( wxRichTextBuffer* buffer, SV* fh ) %code{% wxOutputStream* stream = wxPliOutputStream_ctor( fh ); RETVAL = THIS->SaveFile( buffer, *stream ); delete stream; %}; void SetName( const wxString& name ); wxString GetName() const; void SetExtension( const wxString& ext ); wxString GetExtension() const; void SetType( int type ); int GetType(); void SetEncoding( const wxString& encoding ); wxString GetEncoding() const; bool IsVisible() const; void SetVisible( bool visible ); }; %name{Wx::PlRichTextFileHandler} class wxPlRichTextFileHandler { wxPlRichTextFilehandler( const wxString& name = wxEmptyString, const wxString& ext = wxEmptyString, int type = 0 ) %code{% RETVAL = new wxPlRichTextFileHandler( CLASS, name, ext, type ); %}; %name{CanHandle} bool base_CanHandle( const wxString& filename ) const; %name{CanLoad} bool base_CanLoad() const; %name{CanSave} bool base_CanSave() const; }; #include %typemap{wxRichTextXMLHandler*}{simple}; %name{Wx::RichTextXMLHandler} class wxRichTextXMLHandler { wxRichTextXMLHandler( const wxString& name = wxT("XML"), const wxString& ext = wxT("xml"), int type = wxRICHTEXT_TYPE_XML ); }; #if WXPERL_W_VERSION_GE( 2, 8, 3 ) #include %typemap{wxRichTextHTMLHandler*}{simple}; %name{Wx::RichTextHTMLHandler} class wxRichTextHTMLHandler { wxRichTextHTMLHandler( const wxString& name = wxT("HTML"), const wxString& ext = wxT("html"), int type = wxRICHTEXT_TYPE_HTML ); void ClearTemporaryImageLocations(); %{ bool wxRichTextHTMLHandler::DeleteTemporaryImages( ... ) CASE: items == 2 INPUT: CODE: int flags = SvIV( ST(1) ); wxArrayString imageLocations; wxPli_av_2_arraystring( aTHX_ ST(2), &imageLocations ); RETVAL = THIS->DeleteTemporaryImages( flags, imageLocations ); OUTPUT: RETVAL CASE: CODE: RETVAL = THIS->DeleteTemporaryImages(); OUTPUT:RETVAL void wxRichTextHTMLHandler::GetFontSizeMapping() PPCODE: PUTBACK; wxPli_intarray_push( aTHX_ THIS->GetFontSizeMapping() ); SPAGAIN; void wxRichTextHTMLHandler::GetTemporaryImageLocations() PPCODE: PUTBACK; wxPli_stringarray_push( aTHX_ THIS->GetTemporaryImageLocations() ); SPAGAIN; %} const wxString& GetTempDir() const; void SetFileCounter( int counter ); void SetFontSizeMapping( const wxArrayInt& fontSizeMapping ); void SetTempDir( const wxString& tempDir ); void SetTemporaryImageLocations( const wxArrayString& locations ); }; #endif Wx-0.9923/ext/richtext/XS/RichTextFormattingDialog.xsp000664000000000000 633312306612241 21110 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/XS/RichTextFormattingDialog.xsp ## Purpose: XS++ for Wx::RichTextFormattingDialog ## Author: Mattia Barbon ## Modified by: ## Created: 25/11/2006 ## RCS-ID: $Id: RichTextFormattingDialog.xsp 2315 2008-01-18 21:47:17Z mbarbon $ ## Copyright: (c) 2006, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include %module{Wx}; #define wxRICHTEXT_FM_DEFAULT_APPLY_STYLE wxRICHTEXT_SETSTYLE_WITH_UNDO|wxRICHTEXT_SETSTYLE_OPTIMIZE %name{Wx::RichTextFormattingDialog} class wxRichTextFormattingDialog { %name{newDefault} wxRichTextFormatingDialog(); %name{newFull} wxRichTextFormattingDialog ( long flags, wxWindow* parent, const wxString& title = wxT("Formatting"), wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); %{ void wxRichTextFormattingDialog::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::RichTextFormattingDialog::new" ) %} bool Create( long flags, wxWindow* parent, const wxString& title = wxT("Formatting"), wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& sz = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); bool GetStyle( wxRichTextCtrl* ctrl, const wxRichTextRange& range ); bool SetStyle( const wxTextAttrEx& style, bool update = true ); bool SetStyleDefinition( const wxRichTextStyleDefinition& styleDef, wxRichTextStyleSheet* sheet, bool update = true ); wxRichTextStyleDefinitionDisown* GetStyleDefinition() const; wxRichTextStyleDefinitionDisown* GetDialogStyleDefinition( wxWindow* win ); wxRichTextStyleSheetDisown* GetStyleSheet() const; bool UpdateDisplay(); bool ApplyStyle( wxRichTextCtrl* ctrl, const wxRichTextRange& range, int flags = wxRICHTEXT_FM_DEFAULT_APPLY_STYLE ); const wxTextAttrEx& GetAttributes() const; void SetAttributes( const wxTextAttrEx& attr ); void SetImageList( wxImageList* imageList ); wxImageList* GetImageList() const; ## static void SetFormattingDialogFactory(wxRichTextFormattingDialogFactory* factory); ## static wxRichTextFormattingDialogFactory* GetFormattingDialogFactory(); ## static wxRichTextFormattingDialog* GetDialog( wxWindow* win ); ## static wxTextAttrEx* GetDialogAttributes( wxWindow* win ); ## static wxRichTextStyleDefinition* GetDialogStyleDefinition( wxWindow* win ); %{ bool ShowToolTips() CODE: RETVAL = wxRichTextFormattingDialog::ShowToolTips(); OUTPUT: RETVAL void SetShowToolTips( show ) bool show CODE: wxRichTextFormattingDialog::SetShowToolTips( show ); %} void AddPageId( int id ); };Wx-0.9923/ext/richtext/XS/RichTextPrinting.xsp000664000000000000 1674212306612241 17475 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/XS/RichTextPrinting.xsp ## Purpose: XS++ for Wx::RichTextPrinting ## Author: Mark Dootson ## Modified by: ## Created: 10/04/2010 ## RCS-ID: $Id: RichTextPrinting.xsp 3293 2012-05-16 20:02:24Z mdootson $ ## Copyright: (c) 2010 Mark Dootson ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if WXPERL_W_VERSION_GE( 2, 8, 0 ) #include %module{Wx}; %name{Wx::RichTextPrintout} class wxRichTextPrintout : public %name{Wx::Printout} wxPrintout { public: wxRichTextPrintout(const wxString& title = wxT("Printout")); %name{Destroy} ~wxRichTextPrintout() %code%{ delete THIS; %}; /// The buffer to print void SetRichTextBuffer(wxRichTextBuffer* buffer); wxRichTextBuffer* GetRichTextBuffer() const ; /// Set/get header/footer data void SetHeaderFooterData(const wxRichTextHeaderFooterData& data) ; const wxRichTextHeaderFooterData& GetHeaderFooterData() const ; /// Sets margins in 10ths of millimetre. Defaults to 1 inch for margins. void SetMargins(int top = 254, int bottom = 254, int left = 254, int right = 254); /// Calculate scaling and rectangles, setting the device context scaling void CalculateScaling(wxDC* dc, wxRect& textRect, wxRect& headerRect, wxRect& footerRect); // wxPrintout virtual functions virtual bool OnPrintPage(int page); virtual bool HasPage(int page); //virtual void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo); virtual bool OnBeginDocument(int startPage, int endPage); virtual void OnPreparePrinting(); }; %{ void wxRichTextPrintout::GetPageInfo() PREINIT: int minPage, maxPage, pageFrom, pageTo; PPCODE: THIS->wxRichTextPrintout::GetPageInfo( &minPage, &maxPage, &pageFrom, &pageTo ); EXTEND( SP, 4 ); PUSHs( sv_2mortal( newSViv( minPage ) ) ); PUSHs( sv_2mortal( newSViv( maxPage ) ) ); PUSHs( sv_2mortal( newSViv( pageFrom ) ) ); PUSHs( sv_2mortal( newSViv( pageTo ) ) ); %} %name{Wx::RichTextPrinting} class wxRichTextPrinting : public wxObject { wxRichTextPrinting( wxString name = wxT("Printing"), wxWindow *parentWindow = NULL ); ~wxRichTextPrinting() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::RichTextPrinting", THIS, ST(0) ); delete THIS; %}; %{ static void wxRichTextPrinting::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} bool PreviewFile(const wxString& richTextFile); bool PreviewBuffer(const wxRichTextBuffer& buffer); #if WXPERL_W_VERSION_GE( 2, 9, 4 ) bool PrintFile(const wxString& richTextFile, bool showPrintDialog = true ); bool PrintBuffer(const wxRichTextBuffer& buffer, bool showPrintDialog = true ); #else bool PrintFile(const wxString& richTextFile); bool PrintBuffer(const wxRichTextBuffer& buffer); #endif void PageSetup(); void SetHeaderFooterData(const wxRichTextHeaderFooterData& data); const wxRichTextHeaderFooterData& GetHeaderFooterData() const; void SetHeaderText(const wxString& text, wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_ALL, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE); wxString GetHeaderText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE) const; void SetFooterText(const wxString& text, wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_ALL, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE); wxString GetFooterText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE) const; void SetShowOnFirstPage(bool show); void SetHeaderFooterFont(const wxFont& font); void SetHeaderFooterTextColour(const wxColour& font); wxPrintData *GetPrintData(); void SetPrintData(const wxPrintData& printData); wxPageSetupDialogData *GetPageSetupData() const; void SetPageSetupData(const wxPageSetupDialogData& pageSetupData); void SetRichTextBufferPreview(wxRichTextBuffer* buffer) %code%{ THIS->SetRichTextBufferPreview(buffer); %} %cleanup%{ wxPli_object_set_deleteable( aTHX_ ST(0), false ); %}; wxRichTextBuffer* GetRichTextBufferPreview() const %code%{ RETVAL = THIS->GetRichTextBufferPreview(); %} %cleanup%{ wxPli_object_set_deleteable( aTHX_ ST(0), false ); %}; void SetRichTextBufferPrinting(wxRichTextBuffer* buffer) %code%{ THIS->SetRichTextBufferPrinting(buffer); %} %cleanup%{ wxPli_object_set_deleteable( aTHX_ ST(0), false ); %}; wxRichTextBuffer* GetRichTextBufferPrinting() const %code%{ RETVAL = THIS->GetRichTextBufferPrinting(); %} %cleanup%{ wxPli_object_set_deleteable( aTHX_ ST(0), false ); %}; void SetParentWindow(wxWindow* parent); wxWindow* GetParentWindow() const; void SetTitle(const wxString& title); const wxString& GetTitle() const; void SetPreviewRect(const wxRect& rect); const wxRect& GetPreviewRect() const; }; %name{Wx::RichTextHeaderFooterData} class wxRichTextHeaderFooterData : public wxObject { %name{newDefault} wxRichTextHeaderFooterData(); %name{newCopy} wxRichTextHeaderFooterData(const wxRichTextHeaderFooterData& data); ~wxRichTextPrinting() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::RichTextHeaderFooterData", THIS, ST(0) ); delete THIS; %}; %{ static void wxRichTextPrinting::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} // void Init(); // void Copy(const wxRichTextHeaderFooterData& data); void SetHeaderText(const wxString& text, wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_ALL, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE); wxString GetHeaderText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE) const; void SetFooterText(const wxString& text, wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_ALL, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE); wxString GetFooterText(wxRichTextOddEvenPage page = wxRICHTEXT_PAGE_EVEN, wxRichTextPageLocation location = wxRICHTEXT_PAGE_CENTRE) const; void SetText(const wxString& text, int headerFooter, wxRichTextOddEvenPage page, wxRichTextPageLocation location); wxString GetText(int headerFooter, wxRichTextOddEvenPage page, wxRichTextPageLocation location) const; void SetMargins(int headerMargin, int footerMargin); int GetHeaderMargin(); int GetFooterMargin(); void SetShowOnFirstPage(bool showOnFirstPage); bool GetShowOnFirstPage() const; void Clear(); void SetFont(const wxFont& font); const wxFont& GetFont() const; void SetTextColour(const wxColour& col); const wxColour& GetTextColour() const; }; ## DECLARE_OVERLOAD( wrth, Wx::RichTextHeaderFooterData ) %{ void wxRichTextHeaderFooterData::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_REDISP( wxPliOvl_wrth, newCopy ) END_OVERLOAD( Wx::RichTextHeaderFooterData::new ) %} #endif Wx-0.9923/ext/richtext/XS/RichTextStyle.xsp000664000000000000 1423412306612241 16775 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/XS/RichTextStyle.xsp ## Purpose: XS++ for Wx::RichText*Style* ## Author: Mattia Barbon ## Modified by: ## Created: 12/11/2006 ## RCS-ID: $Id: RichTextStyle.xsp 2568 2009-05-17 15:52:56Z mbarbon $ ## Copyright: (c) 2006, 2008-2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include %module{Wx}; %name{Wx::RichTextStyleDefinition} class wxRichTextStyleDefinition { %{ static void wxRichTextStyleDefinition::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxRichTextStyleDefinition() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; %}; #if WXPERL_W_VERSION_GE( 2, 7, 1 ) void Copy( const wxRichTextStyleDefinition& def ); bool Eq( const wxRichTextStyleDefinition& def ) const; #endif void SetName( const wxString& name ); const wxString& GetName() const; #if WXPERL_W_VERSION_GE( 2, 8, 0 ) void SetDescription( const wxString& descr ); const wxString& GetDescription() const; #endif void SetBaseStyle( const wxString& name ); const wxString& GetBaseStyle() const; void SetStyle( const wxRichTextAttr& style ); const wxRichTextAttr& GetStyle() const; #if WXPERL_W_VERSION_GE( 2, 8, 0 ) const wxTextAttr& GetStyleMergedWithBase( wxRichTextStyleSheet* sheet ) const; #endif }; %name{Wx::RichTextCharacterStyleDefinition} class wxRichTextCharacterStyleDefinition { wxRichTextCharacterStyleDefinition( const wxString& name = wxEmptyString ); }; %name{Wx::RichTextParagraphStyleDefinition} class wxRichTextParagraphStyleDefinition { wxRichTextParagraphStyleDefinition( const wxString& name = wxEmptyString ); #if WXPERL_W_VERSION_GE( 2, 7, 1 ) void Copy( const wxRichTextParagraphStyleDefinition& def ); #endif void SetNextStyle( const wxString& name ); const wxString& GetNextStyle() const; }; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) %name{Wx::RichTextListStyleDefinition} class wxRichTextListStyleDefinition { wxRichTextListStyleDefinition( const wxString& name = wxEmptyString ); void Copy( const wxRichTextListStyleDefinition& def ); void SetLevelAttributes( int i, const wxRichTextAttr& attr ); wxRichTextAttrDisown* GetLevelAttributes( int i ) const; void SetAttributes( int i, int leftIndent, int leftSubIndent, int bulletStyle, const wxString& bulletSymbol = wxEmptyString ); int FindLevelForIndent( int indent ) const; wxRichTextAttr& CombineWithParagraphStyle ( int indent, const wxRichTextAttr& paraStyle ); wxRichTextAttr& GetCombinedStyle( int indent ); wxRichTextAttr& GetCombinedStyleForLevel( int level ); int GetLevelCount() const; bool IsNumbered( int i ) const; }; #endif %name{Wx::RichTextStyleSheet} class wxRichTextStyleSheet { wxRichTextStyleSheet(); %{ static void wxRichTextStyleSheet::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxRichTextStyleSheet() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::RichTextStyleSheet", THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; %}; #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool AddStyle( wxRichTextStyleDefinitionDisown* def ); wxRichTextStyleDefinitionDisown* FindStyle( const wxString& name ) const; bool RemoveStyle( wxRichTextStyleDefinition* def, bool deleteStyle = false ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) void Copy( const wxRichTextStyleSheet& sheet ); #endif bool AddCharacterStyle( wxRichTextCharacterStyleDefinitionDisown* def ); bool AddParagraphStyle( wxRichTextParagraphStyleDefinitionDisown* def ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool AddListStyle( wxRichTextListStyleDefinitionDisown* def ); #endif bool RemoveCharacterStyle( wxRichTextStyleDefinition* def, bool deleteStyle = false ); bool RemoveParagraphStyle( wxRichTextStyleDefinition* def, bool deleteStyle = false ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool RemoveListStyle( wxRichTextStyleDefinition* def, bool deleteStyle = false ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxRichTextCharacterStyleDefinitionDisown* FindCharacterStyle ( const wxString& name, bool recurse = true ) const; wxRichTextParagraphStyleDefinitionDisown* FindParagraphStyle ( const wxString& name, bool recurse = true ) const; wxRichTextListStyleDefinitionDisown* FindListStyle( const wxString& name, bool recurse = true) const; #endif size_t GetCharacterStyleCount() const; size_t GetParagraphStyleCount() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) size_t GetListStyleCount() const; #endif wxRichTextCharacterStyleDefinitionDisown* GetCharacterStyle( size_t n ) const; wxRichTextParagraphStyleDefinitionDisown* GetParagraphStyle( size_t n ) const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxRichTextListStyleDefinitionDisown* GetListStyle( size_t n ) const; #endif void DeleteStyles(); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool InsertSheet( wxRichTextStyleSheet* before ); bool AppendSheet( wxRichTextStyleSheet* after ); void Unlink(); wxRichTextStyleSheetDisown* GetNextSheet() const; void SetNextSheet( wxRichTextStyleSheet* sheet ); wxRichTextStyleSheetDisown* GetPreviousSheet() const; void SetPreviousSheet( wxRichTextStyleSheet* sheet ); #endif #if WXPERL_W_VERSION_GE( 2, 8, 0 ) void SetName( const wxString& name ); const wxString& GetName() const; void SetDescription( const wxString& descr ); const wxString& GetDescription() const; #endif }; Wx-0.9923/ext/richtext/XS/RichTextStyleCtrl.xsp000664000000000000 1110512306612241 17614 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/XS/RichTextStyleCtrl.xsp ## Purpose: XS++ for Wx::RichText*Style* selection controls ## Author: Mattia Barbon ## Modified by: ## Created: 12/11/2006 ## RCS-ID: $Id: RichTextStyleCtrl.xsp 2315 2008-01-18 21:47:17Z mbarbon $ ## Copyright: (c) 2006-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include %module{Wx}; %name{Wx::RichTextStyleListBox} class wxRichTextStyleListBox { #if WXPERL_W_VERSION_GE( 2, 7, 1 ) %name{newDefault} wxRichTextStyleListBox(); #endif %name{newFull} wxRichTextStyleListBox ( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0 ); %{ void wxRichTextStyleListBox::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::RichTextStyleListBox::new" ) %} bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0 ); void SetStyleSheet( wxRichTextStyleSheet* styleSheet ); wxRichTextStyleSheetDisown* GetStyleSheet() const; void SetRichTextCtrl( wxRichTextCtrl* ctrl ); wxRichTextCtrl* GetRichTextCtrl() const; wxRichTextStyleDefinitionDisown* GetStyle( size_t i ) const; #if WXPERL_W_VERSION_GE( 2, 7, 1 ) int GetIndexForStyle( const wxString& name ) const; int SetStyleSelection( const wxString& name ); #endif void UpdateStyles(); #if WXPERL_W_VERSION_GE( 2, 7, 1 ) void ApplyStyle( int i ); void SetApplyOnSelection( bool applyOnSel ); bool GetApplyOnSelection() const; #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void SetStyleType( wxPliRichTextStyleType styleType ); wxPliRichTextStyleType GetStyleType() const; #endif int ConvertTenthsMMToPixels( wxDC& dc, int units ) const; wxString CreateHTML( wxRichTextStyleDefinition* def ) const; }; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) %name{Wx::RichTextStyleListCtrl} class wxRichTextStyleListCtrl { %name{newDefault} wxRichTextStyleListCtrl(); %name{newFull} wxRichTextStyleListCtrl ( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0 ); %{ void wxRichTextStyleListCtrl::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::RichTextStyleListCtrl::new" ) %} bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0 ); void SetStyleSheet( wxRichTextStyleSheet* styleSheet ); wxRichTextStyleSheetDisown* GetStyleSheet() const; void SetRichTextCtrl( wxRichTextCtrl* ctrl ); wxRichTextCtrl* GetRichTextCtrl() const; void UpdateStyles(); void SetStyleType( wxPliRichTextStyleType styleType ); wxPliRichTextStyleType GetStyleType() const; int StyleTypeToIndex( wxPliRichTextStyleType styleType ); wxPliRichTextStyleType StyleIndexToType( int i ); wxRichTextStyleListBox* GetStyleListBox() const; wxChoice* GetStyleChoice() const; }; #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) %name{Wx::RichTextStyleComboCtrl} class wxRichTextStyleComboCtrl { %name{newDefault} wxRichTextStyleComboCtrl(); %name{newFull} wxRichTextStyleComboCtrl ( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0 ); %{ void wxRichTextStyleComboCtrl::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::RichTextStyleComboCtrl::new" ) %} bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0 ); void UpdateStyles(); void SetStyleSheet( wxRichTextStyleSheet* styleSheet ); wxRichTextStyleSheetDisown* GetStyleSheet() const; void SetRichTextCtrl( wxRichTextCtrl* ctrl ); wxRichTextCtrl* GetRichTextCtrl() const; }; #endif Wx-0.9923/ext/richtext/XS/RichTextStyleOrganiserDialog.xsp000664000000000000 637712306612241 21760 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/XS/RichTextStyleOrganiserDialog.xsp ## Purpose: XS++ for Wx::RichTextStyleOrganiserDialog ## Author: Mattia Barbon ## Modified by: ## Created: 30/12/2007 ## RCS-ID: $Id: RichTextStyleOrganiserDialog.xsp 2310 2007-12-31 00:31:49Z mbarbon $ ## Copyright: (c) 2007 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}; #undef _ #define _(x) wxGetTranslation(wxT(x)) #include #include #include %typemap{wxRichTextStyleOrganiserDialog*}{simple}; %name{Wx::RichTextStyleOrganiserDialog} class wxRichTextStyleOrganiserDialog { %{ void wxRichTextStyleOrganiserDialog::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::RichTextStyleOrganiserDialog::new" ) %} %name{newDefault} wxRichTextStyleOrganiserDialog() %code{% RETVAL = new wxRichTextStyleOrganiserDialog(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxRichTextStyleOrganiserDialog ( int flags, wxRichTextStyleSheet* sheet, wxRichTextCtrl* ctrl, wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_SIZE, long style = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_STYLE ) %code{% RETVAL = new wxRichTextStyleOrganiserDialog ( flags, sheet, ctrl, parent, id, caption, pos, size, style ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( int flags, wxRichTextStyleSheet* sheet, wxRichTextCtrl* ctrl, wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_SIZE, long style = SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_STYLE ); void SetStyleSheet( wxRichTextStyleSheet* sheet ); wxRichTextStyleSheet* GetStyleSheet() const; void SetRichTextCtrl( wxRichTextCtrl* ctrl ); wxRichTextCtrl* GetRichTextCtrl() const; void SetFlags( int flags ); int GetFlags() const; bool GetRestartNumbering() const; void SetRestartNumbering( bool restartNumbering ); wxString GetSelectedStyle() const; wxRichTextStyleDefinition* GetSelectedStyleDefinition() const; bool ApplyStyle( wxRichTextCtrl* ctrl = NULL ); package_static bool ShowToolTips(); package_static void SetShowToolTips( bool show ); }; Wx-0.9923/ext/richtext/XS/SymbolPickerDialog.xsp000664000000000000 603512306612241 17725 0ustar00Mark000000000000############################################################################# ## Name: ext/richtext/XS/SymbolPickerDialog.xsp ## Purpose: XS++ for Wx::SymbolPickerDialog ## Author: Mattia Barbon ## Modified by: ## Created: 26/09/2007 ## RCS-ID: $Id: SymbolPickerDialog.xsp 2230 2007-09-26 18:36:09Z mbarbon $ ## Copyright: (c) 2007 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}; #undef _ #define _(x) wxGetTranslation(wxT(x)) #include %typemap{wxSymbolPickerDialog*}{simple}; %name{Wx::SymbolPickerDialog} class wxSymbolPickerDialog { %{ void wxSymbolPickerDialog::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::SymbolPickerDialog::new" ) %} %name{newDefault} wxSymbolPickerDialog() %code{% RETVAL = new wxSymbolPickerDialog(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxSymbolPickerDialog( const wxString& symbol, const wxString& fontName, const wxString& normalTextFont, wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = SYMBOL_WXSYMBOLPICKERDIALOG_TITLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = SYMBOL_WXSYMBOLPICKERDIALOG_STYLE ) %code{% RETVAL = new wxSymbolPickerDialog( symbol, fontName, normalTextFont, parent, id, caption, pos, size, style ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( const wxString& symbol, const wxString& fontName, const wxString& normalTextFont, wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& caption = SYMBOL_WXSYMBOLPICKERDIALOG_TITLE, const wxPoint& pos = SYMBOL_WXSYMBOLPICKERDIALOG_POSITION, const wxSize& size = SYMBOL_WXSYMBOLPICKERDIALOG_SIZE, long style = SYMBOL_WXSYMBOLPICKERDIALOG_STYLE ); void SetUnicodeMode( bool unicodeMode ); int GetSymbolChar() const; bool HasSelection() const; bool UseNormalFont() const; wxString GetFontName() const; void SetFontName( wxString value ); wxString GetSymbol() const; void SetSymbol( wxString value ); bool GetFromUnicode() const; void SetFromUnicode( bool value ); wxString GetNormalTextFontName() const; void SetNormalTextFontName( wxString value ); }; Wx-0.9923/ext/socket/000775000000000000 012316265011 12466 5ustar00Mark000000000000Wx-0.9923/ext/socket/cpp/000775000000000000 012316265011 13250 5ustar00Mark000000000000Wx-0.9923/ext/socket/cpp/sk_constants.cpp000664000000000000 414612306612240 16551 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/socket/cpp/sk_constants.cpp // Purpose: constants for Wx::Socket // Author: Graciliano M. P. // Created: 27/02/2003 // RCS-ID: $Id: sk_constants.cpp 2517 2008-11-30 20:14:22Z mbarbon $ // Copyright: (c) 2003, 2007 Graciliano M. P. // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/constants.h" double socket_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: socket #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'E': r( wxEVT_SOCKET ); case 'S': r( wxSOCKET_BLOCK ); r( wxSOCKET_NONE ); r( wxSOCKET_NOWAIT ); r( wxSOCKET_WAITALL ); r( wxSOCKET_REUSEADDR ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSOCKET_NOBIND ); r( wxSOCKET_BROADCAST ); #endif r( wxSOCKET_CONNECTION_FLAG ); r( wxSOCKET_INPUT_FLAG ); r( wxSOCKET_LOST_FLAG ); r( wxSOCKET_OUTPUT_FLAG ); /// wxSocketNotify r( wxSOCKET_INPUT ); r( wxSOCKET_OUTPUT ); r( wxSOCKET_CONNECTION ); r( wxSOCKET_LOST ); /// wxSocketType: r( wxSOCKET_UNINIT ); r( wxSOCKET_CLIENT ); r( wxSOCKET_SERVER ); r( wxSOCKET_BASE ); r( wxSOCKET_DATAGRAM ); /// wxSocketError r( wxSOCKET_NOERROR ); r( wxSOCKET_INVOP ); r( wxSOCKET_IOERR ); r( wxSOCKET_INVADDR ); r( wxSOCKET_INVSOCK ); r( wxSOCKET_NOHOST ); r( wxSOCKET_INVPORT ); r( wxSOCKET_WOULDBLOCK ); r( wxSOCKET_TIMEDOUT ); r( wxSOCKET_MEMERR ); break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants socket_module( &socket_constant ); Wx-0.9923/ext/socket/cpp/socket.h000664000000000000 1224612306612240 15015 0ustar00Mark000000000000/////////////////////////////////////////////////////////////////////////////// // Name: ext/socket/cpp/socket.h // Purpose: c++ wrapper for wxSocket* // Author: Graciliano M. P. // Modified by: // Created: 06/03/2003 // RCS-ID: $Id: socket.h 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2003-2004 Graciliano M. P. // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself /////////////////////////////////////////////////////////////////////////////// #include "wx/socket.h" #include "cpp/v_cback.h" #define DO_WRITE(CODE, sv, size) \ if ( size == 0 ) size = SvCUR(sv) ; \ char* buffer = SvPV_nolen(sv); \ CODE ; \ RETVAL = THIS->LastCount() ; #define DO_READ(CODE, sv, size, offset) \ /* Upgrade the SV to scalar if needed. If the scalar is undef */ \ /* can't use SvGROW. */ \ SvUPGRADE(sv , SVt_PV) ; \ /* Tell that the scalar is string only (not integer, float, utf8...): */ \ SvPOK_only(sv) ; \ /* Grow the scalar to receive the data and return a char* point: */ \ char* buffer = SvGROW( sv , offset + size + 2 ) ; \ /* To read at the offset the user specified */ \ if ( offset > 0 ) buffer += offset ; \ \ CODE ; \ int nread = THIS->LastCount() ; \ \ /* Null-terminate the buffer, not necessary, but does not hurt: */ \ buffer[nread] = 0 ; \ /* Tell Perl how long the string is: */ \ SvCUR_set( sv , offset + nread ) ; \ /* Undef on read error: */ \ if( THIS->Error() ) XSRETURN_UNDEF ; \ /* Return the amount of data read, like Perl read(). */ \ RETVAL = nread ; class wxPlSocketBase:public wxSocketBase { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlSocketBase ); WXPLI_DECLARE_V_CBACK(); public: wxPlSocketBase( const char* package ) : m_callback( "Wx::SocketBase" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlSocketBase , wxSocketBase ); /////////////////////////////////////////////////////////////////////////////// class wxPliSocketClient:public wxSocketClient { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliSocketClient ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPliSocketClient, "Wx::SocketClient", true ); // this fixes the crashes, for some reason wxPliSocketClient( const char* package, long _arg1 ) : wxSocketClient( _arg1 ), m_callback( "Wx::SocketClient" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliSocketClient , wxSocketClient ); /////////////////////////////////////////////////////////////////////////////// class wxPlSocketServer:public wxSocketServer { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlSocketServer ); WXPLI_DECLARE_V_CBACK(); public: wxPlSocketServer( const char* package , wxIPV4address _arg1 , long _arg2 ) : wxSocketServer( _arg1 , _arg2 ), m_callback( "Wx::SocketServer" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } wxSocketBase* Accept(bool wait) { wxSocketBase* sock = new wxPlSocketBase( "Wx::SocketBase" ); sock->SetFlags(GetFlags()); if (!AcceptWith(*sock, wait)) { sock->Destroy(); sock = NULL; } return sock; } }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlSocketServer , wxSocketServer ); /////////////////////////////////////////////////////////////////////////////// class wxPliDatagramSocket : public wxDatagramSocket { WXPLI_DECLARE_DYNAMIC_CLASS( wxPliDatagramSocket ); WXPLI_DECLARE_V_CBACK(); public: // WXPLI_DEFAULT_CONSTRUCTOR( wxPliDatagramSocket, // "Wx::DatagramSocket", true ); // this fixes the crashes, for some reason wxPliDatagramSocket( const char* package, wxSockAddress& _arg1, wxSocketFlags _arg2 ) : wxDatagramSocket( _arg1, _arg2 ), m_callback( "Wx::SocketClient" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } }; WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliDatagramSocket , wxDatagramSocket ); // local variables: // mode: c++ // end: Wx-0.9923/ext/socket/lib/000775000000000000 012316265011 13234 5ustar00Mark000000000000Wx-0.9923/ext/socket/lib/Wx/000775000000000000 012316265011 13632 5ustar00Mark000000000000Wx-0.9923/ext/socket/lib/Wx/Socket.pm000664000000000000 1413012306612240 15516 0ustar00Mark000000000000############################################################################# ## Name: ext/socket/lib/Wx/Socket.pm ## Purpose: Wx::Socket ## Author: Graciliano M. P. ## Modified by: ## Created: 27/02/2003 ## RCS-ID: $Id: Socket.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2003-2004 Graciliano M. P. ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::Socket ; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::load_dll( 'net' ); Wx::wx_boot( 'Wx::Socket', $VERSION ); no strict ; package Wx::DatagramSocket ; @ISA = qw(Wx::SocketBase) ; package Wx::SocketClient ; @ISA = qw(Wx::SocketBase) ; package Wx::SocketServer ; @ISA = qw(Wx::SocketBase) ; package Wx::SocketEvent ; @ISA = qw(Wx::Event) ; package Wx::IPaddress ; @ISA = qw(Wx::SockAddress); package Wx::IPV4address ; @ISA = qw(Wx::IPaddress); package Wx::IPV6address ; @ISA = qw(Wx::IPaddress); package Wx::UNIXaddress ; @ISA = qw(Wx::SockAddress); use strict ; ##################### # WX::SOCKET::EVENT # ##################### package Wx::Socket::Event ; use Wx qw(wxSOCKET_INPUT_FLAG wxSOCKET_OUTPUT_FLAG wxSOCKET_CONNECTION_FLAG wxSOCKET_LOST_FLAG wxSOCKET_INPUT wxSOCKET_OUTPUT wxSOCKET_CONNECTION wxSOCKET_LOST) ; my $EVTID ; sub EVT_SOCKET($$$) { $_[0]->Connect($_[1] , -1, &Wx::wxEVT_SOCKET , $_[2] ); } sub EVT_SOCKET_ALL($$$) { &MAKE_EVT('all',@_) ;} sub EVT_SOCKET_INPUT($$$) { &MAKE_EVT(wxSOCKET_INPUT,@_) ;} sub EVT_SOCKET_OUTPUT($$$) { &MAKE_EVT(wxSOCKET_OUTPUT,@_) ;} sub EVT_SOCKET_CONNECTION($$$) { &MAKE_EVT(wxSOCKET_CONNECTION,@_) ;} sub EVT_SOCKET_LOST($$$) { &MAKE_EVT(wxSOCKET_LOST,@_) ;} sub MAKE_EVT { my $type = shift ; my( $handler, $sock, $callback ) = @_; &ENABLE_SKEVT($sock , $handler , $callback) ; $sock->{_WXEVT}{SUB}{$type} = $callback ; if (!$sock->{_WXEVT}{CONNECT}) { $handler->Connect( $sock->{_WXEVT}{ID} , -1 , &Wx::wxEVT_SOCKET , sub{ &CHECK_EVT_TYPE($sock,@_) } ); $sock->{_WXEVT}{CONNECT} = 1 ; } } sub ENABLE_SKEVT { my ( $sock , $parent ) = @_ ; if ( $sock->{_WXEVT}{ENABLE} ) { return ;} $sock->{_WXEVT}{ID} = ++$EVTID ; $sock->SetEventHandler($parent, $sock->{_WXEVT}{ID}) ; $sock->SetNotify(wxSOCKET_INPUT_FLAG|wxSOCKET_OUTPUT_FLAG| wxSOCKET_CONNECTION_FLAG|wxSOCKET_LOST_FLAG) ; $sock->Notify(1) ; $sock->{_WXEVT}{ENABLE} = 1 ; } sub CHECK_EVT_TYPE { my ( $sock , $this , $evt ) = @_ ; #print "$sock\n" ; my $evt_type = $evt->GetSocketEvent ; my $sub = $sock->{_WXEVT}{SUB}{$evt_type} || $sock->{_WXEVT}{SUB}{all} ; if ($sub) { return &$sub($sock , $this , $evt) ;} return( undef ) ; } ####### # END # ####### 1; __END__ =head1 NAME Wx::Socket - wxSocket* classes =head1 USAGE use Wx qw(:socket) ; use Wx::Event qw(EVT_SOCKET_INPUT EVT_SOCKET_LOST) ; use Wx::Event qw(EVT_SOCKET_CONNECTION) ; ########## # CLIENT # ########## my $sock = Wx::SocketClient->new(wxSOCKET_WAITALL); EVT_SOCKET_INPUT($parent , $sock , \&onInput ) ; EVT_SOCKET_LOST($parent , $sock , \&onClose ) ; $sock->Connect('localhost',5050) ; if (! $sock->IsConnected ) { print "ERROR\n" ;} sub onInput { my ( $sock , $this , $evt ) = @_ ; my $length = 123; my $buffer ; $sock->Read($buffer , 1024 , $length ) ; } ########## # SERVER # ########## my $sock = Wx::SocketServer->new('localhost',5050,wxSOCKET_WAITALL); EVT_SOCKET_CONNECTION($parent , $sock , \&onConnect ) ; if ( !$sock->Ok ) { print "ERROR\n" ;} sub onConnect { my ( $sock , $this , $evt ) = @_ ; my $client = $sock->Accept(0) ; my ($local_host,$local_port) = $client->GetLocal ; my ($peer_host,$peer_port) = $client->GetPeer ; $client->Write("This is a data test!\n") ; ... or ... $client->Write( $data , length($data) ) ; $client->Close ; } =head1 METHODS All the methods work as in wxWidgets (see the documentation). The functions for reading data (Read, ReadMsg, Peek) take 3 arguments, like the Perl read() function: ## To read the data into the variable $sock->Read($buffer , 1024) ; ... or ... ## To append data at the given offset: $sock->Read($buffer , 1024 , $offset ) ; The write functions (Write, WriteMsg, Unread) can be used with 1 or 2 arguments: $client->Write("This is a data test!\n") ; $client->Write($data , $length) ; =head1 EVENTS The events are: EVT_SOCKET EVT_SOCKET_ALL EVT_SOCKET_INPUT EVT_SOCKET_OUTPUT EVT_SOCKET_CONNECTION EVT_SOCKET_LOST The EVT_SOCKET works as in wxWidgets, the others are wxPerl extensions. Note that EVT_SOCKET events of wxSocketClient and wxSocketServer work differently than other event types. First you need to set the event handler: $sock->SetEventHandler($handler, $id) ; Then you set what types of event you want to receive: ## this select all. $sock->SetNotify(wxSOCKET_INPUT_FLAG|wxSOCKET_OUTPUT_FLAG| wxSOCKET_CONNECTION_FLAG|wxSOCKET_LOST_FLAG) ; Enable the event notification: $sock->Notify(1) ; And only after this use: ## note that $handler must be the same that was used in ## SetEventHandler EVT_SOCKET($handler, $id , sub{...} ) To make the events easier to use, all the proccess is automatic, and you just use: EVT_SOCKET_INPUT($handler , $socket , sub{...} ) EVT_SOCKET_OUTPUT($handler , $socket , sub{...} ) EVT_SOCKET_CONNECTION($handler , $socket , sub{...} ) EVT_SOCKET_LOST($handler , $socket , sub{...} ) ## This is for the events not used yet by the above: EVT_SOCKET_ALL($parent , $socket , sub{...} ) ** The new way is better to handle more than one socket in the same time too. Take a look in the demos. =head1 SEE ALSO L, The wxWxwindows documentation at L =head1 AUTHOR Graciliano M. P. =head1 COPYRIGHT This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut Wx-0.9923/ext/socket/Makefile.PL000664000000000000 147612306612240 14527 0ustar00Mark000000000000############################################################################# ## Name: ext/socket/Makefile.PL ## Purpose: Makefile.PL for wxSocket ## Author: Graciliano M. P. ## Modified by: ## Created: 27/02/2003 ## RCS-ID: $Id: Makefile.PL 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2003 Graciliano M. P. ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::Socket', VERSION_FROM => 'lib/Wx/Socket.pm', WX_CORE_LIB => 'net base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/socket/Socket.xs000664000000000000 225712306612240 14357 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/socket/Socket.xs // Purpose: XS for Wx::Socket // Author: Graciliano M. P. // Modified by: // Created: 27/02/2003 // RCS-ID: $Id: Socket.xs 2757 2010-01-17 10:26:27Z mbarbon $ // Copyright: (c) 2003-2004, 2006, 2008-2010 Graciliano M. P. // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "wx/socket.h" #undef THIS #include "cpp/sk_constants.cpp" #include "cpp/socket.h" MODULE=Wx__Socket BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE: XS/SocketBase.xs INCLUDE: XS/SocketClient.xs INCLUDE: XS/SocketServer.xs INCLUDE: XS/SocketEvent.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/SockAddress.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/DatagramSocket.xsp # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__Socket Wx-0.9923/ext/socket/t/000775000000000000 012316265011 12731 5ustar00Mark000000000000Wx-0.9923/ext/socket/t/01_load.t000775000000000000 22312306612240 14374 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::Socket ; print "ok\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/socket/t/02_inheritance.t000775000000000000 36312306612240 15754 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::Socket; test_inheritance_end(); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/socket/t/03_threads.t000775000000000000 114512306612240 15135 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use if Wx::wxMOTIF, 'Test::More' => skip_all => 'Hangs under Motif'; use Test::More tests => 4; use Wx::Socket; my $app = Wx::App->new( sub { 1 } ); my $sk = Wx::IPV4address->new; my $sk2 = Wx::IPV4address->new; undef $sk2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/socket/typemap000664000000000000 170612306612240 14153 0ustar00Mark000000000000############################################################################# ## Name: ext/socket/typemap ## Purpose: typemap ## Author: Graciliano M. P. ## Modified by: ## Created: 27/02/2003 ## RCS-ID: $Id: typemap 2565 2009-05-17 13:34:37Z mbarbon $ ## Copyright: (c) 2003-2004, 2008-2009 Graciliano M. P. ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxSocketFlags T_ENUM wxSocketBase* O_WXOBJECT wxSocketClient* O_WXOBJECT wxSocketServer* O_WXOBJECT wxSocketEvent* O_WXOBJECT wxDatagramSocket * O_WXOBJECT wxSockAddress * O_WXOBJECT_THR wxIPaddress * O_WXOBJECT_THR wxIPV4address * O_WXOBJECT_THR wxIPV6address * O_WXOBJECT_THR wxUNIXaddress * O_WXOBJECT_THR Wx-0.9923/ext/socket/XS/000775000000000000 012316265011 13020 5ustar00Mark000000000000Wx-0.9923/ext/socket/XS/DatagramSocket.xsp000664000000000000 244312306612240 16527 0ustar00Mark000000000000############################################################################# ## Name: ext/socket/XS/DatagramSocket.xsp ## Purpose: XS++ for Wx::DatagramSocket ## Author: Mattia Barbon ## Created: 24/01/2004 ## RCS-ID: $Id: DatagramSocket.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2004 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}; %typemap{wxSockAddress&}{reference}; %typemap{wxDatagramSocket*}{simple}; %typemap{wxSocketFlags}{simple}; %name{Wx::DatagramSocket} class wxDatagramSocket { wxDatagramSocket(wxSockAddress& addr, wxSocketFlags flags = wxSOCKET_NONE) %code{% RETVAL = new wxPliDatagramSocket( CLASS , *addr, flags ); %}; }; %{ size_t wxDatagramSocket::RecvFrom( addr, buf, nBytes ) wxSockAddress* addr SV* buf wxUint32 nBytes CODE: DO_READ( THIS->RecvFrom( *addr, buffer, nBytes ), buf, nBytes, 0 ); OUTPUT: RETVAL size_t wxDatagramSocket::SendTo( addr, buf, nBytes ) wxSockAddress* addr SV* buf wxUint32 nBytes CODE: DO_WRITE( THIS->SendTo( *addr, buffer, nBytes ), buf, nBytes ); OUTPUT: RETVAL %} Wx-0.9923/ext/socket/XS/SockAddress.xsp000664000000000000 406312306612240 16043 0ustar00Mark000000000000############################################################################# ## Name: ext/socket/XS/SockAddress.xsp ## Purpose: XS++ for Wx::SockAddress and derived classes ## Author: Mattia Barbon ## Created: 24/01/2004 ## RCS-ID: $Id: SockAddress.xsp 2565 2009-05-17 13:34:37Z mbarbon $ ## Copyright: (c) 2004, 2007, 2009 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}; %typemap{wxSockAddress*}{simple}; %typemap{wxIPaddress*}{simple}; %typemap{wxIPV4address*}{simple}; %typemap{wxIPV6address*}{simple}; %typemap{wxUNIXaddress*}{simple}; %name{Wx::SockAddress} class wxSockAddress { %{ static void wxSockAddress::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxSockAddress() %code{% wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; %}; void Clear(); int Type(); }; #if WXPERL_W_VERSION_GE( 2, 5, 1 ) %name{Wx::IPaddress} class wxIPaddress { %name{SetHostname} bool Hostname(const wxString& name); %name{SetService} bool Service(const wxString& port); bool IsLocalHost(); %name{SetAnyAddress} bool AnyAddress(); %name{GetIPAddress} wxString IPAddress(); %name{GetHostname} wxString Hostname(); %name{GetService} unsigned short Service(); }; #endif %name{Wx::IPV4address} class wxIPV4address { wxIPV4address(); %name{GetOrigHostname} wxString OrigHostname(); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) %name{SetBroadcastAddress} bool BroadcastAddress(); #endif }; #if wxUSE_IPV6 %name{Wx::IPV6address} class wxIPV6address { wxIPV6address(); }; #endif #ifdef __UNIX__ %name{Wx::UNIXaddress} class wxUNIXaddress { wxUNIXaddress(); %name{GetFilename} wxString Filename(); %name{SetFilename} void Filename(const wxString& filename); }; #endif Wx-0.9923/ext/socket/XS/SocketBase.xs000664000000000000 1170512306612240 15522 0ustar00Mark000000000000############################################################################# ## Name: ext/socket/XS/SocketBase.xs ## Purpose: XS for Wx::SocketBase ## Author: Graciliano M. P. ## Created: 27/02/2003 ## RCS-ID: $Id: SocketBase.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2003-2004, 2006-2007 Graciliano M. P. ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# MODULE=Wx PACKAGE=Wx::SocketBase #if 0 wxSocketBase* wxSocketBase::new() CODE: RETVAL = new wxPlSocketBase( CLASS ) ; OUTPUT: RETVAL #endif void wxSocketBase::Destroy() bool wxSocketBase::Ok() bool wxSocketBase::IsConnected() bool wxSocketBase::IsDisconnected() bool wxSocketBase::IsData() long wxSocketBase::LastCount() void wxSocketBase::Notify( notify ) bool notify void wxSocketBase::SetTimeout( seconds ) int seconds bool wxSocketBase::Wait( seconds = -1 , millisecond = 0 ) long seconds long millisecond bool wxSocketBase::WaitForRead( seconds = -1 , millisecond = 0 ) long seconds long millisecond bool wxSocketBase::WaitForWrite( seconds = -1 , millisecond = 0 ) long seconds long millisecond long wxSocketBase::Read( buf , size , leng = 0 ) SV* buf size_t size size_t leng CODE: // Upgrade the SV to scalar if needed. If the scalar is undef // can't use SvGROW. SvUPGRADE(buf , SVt_PV) ; // Tell that the scalar is string only (not integer, double, utf8...): SvPOK_only(buf) ; // Grow the scalar to receive the data and return a char* point: char* buffer = SvGROW( buf , leng + size + 2 ) ; // To read at the offset the user specified (works even if offset = 0): if ( leng > 0 ) buffer += leng ; THIS->Read( buffer , size ) ; int nread = THIS->LastCount() ; // Null-terminate the buffer, not necessary, but does not hurt: buffer[nread] = 0 ; // Tell Perl how long the string is: SvCUR_set( buf , leng + nread ) ; // Undef on read error: if( THIS->Error() ) XSRETURN_UNDEF ; // Return the amount of data read, like Perl read(). RETVAL = nread ; OUTPUT: RETVAL void wxSocketBase::Close() void wxSocketBase::Discard() bool wxSocketBase::Error() long wxSocketBase::GetFlags() void wxSocketBase::GetLocal() PPCODE: wxIPV4address addr ; THIS->GetLocal( addr ) ; XPUSHs( sv_2mortal( newSVpv( addr.Hostname().mb_str(), 0 ) ) ); XPUSHs( sv_2mortal( newSViv( addr.Service() ) ) ); void wxSocketBase::GetPeer() PPCODE: wxIPV4address addr ; THIS->GetPeer( addr ) ; XPUSHs( sv_2mortal( newSVpv( addr.Hostname().mb_str(), 0 ) ) ); XPUSHs( sv_2mortal( newSViv( addr.Service() ) ) ); void wxSocketBase::InterruptWait() long wxSocketBase::LastError() long wxSocketBase::Peek(buf , size , leng = 0 ) SV* buf size_t size size_t leng CODE: SvUPGRADE(buf , SVt_PV) ; SvPOK_only(buf) ; char* buffer = SvGROW( buf , leng + size + 2 ) ; if ( leng > 0 ) { buffer += leng ;} THIS->Peek( buffer , size ) ; int nread = THIS->LastCount() ; buffer[nread] = 0 ; SvCUR_set( buf , leng + nread ) ; if( THIS->Error() ) XSRETURN_UNDEF ; RETVAL = nread ; OUTPUT: RETVAL long wxSocketBase::ReadMsg(buf , size , leng = 0 ) SV* buf size_t size size_t leng CODE: SvUPGRADE(buf , SVt_PV) ; SvPOK_only(buf) ; char* buffer = SvGROW( buf , leng + size + 2 ) ; if ( leng > 0 ) { buffer += leng ;} THIS->ReadMsg( buffer , size ) ; int nread = THIS->LastCount() ; buffer[nread] = 0 ; SvCUR_set( buf , leng + nread ) ; if( THIS->Error() ) XSRETURN_UNDEF ; RETVAL = nread ; OUTPUT: RETVAL void wxSocketBase::RestoreState() void wxSocketBase::SaveState() void wxSocketBase::SetFlags(flags) long flags void wxSocketBase::SetNotify(flags) long flags long wxSocketBase::Unread(buf , size = 0) SV* buf long size CODE: // Upgrade the SV to scalar if needed. If the scalar is undef // can't use SvGROW. SvUPGRADE(buf , SVt_PV) ; if ( size == 0 ) { size = SvCUR(buf) ;} THIS->Unread( SvPV_nolen(buf) , size ) ; RETVAL = THIS->LastCount() ; OUTPUT: RETVAL bool wxSocketBase::WaitForLost( seconds = -1 , millisecond = 0 ) long seconds long millisecond long wxSocketBase::Write(buf , size = 0) SV* buf long size CODE: if ( size == 0 ) { size = SvCUR(buf) ;} THIS->Write( SvPV_nolen(buf) , size ) ; RETVAL = THIS->LastCount() ; OUTPUT: RETVAL long wxSocketBase::WriteMsg(buf , size = 0) SV* buf long size CODE: if ( size == 0 ) { size = SvCUR(buf) ;} THIS->WriteMsg( SvPV_nolen(buf) , size ) ; RETVAL = THIS->LastCount() ; OUTPUT: RETVAL void wxSocketBase::SetEventHandler( evthnd , id = wxID_ANY ) wxEvtHandler* evthnd int id CODE: THIS->SetEventHandler( *evthnd , id ); Wx-0.9923/ext/socket/XS/SocketClient.xs000664000000000000 173712306612240 16052 0ustar00Mark000000000000############################################################################# ## Name: ext/socket/XS/SocketClient.xs ## Purpose: XS for Wx::SocketClient ## Author: Graciliano M. P. ## Created: 27/02/2003 ## RCS-ID: $Id: SocketClient.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2003 Graciliano M. P. ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# MODULE=Wx PACKAGE=Wx::SocketClient wxSocketClient* wxSocketClient::new( style = 0 ) long style CODE: RETVAL = new wxPliSocketClient( CLASS , style ) ; OUTPUT: RETVAL bool wxSocketClient::Connect( host , port , wait = 1 ) wxString host wxString port bool wait CODE: wxIPV4address addr ; addr.Hostname(host) ; addr.Service(port) ; RETVAL = THIS->Connect( addr , wait ) ; OUTPUT: RETVAL Wx-0.9923/ext/socket/XS/SocketEvent.xs000664000000000000 142512306612240 15707 0ustar00Mark000000000000############################################################################# ## Name: ext/socket/XS/SocketEvent.xs ## Purpose: XS for Wx::SocketEvent ## Author: Graciliano M. P. ## Created: 05/03/2003 ## RCS-ID: $Id: SocketEvent.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2003 Graciliano M. P. ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# MODULE=Wx PACKAGE=Wx::SocketEvent wxSocketEvent* wxSocketEvent::new(id = 0) int id CODE: RETVAL = new wxSocketEvent( id ) ; OUTPUT: RETVAL wxSocketBase* wxSocketEvent::GetSocket() long wxSocketEvent::GetSocketEvent() Wx-0.9923/ext/socket/XS/SocketServer.xs000664000000000000 250712306612240 16076 0ustar00Mark000000000000############################################################################# ## Name: ext/socket/XS/SocketServer.xs ## Purpose: XS for Wx::SocketServer ## Author: Graciliano M. P. ## Created: 04/03/2003 ## RCS-ID: $Id: SocketServer.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2003 Graciliano M. P. ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# MODULE=Wx PACKAGE=Wx::SocketServer wxSocketServer* wxSocketServer::new( host , port , style = 0 ) wxString host wxString port long style CODE: wxIPV4address addr ; addr.Hostname(host) ; addr.Service(port) ; RETVAL = new wxPlSocketServer( CLASS , addr , style ) ; OUTPUT: RETVAL wxSocketBase* wxSocketServer::Accept(wait = true) bool wait CODE: // works, more or less; not a good example of C++ RETVAL = ((wxPlSocketServer*)THIS)->Accept(wait); OUTPUT: RETVAL bool wxSocketServer::AcceptWith( socket , wait = true ) wxSocketBase* socket bool wait CODE: RETVAL = THIS->AcceptWith( *socket , wait ); OUTPUT: RETVAL bool wxSocketServer::WaitForAccept( seconds = -1 , millisecond = 0 ) long seconds long millisecond Wx-0.9923/ext/stc/000775000000000000 012316265011 11767 5ustar00Mark000000000000Wx-0.9923/ext/stc/cpp/000775000000000000 012316265011 12551 5ustar00Mark000000000000Wx-0.9923/ext/stc/cpp/st_constants.cpp000664000000000000 22212712313617260 16131 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/stc/cpp/st_constants.cpp // Purpose: constants for Wx::STC // Author: Marcus Friedlaender and Mattia Barbon // Created: 23/05/2002 // RCS-ID: $Id: st_constants.cpp 3404 2012-10-01 15:44:18Z mdootson $ // Copyright: (c) 2002-2006, 2008, 2010 Marcus Friedlaender and Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/constants.h" double stc_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: stc #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); if( strlen( name ) >= 7 ) fl = name[6]; else fl = 0; switch( fl ) { case '4': #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_4GL_BLOCK ); r( wxSTC_4GL_BLOCK_ ); r( wxSTC_4GL_CHARACTER ); r( wxSTC_4GL_CHARACTER_ ); r( wxSTC_4GL_COMMENT1 ); r( wxSTC_4GL_COMMENT1_ ); r( wxSTC_4GL_COMMENT2 ); r( wxSTC_4GL_COMMENT2_ ); r( wxSTC_4GL_COMMENT3 ); r( wxSTC_4GL_COMMENT3_ ); r( wxSTC_4GL_COMMENT4 ); r( wxSTC_4GL_COMMENT4_ ); r( wxSTC_4GL_COMMENT5 ); r( wxSTC_4GL_COMMENT5_ ); r( wxSTC_4GL_COMMENT6 ); r( wxSTC_4GL_COMMENT6_ ); r( wxSTC_4GL_DEFAULT ); r( wxSTC_4GL_DEFAULT_ ); r( wxSTC_4GL_END ); r( wxSTC_4GL_END_ ); r( wxSTC_4GL_IDENTIFIER ); r( wxSTC_4GL_IDENTIFIER_ ); r( wxSTC_4GL_NUMBER ); r( wxSTC_4GL_NUMBER_ ); r( wxSTC_4GL_OPERATOR ); r( wxSTC_4GL_OPERATOR_ ); r( wxSTC_4GL_PREPROCESSOR ); r( wxSTC_4GL_PREPROCESSOR_ ); r( wxSTC_4GL_STRING ); r( wxSTC_4GL_STRING_ ); r( wxSTC_4GL_WORD ); r( wxSTC_4GL_WORD_ ); #endif break; case 'A': #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_A68K_DEFAULT ); r( wxSTC_A68K_COMMENT ); r( wxSTC_A68K_NUMBER_DEC ); r( wxSTC_A68K_NUMBER_BIN ); r( wxSTC_A68K_NUMBER_HEX ); r( wxSTC_A68K_STRING1 ); r( wxSTC_A68K_OPERATOR ); r( wxSTC_A68K_CPUINSTRUCTION ); r( wxSTC_A68K_EXTINSTRUCTION ); r( wxSTC_A68K_REGISTER ); r( wxSTC_A68K_DIRECTIVE ); r( wxSTC_A68K_MACRO_ARG ); r( wxSTC_A68K_LABEL ); r( wxSTC_A68K_STRING2 ); r( wxSTC_A68K_IDENTIFIER ); r( wxSTC_A68K_MACRO_DECLARATION ); r( wxSTC_A68K_COMMENT_WORD ); r( wxSTC_A68K_COMMENT_SPECIAL ); r( wxSTC_A68K_COMMENT_DOXYGEN ); r( wxSTC_ASM_COMMENTDIRECTIVE ); r( wxSTC_AVS_DEFAULT ); r( wxSTC_AVS_COMMENTBLOCK ); r( wxSTC_AVS_COMMENTBLOCKN ); r( wxSTC_AVS_COMMENTLINE ); r( wxSTC_AVS_NUMBER ); r( wxSTC_AVS_OPERATOR ); r( wxSTC_AVS_IDENTIFIER ); r( wxSTC_AVS_STRING ); r( wxSTC_AVS_TRIPLESTRING ); r( wxSTC_AVS_KEYWORD ); r( wxSTC_AVS_FILTER ); r( wxSTC_AVS_PLUGIN ); r( wxSTC_AVS_FUNCTION ); r( wxSTC_AVS_CLIPPROP ); r( wxSTC_AVS_USERDFN ); #endif r( wxSTC_AVE_DEFAULT ); r( wxSTC_AVE_COMMENT ); r( wxSTC_AVE_NUMBER ); r( wxSTC_AVE_WORD ); r( wxSTC_AVE_STRING ); r( wxSTC_AVE_ENUM ); r( wxSTC_AVE_STRINGEOL ); r( wxSTC_AVE_IDENTIFIER ); r( wxSTC_AVE_OPERATOR ); r( wxSTC_ADA_DEFAULT ); r( wxSTC_ADA_NUMBER ); r( wxSTC_ADA_WORD ); r( wxSTC_ADA_STRING ); r( wxSTC_ADA_CHARACTER ); r( wxSTC_ADA_IDENTIFIER ); r( wxSTC_ADA_STRINGEOL ); r( wxSTC_ASM_DEFAULT ); r( wxSTC_ASM_COMMENT ); r( wxSTC_ASM_NUMBER ); r( wxSTC_ASM_STRING ); r( wxSTC_ASM_OPERATOR ); r( wxSTC_ASM_IDENTIFIER ); r( wxSTC_ASM_CPUINSTRUCTION ); r( wxSTC_ASM_MATHINSTRUCTION ); r( wxSTC_ASM_REGISTER ); r( wxSTC_ASM_DIRECTIVE ); r( wxSTC_ASM_DIRECTIVEOPERAND ); #if WXPERL_W_VERSION_GE( 2, 5, 2 ) r( wxSTC_ASM_COMMENTBLOCK ); r( wxSTC_ASM_CHARACTER ); r( wxSTC_ASM_STRINGEOL ); r( wxSTC_ASM_EXTINSTRUCTION ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_ABAQUS_ARGUMENT ); r( wxSTC_ABAQUS_COMMAND ); r( wxSTC_ABAQUS_COMMENT ); r( wxSTC_ABAQUS_COMMENTBLOCK ); r( wxSTC_ABAQUS_DEFAULT ); r( wxSTC_ABAQUS_FUNCTION ); r( wxSTC_ABAQUS_NUMBER ); r( wxSTC_ABAQUS_OPERATOR ); r( wxSTC_ABAQUS_PROCESSOR ); r( wxSTC_ABAQUS_SLASHCOMMAND ); r( wxSTC_ABAQUS_STARCOMMAND ); r( wxSTC_ABAQUS_STRING ); r( wxSTC_ABAQUS_WORD ); #endif r( wxSTC_ADA_CHARACTEREOL ); r( wxSTC_ADA_COMMENTLINE ); r( wxSTC_ADA_DELIMITER ); r( wxSTC_ADA_ILLEGAL ); r( wxSTC_ADA_LABEL ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_ALPHA_NOALPHA ); r( wxSTC_ALPHA_OPAQUE ); r( wxSTC_ALPHA_TRANSPARENT ); #endif r( wxSTC_APDL_COMMAND ); r( wxSTC_APDL_COMMENT ); r( wxSTC_APDL_COMMENTBLOCK ); r( wxSTC_APDL_DEFAULT ); r( wxSTC_APDL_FUNCTION ); r( wxSTC_APDL_NUMBER ); r( wxSTC_APDL_PROCESSOR ); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxSTC_APDL_ARGUMENT ); r( wxSTC_APDL_OPERATOR ); r( wxSTC_APDL_SLASHCOMMAND ); r( wxSTC_APDL_STARCOMMAND ); #endif r( wxSTC_APDL_STRING ); r( wxSTC_APDL_WORD ); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxSTC_ASN1_ATTRIBUTE ); r( wxSTC_ASN1_COMMENT ); r( wxSTC_ASN1_DEFAULT ); r( wxSTC_ASN1_DESCRIPTOR ); r( wxSTC_ASN1_IDENTIFIER ); r( wxSTC_ASN1_KEYWORD ); r( wxSTC_ASN1_OID ); r( wxSTC_ASN1_OPERATOR ); r( wxSTC_ASN1_SCALAR ); r( wxSTC_ASN1_STRING ); r( wxSTC_ASN1_TYPE ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_ASY_CHARACTER ); r( wxSTC_ASY_COMMENT ); r( wxSTC_ASY_COMMENTLINE ); r( wxSTC_ASY_COMMENTLINEDOC ); r( wxSTC_ASY_DEFAULT ); r( wxSTC_ASY_IDENTIFIER ); r( wxSTC_ASY_NUMBER ); r( wxSTC_ASY_OPERATOR ); r( wxSTC_ASY_STRING ); r( wxSTC_ASY_STRINGEOL ); r( wxSTC_ASY_WORD ); r( wxSTC_ASY_WORD2 ); #endif r( wxSTC_AU3_COMMENT ); r( wxSTC_AU3_COMMENTBLOCK ); r( wxSTC_AU3_DEFAULT ); r( wxSTC_AU3_FUNCTION ); r( wxSTC_AU3_KEYWORD ); r( wxSTC_AU3_MACRO ); r( wxSTC_AU3_NUMBER ); r( wxSTC_AU3_OPERATOR ); r( wxSTC_AU3_PREPROCESSOR ); r( wxSTC_AU3_SENT ); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxSTC_AU3_SPECIAL ); #endif r( wxSTC_AU3_STRING ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_AU3_COMOBJ ); r( wxSTC_AU3_EXPAND ); r( wxSTC_AU3_UDF ); #endif r( wxSTC_AU3_VARIABLE ); r( wxSTC_AVE_WORD1 ); r( wxSTC_AVE_WORD2 ); r( wxSTC_AVE_WORD3 ); r( wxSTC_AVE_WORD4 ); r( wxSTC_AVE_WORD5 ); r( wxSTC_AVE_WORD6 ); #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_ANNOTATION_HIDDEN ); r( wxSTC_ANNOTATION_STANDARD ); r( wxSTC_ANNOTATION_BOXED ); #endif break; case 'B': r( wxSTC_B_DEFAULT ); r( wxSTC_B_COMMENT ); r( wxSTC_B_NUMBER ); r( wxSTC_B_KEYWORD ); r( wxSTC_B_STRING ); r( wxSTC_B_PREPROCESSOR ); r( wxSTC_B_OPERATOR ); r( wxSTC_B_IDENTIFIER ); r( wxSTC_B_DATE ); r( wxSTC_BAT_DEFAULT ); r( wxSTC_BAT_COMMENT ); r( wxSTC_BAT_WORD ); r( wxSTC_BAT_LABEL ); r( wxSTC_BAT_HIDE ); r( wxSTC_BAT_COMMAND ); r( wxSTC_BAT_IDENTIFIER ); r( wxSTC_BAT_OPERATOR ); r( wxSTC_BAAN_DEFAULT ); r( wxSTC_BAAN_COMMENT ); r( wxSTC_BAAN_COMMENTDOC ); r( wxSTC_BAAN_NUMBER ); r( wxSTC_BAAN_WORD ); r( wxSTC_BAAN_STRING ); r( wxSTC_BAAN_PREPROCESSOR ); r( wxSTC_BAAN_OPERATOR ); r( wxSTC_BAAN_IDENTIFIER ); r( wxSTC_BAAN_STRINGEOL ); r( wxSTC_BAAN_WORD2 ); r( wxSTC_B_ASM ); r( wxSTC_B_CONSTANT ); r( wxSTC_B_KEYWORD2 ); r( wxSTC_B_KEYWORD3 ); r( wxSTC_B_KEYWORD4 ); r( wxSTC_B_STRINGEOL ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_B_BINNUMBER ); r( wxSTC_B_ERROR ); r( wxSTC_B_HEXNUMBER ); r( wxSTC_B_LABEL ); #endif break; case 'C': #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_C_STRINGRAW ); r( wxSTC_C_TRIPLEVERBATIM ); r( wxSTC_C_HASHQUOTEDSTRING ); r( wxSTC_C_PREPROCESSORCOMMENT ); r( wxSTC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE ); r( wxSTC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE ); r( wxSTC_CARETSTICKY_OFF ); r( wxSTC_CARETSTICKY_ON ); r( wxSTC_CARETSTICKY_WHITESPACE ); r( wxSTC_COFFEESCRIPT_DEFAULT ); r( wxSTC_COFFEESCRIPT_COMMENT ); r( wxSTC_COFFEESCRIPT_COMMENTLINE ); r( wxSTC_COFFEESCRIPT_COMMENTDOC ); r( wxSTC_COFFEESCRIPT_NUMBER ); r( wxSTC_COFFEESCRIPT_WORD ); r( wxSTC_COFFEESCRIPT_STRING ); r( wxSTC_COFFEESCRIPT_CHARACTER ); r( wxSTC_COFFEESCRIPT_UUID ); r( wxSTC_COFFEESCRIPT_PREPROCESSOR ); r( wxSTC_COFFEESCRIPT_OPERATOR ); r( wxSTC_COFFEESCRIPT_IDENTIFIER ); r( wxSTC_COFFEESCRIPT_STRINGEOL ); r( wxSTC_COFFEESCRIPT_VERBATIM ); r( wxSTC_COFFEESCRIPT_REGEX ); r( wxSTC_COFFEESCRIPT_COMMENTLINEDOC ); r( wxSTC_COFFEESCRIPT_WORD2 ); r( wxSTC_COFFEESCRIPT_COMMENTDOCKEYWORD ); r( wxSTC_COFFEESCRIPT_COMMENTDOCKEYWORDERROR ); r( wxSTC_COFFEESCRIPT_GLOBALCLASS ); r( wxSTC_COFFEESCRIPT_STRINGRAW ); r( wxSTC_COFFEESCRIPT_TRIPLEVERBATIM ); r( wxSTC_COFFEESCRIPT_HASHQUOTEDSTRING ); r( wxSTC_COFFEESCRIPT_COMMENTBLOCK ); r( wxSTC_COFFEESCRIPT_VERBOSE_REGEX ); r( wxSTC_COFFEESCRIPT_VERBOSE_REGEX_COMMENT ); r( wxSTC_CSS_MEDIA ); r( wxSTC_CSS_VARIABLE ); r( wxSTC_CURSORARROW ); r( wxSTC_CURSORREVERSEARROW ); #endif r( wxSTC_CHARSET_ANSI ); r( wxSTC_CHARSET_DEFAULT ); r( wxSTC_CHARSET_BALTIC ); r( wxSTC_CHARSET_CHINESEBIG5 ); r( wxSTC_CHARSET_EASTEUROPE ); r( wxSTC_CHARSET_GB2312 ); r( wxSTC_CHARSET_GREEK ); r( wxSTC_CHARSET_HANGUL ); r( wxSTC_CHARSET_MAC ); r( wxSTC_CHARSET_OEM ); r( wxSTC_CHARSET_RUSSIAN ); r( wxSTC_CHARSET_SHIFTJIS ); r( wxSTC_CHARSET_SYMBOL ); r( wxSTC_CHARSET_TURKISH ); r( wxSTC_CHARSET_JOHAB ); r( wxSTC_CHARSET_HEBREW ); r( wxSTC_CHARSET_ARABIC ); r( wxSTC_CHARSET_VIETNAMESE ); r( wxSTC_CHARSET_THAI ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_CHARSET_8859_15 ); r( wxSTC_CHARSET_CYRILLIC ); #endif r( wxSTC_CASE_MIXED ); r( wxSTC_CASE_UPPER ); r( wxSTC_CASE_LOWER ); r( wxSTC_CACHE_NONE ); r( wxSTC_CACHE_CARET ); r( wxSTC_CACHE_PAGE ); r( wxSTC_CACHE_DOCUMENT ); r( wxSTC_CURSORNORMAL ); r( wxSTC_CURSORWAIT ); r( wxSTC_CARET_SLOP ); r( wxSTC_CARET_STRICT ); r( wxSTC_CARET_JUMPS ); r( wxSTC_CARET_EVEN ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_CARETSTYLE_BLOCK ); r( wxSTC_CARETSTYLE_INVISIBLE ); r( wxSTC_CARETSTYLE_LINE ); #endif r( wxSTC_C_DEFAULT ); r( wxSTC_C_COMMENT ); r( wxSTC_C_COMMENTLINE ); r( wxSTC_C_COMMENTDOC ); r( wxSTC_C_NUMBER ); r( wxSTC_C_WORD ); r( wxSTC_C_STRING ); r( wxSTC_C_CHARACTER ); r( wxSTC_C_UUID ); r( wxSTC_C_PREPROCESSOR ); r( wxSTC_C_OPERATOR ); r( wxSTC_C_IDENTIFIER ); r( wxSTC_C_STRINGEOL ); r( wxSTC_C_VERBATIM ); r( wxSTC_C_REGEX ); r( wxSTC_C_COMMENTLINEDOC ); r( wxSTC_C_WORD2 ); r( wxSTC_C_COMMENTDOCKEYWORD ); r( wxSTC_C_COMMENTDOCKEYWORDERROR ); r( wxSTC_C_GLOBALCLASS ); r( wxSTC_CONF_DEFAULT ); r( wxSTC_CONF_COMMENT ); r( wxSTC_CONF_NUMBER ); r( wxSTC_CONF_IDENTIFIER ); r( wxSTC_CONF_EXTENSION ); r( wxSTC_CONF_PARAMETER ); r( wxSTC_CONF_STRING ); r( wxSTC_CONF_OPERATOR ); r( wxSTC_CONF_IP ); r( wxSTC_CONF_DIRECTIVE ); r( wxSTC_CMD_REDO ); r( wxSTC_CMD_SELECTALL ); r( wxSTC_CMD_UNDO ); r( wxSTC_CMD_CUT ); r( wxSTC_CMD_COPY ); r( wxSTC_CMD_PASTE ); r( wxSTC_CMD_LINEDOWN ); r( wxSTC_CMD_LINEDOWNEXTEND ); r( wxSTC_CMD_LINEUP ); r( wxSTC_CMD_LINEUPEXTEND ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) r( wxSTC_CMD_LINECOPY ); #endif r( wxSTC_CMD_CHARLEFT ); r( wxSTC_CMD_CHARLEFTEXTEND ); r( wxSTC_CMD_CHARRIGHT ); r( wxSTC_CMD_CHARRIGHTEXTEND ); r( wxSTC_CMD_WORDLEFT ); r( wxSTC_CMD_WORDLEFTEXTEND ); r( wxSTC_CMD_WORDRIGHT ); r( wxSTC_CMD_WORDRIGHTEXTEND ); r( wxSTC_CMD_HOME ); r( wxSTC_CMD_HOMEEXTEND ); r( wxSTC_CMD_LINEEND ); r( wxSTC_CMD_LINEENDEXTEND ); r( wxSTC_CMD_DOCUMENTSTART ); r( wxSTC_CMD_DOCUMENTSTARTEXTEND ); r( wxSTC_CMD_DOCUMENTEND ); r( wxSTC_CMD_DOCUMENTENDEXTEND ); r( wxSTC_CMD_PAGEUP ); r( wxSTC_CMD_PAGEUPEXTEND ); r( wxSTC_CMD_PAGEDOWN ); r( wxSTC_CMD_PAGEDOWNEXTEND ); r( wxSTC_CMD_PARADOWN ); r( wxSTC_CMD_PARADOWNEXTEND ); r( wxSTC_CMD_PARAUP ); r( wxSTC_CMD_PARAUPEXTEND ); r( wxSTC_CMD_EDITTOGGLEOVERTYPE ); r( wxSTC_CMD_CANCEL ); r( wxSTC_CMD_DELETEBACK ); r( wxSTC_CMD_TAB ); r( wxSTC_CMD_BACKTAB ); r( wxSTC_CMD_NEWLINE ); r( wxSTC_CMD_FORMFEED ); r( wxSTC_CMD_VCHOME ); r( wxSTC_CMD_VCHOMEEXTEND ); r( wxSTC_CMD_ZOOMIN ); r( wxSTC_CMD_ZOOMOUT ); r( wxSTC_CMD_DELWORDLEFT ); r( wxSTC_CMD_DELWORDRIGHT ); r( wxSTC_CMD_LINECUT ); r( wxSTC_CMD_LINEDELETE ); r( wxSTC_CMD_LINETRANSPOSE ); r( wxSTC_CMD_LOWERCASE ); r( wxSTC_CMD_UPPERCASE ); r( wxSTC_CMD_LINESCROLLDOWN ); r( wxSTC_CMD_LINESCROLLUP ); r( wxSTC_CMD_DELETEBACKNOTLINE ); r( wxSTC_CMD_HOMEDISPLAY ); r( wxSTC_CMD_HOMEDISPLAYEXTEND ); r( wxSTC_CMD_LINEENDDISPLAY ); r( wxSTC_CMD_LINEENDDISPLAYEXTEND ); r( wxSTC_CMD_CLEAR ); r( wxSTC_CMD_WORDPARTLEFT ); r( wxSTC_CMD_WORDPARTLEFTEXTEND ); r( wxSTC_CMD_WORDPARTRIGHT ); r( wxSTC_CMD_WORDPARTRIGHTEXTEND ); r( wxSTC_CMD_DELLINELEFT ); r( wxSTC_CMD_DELLINERIGHT ); r( wxSTC_CSS_DEFAULT ); r( wxSTC_CSS_TAG ); r( wxSTC_CSS_CLASS ); r( wxSTC_CSS_PSEUDOCLASS ); r( wxSTC_CSS_UNKNOWN_PSEUDOCLASS ); r( wxSTC_CSS_OPERATOR ); r( wxSTC_CSS_IDENTIFIER ); r( wxSTC_CSS_UNKNOWN_IDENTIFIER ); r( wxSTC_CSS_VALUE ); r( wxSTC_CSS_COMMENT ); r( wxSTC_CSS_ID ); r( wxSTC_CSS_IMPORTANT ); r( wxSTC_CSS_DIRECTIVE ); r( wxSTC_CSS_DOUBLESTRING ); r( wxSTC_CSS_SINGLESTRING ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_CSS_ATTRIBUTE ); #endif #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxSTC_CSS_IDENTIFIER2 ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_CSS_IDENTIFIER3 ); r( wxSTC_CSS_PSEUDOELEMENT ); r( wxSTC_CSS_EXTENDED_IDENTIFIER ); r( wxSTC_CSS_EXTENDED_PSEUDOCLASS ); r( wxSTC_CSS_EXTENDED_PSEUDOELEMENT ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_CAML_CHAR ); r( wxSTC_CAML_COMMENT ); r( wxSTC_CAML_COMMENT1 ); r( wxSTC_CAML_COMMENT2 ); r( wxSTC_CAML_COMMENT3 ); r( wxSTC_CAML_DEFAULT ); r( wxSTC_CAML_IDENTIFIER ); r( wxSTC_CAML_KEYWORD ); r( wxSTC_CAML_KEYWORD2 ); r( wxSTC_CAML_KEYWORD3 ); r( wxSTC_CAML_LINENUM ); r( wxSTC_CAML_NUMBER ); r( wxSTC_CAML_OPERATOR ); r( wxSTC_CAML_STRING ); r( wxSTC_CAML_TAGNAME ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_CAML_WHITE ); #endif r( wxSTC_CLW_ATTRIBUTE ); r( wxSTC_CLW_BUILTIN_PROCEDURES_FUNCTION ); r( wxSTC_CLW_COMMENT ); r( wxSTC_CLW_COMPILER_DIRECTIVE ); r( wxSTC_CLW_DEFAULT ); r( wxSTC_CLW_ERROR ); r( wxSTC_CLW_INTEGER_CONSTANT ); r( wxSTC_CLW_KEYWORD ); r( wxSTC_CLW_LABEL ); r( wxSTC_CLW_PICTURE_STRING ); r( wxSTC_CLW_REAL_CONSTANT ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_CLW_DEPRECATED ); r( wxSTC_CLW_RUNTIME_EXPRESSIONS ); #endif r( wxSTC_CLW_STANDARD_EQUATE ); r( wxSTC_CLW_STRING ); r( wxSTC_CLW_STRUCTURE_DATA_TYPE ); r( wxSTC_CLW_USER_IDENTIFIER ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_CMAKE_COMMANDS ); r( wxSTC_CMAKE_COMMENT ); r( wxSTC_CMAKE_DEFAULT ); r( wxSTC_CMAKE_FOREACHDEF ); r( wxSTC_CMAKE_IFDEFINEDEF ); r( wxSTC_CMAKE_MACRODEF ); r( wxSTC_CMAKE_NUMBER ); r( wxSTC_CMAKE_PARAMETERS ); r( wxSTC_CMAKE_STRINGDQ ); r( wxSTC_CMAKE_STRINGLQ ); r( wxSTC_CMAKE_STRINGRQ ); r( wxSTC_CMAKE_STRINGVAR ); r( wxSTC_CMAKE_USERDEFINED ); r( wxSTC_CMAKE_VARIABLE ); r( wxSTC_CMAKE_WHILEDEF ); #endif r( wxSTC_CMD_CHARLEFTRECTEXTEND ); r( wxSTC_CMD_CHARRIGHTRECTEXTEND ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_CMD_DELWORDRIGHTEND ); #endif r( wxSTC_CMD_HOMERECTEXTEND ); r( wxSTC_CMD_HOMEWRAP ); r( wxSTC_CMD_HOMEWRAPEXTEND ); r( wxSTC_CMD_LINEDOWNRECTEXTEND ); r( wxSTC_CMD_LINEDUPLICATE ); r( wxSTC_CMD_LINEENDRECTEXTEND ); r( wxSTC_CMD_LINEENDWRAP ); r( wxSTC_CMD_LINEENDWRAPEXTEND ); r( wxSTC_CMD_LINEUPRECTEXTEND ); r( wxSTC_CMD_PAGEDOWNRECTEXTEND ); r( wxSTC_CMD_PAGEUPRECTEXTEND ); r( wxSTC_CMD_STUTTEREDPAGEDOWN ); r( wxSTC_CMD_STUTTEREDPAGEDOWNEXTEND ); r( wxSTC_CMD_STUTTEREDPAGEUP ); r( wxSTC_CMD_STUTTEREDPAGEUPEXTEND ); r( wxSTC_CMD_VCHOMERECTEXTEND ); r( wxSTC_CMD_VCHOMEWRAP ); r( wxSTC_CMD_VCHOMEWRAPEXTEND ); r( wxSTC_CMD_WORDLEFTEND ); r( wxSTC_CMD_WORDLEFTENDEXTEND ); r( wxSTC_CMD_WORDRIGHTEND ); r( wxSTC_CMD_WORDRIGHTENDEXTEND ); #if WXPERL_W_VERSION_LT( 2, 9, 5 ) r( wxSTC_CP_DBCS ); #endif r( wxSTC_CP_UTF8 ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_CSOUND_ARATE_VAR ); r( wxSTC_CSOUND_COMMENT ); r( wxSTC_CSOUND_COMMENTBLOCK ); r( wxSTC_CSOUND_DEFAULT ); r( wxSTC_CSOUND_GLOBAL_VAR ); r( wxSTC_CSOUND_HEADERSTMT ); r( wxSTC_CSOUND_IDENTIFIER ); r( wxSTC_CSOUND_INSTR ); r( wxSTC_CSOUND_IRATE_VAR ); r( wxSTC_CSOUND_KRATE_VAR ); r( wxSTC_CSOUND_NUMBER ); r( wxSTC_CSOUND_OPCODE ); r( wxSTC_CSOUND_OPERATOR ); r( wxSTC_CSOUND_PARAM ); r( wxSTC_CSOUND_STRINGEOL ); r( wxSTC_CSOUND_USERKEYWORD ); #endif break; case 'D': r( wxSTC_DIFF_DEFAULT ); r( wxSTC_DIFF_COMMENT ); r( wxSTC_DIFF_COMMAND ); r( wxSTC_DIFF_HEADER ); r( wxSTC_DIFF_POSITION ); r( wxSTC_DIFF_DELETED ); r( wxSTC_DIFF_ADDED ); #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_DIFF_CHANGED ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_D_CHARACTER ); r( wxSTC_D_COMMENT ); r( wxSTC_D_COMMENTDOC ); r( wxSTC_D_COMMENTDOCKEYWORD ); r( wxSTC_D_COMMENTDOCKEYWORDERROR ); r( wxSTC_D_COMMENTLINE ); r( wxSTC_D_COMMENTLINEDOC ); r( wxSTC_D_COMMENTNESTED ); r( wxSTC_D_DEFAULT ); r( wxSTC_D_IDENTIFIER ); r( wxSTC_D_NUMBER ); r( wxSTC_D_OPERATOR ); r( wxSTC_D_STRING ); r( wxSTC_D_STRINGEOL ); r( wxSTC_D_TYPEDEF ); r( wxSTC_D_WORD ); r( wxSTC_D_WORD2 ); r( wxSTC_D_WORD3 ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_D_STRINGR ); r( wxSTC_D_WORD5 ); r( wxSTC_D_WORD6 ); r( wxSTC_D_WORD7 ); #endif break; case 'E': #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_ECL_DEFAULT ); r( wxSTC_ECL_COMMENT ); r( wxSTC_ECL_COMMENTLINE ); r( wxSTC_ECL_NUMBER ); r( wxSTC_ECL_STRING ); r( wxSTC_ECL_WORD0 ); r( wxSTC_ECL_OPERATOR ); r( wxSTC_ECL_CHARACTER ); r( wxSTC_ECL_UUID ); r( wxSTC_ECL_PREPROCESSOR ); r( wxSTC_ECL_UNKNOWN ); r( wxSTC_ECL_IDENTIFIER ); r( wxSTC_ECL_STRINGEOL ); r( wxSTC_ECL_VERBATIM ); r( wxSTC_ECL_REGEX ); r( wxSTC_ECL_COMMENTLINEDOC ); r( wxSTC_ECL_WORD1 ); r( wxSTC_ECL_COMMENTDOCKEYWORD ); r( wxSTC_ECL_COMMENTDOCKEYWORDERROR ); r( wxSTC_ECL_WORD2 ); r( wxSTC_ECL_WORD3 ); r( wxSTC_ECL_WORD4 ); r( wxSTC_ECL_WORD5 ); r( wxSTC_ECL_COMMENTDOC ); r( wxSTC_ECL_ADDED ); r( wxSTC_ECL_DELETED ); r( wxSTC_ECL_CHANGED ); r( wxSTC_ECL_MOVED ); #endif r( wxSTC_EOL_CR ); r( wxSTC_EOL_LF ); r( wxSTC_EOL_CRLF ); r( wxSTC_EDGE_NONE ); r( wxSTC_EDGE_LINE ); r( wxSTC_EDGE_BACKGROUND ); r( wxSTC_ERR_DEFAULT ); r( wxSTC_ERR_PYTHON ); r( wxSTC_ERR_GCC ); r( wxSTC_ERR_MS ); r( wxSTC_ERR_CMD ); r( wxSTC_ERR_BORLAND ); r( wxSTC_ERR_PERL ); r( wxSTC_ERR_NET ); r( wxSTC_ERR_LUA ); r( wxSTC_ERR_CTAG ); r( wxSTC_ERR_DIFF_CHANGED ); r( wxSTC_ERR_DIFF_ADDITION ); r( wxSTC_ERR_DIFF_DELETION ); r( wxSTC_ERR_DIFF_MESSAGE ); r( wxSTC_EIFFEL_DEFAULT ); r( wxSTC_EIFFEL_COMMENTLINE ); r( wxSTC_EIFFEL_NUMBER ); r( wxSTC_EIFFEL_WORD ); r( wxSTC_EIFFEL_STRING ); r( wxSTC_EIFFEL_CHARACTER ); r( wxSTC_EIFFEL_OPERATOR ); r( wxSTC_EIFFEL_IDENTIFIER ); r( wxSTC_EIFFEL_STRINGEOL ); r( wxSTC_ERLANG_ATOM ); r( wxSTC_ERLANG_CHARACTER ); r( wxSTC_ERLANG_COMMENT ); r( wxSTC_ERLANG_DEFAULT ); r( wxSTC_ERLANG_FUNCTION_NAME ); r( wxSTC_ERLANG_KEYWORD ); r( wxSTC_ERLANG_MACRO ); r( wxSTC_ERLANG_NODE_NAME ); r( wxSTC_ERLANG_NUMBER ); r( wxSTC_ERLANG_OPERATOR ); r( wxSTC_ERLANG_RECORD ); #if WXPERL_W_VERSION_LT( 2, 9, 1 ) r( wxSTC_ERLANG_SEPARATOR ); #endif r( wxSTC_ERLANG_STRING ); r( wxSTC_ERLANG_UNKNOWN ); r( wxSTC_ERLANG_VARIABLE ); #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_ERLANG_PREPROC ); r( wxSTC_ERLANG_COMMENT_FUNCTION ); r( wxSTC_ERLANG_COMMENT_MODULE ); r( wxSTC_ERLANG_COMMENT_DOC ); r( wxSTC_ERLANG_COMMENT_DOC ); r( wxSTC_ERLANG_ATOM_QUOTED ); r( wxSTC_ERLANG_MACRO_QUOTED ); r( wxSTC_ERLANG_RECORD_QUOTED ); r( wxSTC_ERLANG_NODE_NAME_QUOTED ); r( wxSTC_ERLANG_BIFS ); r( wxSTC_ERLANG_MODULES ); r( wxSTC_ERLANG_MODULES_ATT ); #endif r( wxSTC_ERR_ABSF ); r( wxSTC_ERR_ELF ); r( wxSTC_ERR_IFC ); r( wxSTC_ERR_IFORT ); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxSTC_ERR_JAVA_STACK ); #endif r( wxSTC_ERR_PHP ); r( wxSTC_ERR_TIDY ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_ERR_VALUE ); #endif r( wxSTC_ESCRIPT_BRACE ); r( wxSTC_ESCRIPT_COMMENT ); r( wxSTC_ESCRIPT_COMMENTDOC ); r( wxSTC_ESCRIPT_COMMENTLINE ); r( wxSTC_ESCRIPT_DEFAULT ); r( wxSTC_ESCRIPT_IDENTIFIER ); r( wxSTC_ESCRIPT_NUMBER ); r( wxSTC_ESCRIPT_OPERATOR ); r( wxSTC_ESCRIPT_STRING ); r( wxSTC_ESCRIPT_WORD ); r( wxSTC_ESCRIPT_WORD2 ); r( wxSTC_ESCRIPT_WORD3 ); #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_EFF_QUALITY_MASK ); r( wxSTC_EFF_QUALITY_DEFAULT ); r( wxSTC_EFF_QUALITY_NON_ANTIALIASED ); r( wxSTC_EFF_QUALITY_ANTIALIASED ); r( wxSTC_EFF_QUALITY_LCD_OPTIMIZED ); #endif break; case 'F': #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_FONT_SIZE_MULTIPLIER ); #endif r( wxSTC_FIND_WHOLEWORD ); r( wxSTC_FIND_MATCHCASE ); r( wxSTC_FIND_WORDSTART ); r( wxSTC_FIND_REGEXP ); r( wxSTC_FOLDLEVELBASE ); r( wxSTC_FOLDLEVELWHITEFLAG ); r( wxSTC_FOLDLEVELHEADERFLAG ); r( wxSTC_FOLDLEVELNUMBERMASK ); #if WXPERL_W_VERSION_GE( 2, 5, 2 ) r( wxSTC_FORTH_DEFAULT ); r( wxSTC_FORTH_COMMENT ); r( wxSTC_FORTH_COMMENT_ML ); r( wxSTC_FORTH_IDENTIFIER ); r( wxSTC_FORTH_CONTROL ); r( wxSTC_FORTH_KEYWORD ); r( wxSTC_FORTH_DEFWORD ); r( wxSTC_FORTH_PREWORD1 ); r( wxSTC_FORTH_PREWORD2 ); r( wxSTC_FORTH_NUMBER ); r( wxSTC_FORTH_STRING ); r( wxSTC_FORTH_LOCALE ); #endif r( wxSTC_F_DEFAULT ); r( wxSTC_F_COMMENT ); r( wxSTC_F_NUMBER ); r( wxSTC_F_STRING1 ); r( wxSTC_F_STRING2 ); r( wxSTC_F_STRINGEOL ); r( wxSTC_F_OPERATOR ); r( wxSTC_F_IDENTIFIER ); r( wxSTC_F_WORD ); r( wxSTC_F_WORD2 ); r( wxSTC_F_WORD3 ); r( wxSTC_F_PREPROCESSOR ); r( wxSTC_F_OPERATOR2 ); r( wxSTC_F_LABEL ); r( wxSTC_F_CONTINUATION ); r( wxSTC_FIND_POSIX ); #if WXPERL_W_VERSION_LT( 2, 9, 1 ) r( wxSTC_FOLDFLAG_BOX ); #endif r( wxSTC_FOLDFLAG_LEVELNUMBERS ); r( wxSTC_FOLDFLAG_LINEAFTER_CONTRACTED ); r( wxSTC_FOLDFLAG_LINEAFTER_EXPANDED ); r( wxSTC_FOLDFLAG_LINEBEFORE_CONTRACTED ); r( wxSTC_FOLDFLAG_LINEBEFORE_EXPANDED ); #if WXPERL_W_VERSION_LT( 2, 9, 1 ) r( wxSTC_FOLDLEVELBOXFOOTERFLAG ); r( wxSTC_FOLDLEVELBOXHEADERFLAG ); r( wxSTC_FOLDLEVELCONTRACTED ); r( wxSTC_FOLDLEVELUNINDENT ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) #if WXPERL_W_VERSION_LT( 2, 9, 5 ) r( wxSTC_FS_ASM ); r( wxSTC_FS_BINNUMBER ); r( wxSTC_FS_ERROR ); r( wxSTC_FS_HEXNUMBER ); r( wxSTC_FS_LABEL ); #else r( wxSTC_FS_WORDOPERATOR ); r( wxSTC_FS_DISABLEDCODE ); r( wxSTC_FS_DEFAULT_C ); r( wxSTC_FS_COMMENTDOC_C ); r( wxSTC_FS_COMMENTLINEDOC_C ); r( wxSTC_FS_KEYWORD_C ); r( wxSTC_FS_KEYWORD2_C ); r( wxSTC_FS_NUMBER_C ); r( wxSTC_FS_STRING_C ); r( wxSTC_FS_PREPROCESSOR_C ); r( wxSTC_FS_OPERATOR_C ); r( wxSTC_FS_IDENTIFIER_C ); r( wxSTC_FS_STRINGEOL_C ); #endif r( wxSTC_FS_COMMENT ); r( wxSTC_FS_COMMENTDOC ); r( wxSTC_FS_COMMENTDOCKEYWORD ); r( wxSTC_FS_COMMENTDOCKEYWORDERROR ); r( wxSTC_FS_COMMENTLINE ); r( wxSTC_FS_COMMENTLINEDOC ); r( wxSTC_FS_CONSTANT ); r( wxSTC_FS_DATE ); r( wxSTC_FS_DEFAULT ); r( wxSTC_FS_IDENTIFIER ); r( wxSTC_FS_KEYWORD ); r( wxSTC_FS_KEYWORD2 ); r( wxSTC_FS_KEYWORD3 ); r( wxSTC_FS_KEYWORD4 ); r( wxSTC_FS_NUMBER ); r( wxSTC_FS_OPERATOR ); r( wxSTC_FS_PREPROCESSOR ); r( wxSTC_FS_STRING ); r( wxSTC_FS_STRINGEOL ); #endif break; case 'G': #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_GAP_CHAR ); r( wxSTC_GAP_COMMENT ); r( wxSTC_GAP_DEFAULT ); r( wxSTC_GAP_IDENTIFIER ); r( wxSTC_GAP_KEYWORD ); r( wxSTC_GAP_KEYWORD2 ); r( wxSTC_GAP_KEYWORD3 ); r( wxSTC_GAP_KEYWORD4 ); r( wxSTC_GAP_NUMBER ); r( wxSTC_GAP_OPERATOR ); r( wxSTC_GAP_STRING ); r( wxSTC_GAP_STRINGEOL ); #endif r( wxSTC_GC_ATTRIBUTE ); r( wxSTC_GC_COMMAND ); r( wxSTC_GC_COMMENTBLOCK ); r( wxSTC_GC_COMMENTLINE ); r( wxSTC_GC_CONTROL ); r( wxSTC_GC_DEFAULT ); r( wxSTC_GC_EVENT ); r( wxSTC_GC_GLOBAL ); r( wxSTC_GC_OPERATOR ); r( wxSTC_GC_STRING ); break; case 'H': r( wxSTC_H_DEFAULT ); r( wxSTC_H_TAG ); r( wxSTC_H_TAGUNKNOWN ); r( wxSTC_H_ATTRIBUTE ); r( wxSTC_H_ATTRIBUTEUNKNOWN ); r( wxSTC_H_NUMBER ); r( wxSTC_H_DOUBLESTRING ); r( wxSTC_H_SINGLESTRING ); r( wxSTC_H_OTHER ); r( wxSTC_H_COMMENT ); r( wxSTC_H_ENTITY ); r( wxSTC_H_TAGEND ); r( wxSTC_H_XMLSTART ); r( wxSTC_H_XMLEND ); r( wxSTC_H_SCRIPT ); r( wxSTC_H_ASP ); r( wxSTC_H_ASPAT ); r( wxSTC_H_CDATA ); r( wxSTC_H_QUESTION ); r( wxSTC_H_VALUE ); r( wxSTC_H_XCCOMMENT ); r( wxSTC_H_SGML_DEFAULT ); r( wxSTC_H_SGML_COMMAND ); r( wxSTC_H_SGML_1ST_PARAM ); r( wxSTC_H_SGML_DOUBLESTRING ); r( wxSTC_H_SGML_SIMPLESTRING ); r( wxSTC_H_SGML_ERROR ); r( wxSTC_H_SGML_SPECIAL ); r( wxSTC_H_SGML_ENTITY ); r( wxSTC_H_SGML_COMMENT ); r( wxSTC_H_SGML_1ST_PARAM_COMMENT ); r( wxSTC_H_SGML_BLOCK_DEFAULT ); r( wxSTC_HJ_START ); r( wxSTC_HJ_DEFAULT ); r( wxSTC_HJ_COMMENT ); r( wxSTC_HJ_COMMENTLINE ); r( wxSTC_HJ_COMMENTDOC ); r( wxSTC_HJ_NUMBER ); r( wxSTC_HJ_WORD ); r( wxSTC_HJ_KEYWORD ); r( wxSTC_HJ_DOUBLESTRING ); r( wxSTC_HJ_SINGLESTRING ); r( wxSTC_HJ_SYMBOLS ); r( wxSTC_HJ_STRINGEOL ); r( wxSTC_HJ_REGEX ); r( wxSTC_HJA_START ); r( wxSTC_HJA_DEFAULT ); r( wxSTC_HJA_COMMENT ); r( wxSTC_HJA_COMMENTLINE ); r( wxSTC_HJA_COMMENTDOC ); r( wxSTC_HJA_NUMBER ); r( wxSTC_HJA_WORD ); r( wxSTC_HJA_KEYWORD ); r( wxSTC_HJA_DOUBLESTRING ); r( wxSTC_HJA_SINGLESTRING ); r( wxSTC_HJA_SYMBOLS ); r( wxSTC_HJA_STRINGEOL ); r( wxSTC_HJA_REGEX ); r( wxSTC_HB_START ); r( wxSTC_HB_DEFAULT ); r( wxSTC_HB_COMMENTLINE ); r( wxSTC_HB_NUMBER ); r( wxSTC_HB_WORD ); r( wxSTC_HB_STRING ); r( wxSTC_HB_IDENTIFIER ); r( wxSTC_HB_STRINGEOL ); r( wxSTC_HBA_START ); r( wxSTC_HBA_DEFAULT ); r( wxSTC_HBA_COMMENTLINE ); r( wxSTC_HBA_NUMBER ); r( wxSTC_HBA_WORD ); r( wxSTC_HBA_STRING ); r( wxSTC_HBA_IDENTIFIER ); r( wxSTC_HBA_STRINGEOL ); r( wxSTC_HP_START ); r( wxSTC_HP_DEFAULT ); r( wxSTC_HP_COMMENTLINE ); r( wxSTC_HP_NUMBER ); r( wxSTC_HP_STRING ); r( wxSTC_HP_CHARACTER ); r( wxSTC_HP_WORD ); r( wxSTC_HP_TRIPLE ); r( wxSTC_HP_TRIPLEDOUBLE ); r( wxSTC_HP_CLASSNAME ); r( wxSTC_HP_DEFNAME ); r( wxSTC_HP_OPERATOR ); r( wxSTC_HP_IDENTIFIER ); r( wxSTC_HPA_START ); r( wxSTC_HPA_DEFAULT ); r( wxSTC_HPA_COMMENTLINE ); r( wxSTC_HPA_NUMBER ); r( wxSTC_HPA_STRING ); r( wxSTC_HPA_CHARACTER ); r( wxSTC_HPA_WORD ); r( wxSTC_HPA_TRIPLE ); r( wxSTC_HPA_TRIPLEDOUBLE ); r( wxSTC_HPA_CLASSNAME ); r( wxSTC_HPA_DEFNAME ); r( wxSTC_HPA_OPERATOR ); r( wxSTC_HPA_IDENTIFIER ); r( wxSTC_HPHP_DEFAULT ); r( wxSTC_HPHP_HSTRING ); r( wxSTC_HPHP_SIMPLESTRING ); r( wxSTC_HPHP_WORD ); r( wxSTC_HPHP_NUMBER ); r( wxSTC_HPHP_VARIABLE ); r( wxSTC_HPHP_COMMENT ); r( wxSTC_HPHP_COMMENTLINE ); r( wxSTC_HPHP_HSTRING_VARIABLE ); r( wxSTC_HPHP_OPERATOR ); r( wxSTC_HPHP_COMPLEX_VARIABLE ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_HA_CAPITAL ); r( wxSTC_HA_CHARACTER ); r( wxSTC_HA_CLASS ); r( wxSTC_HA_COMMENTBLOCK ); r( wxSTC_HA_COMMENTBLOCK2 ); r( wxSTC_HA_COMMENTBLOCK3 ); r( wxSTC_HA_COMMENTLINE ); r( wxSTC_HA_DATA ); r( wxSTC_HA_DEFAULT ); r( wxSTC_HA_IDENTIFIER ); r( wxSTC_HA_IMPORT ); r( wxSTC_HA_INSTANCE ); r( wxSTC_HA_KEYWORD ); r( wxSTC_HA_MODULE ); r( wxSTC_HA_NUMBER ); r( wxSTC_HA_OPERATOR ); r( wxSTC_HA_STRING ); #endif break; case 'I': r( wxSTC_INDIC_MAX ); r( wxSTC_INDIC_PLAIN ); r( wxSTC_INDIC_SQUIGGLE ); r( wxSTC_INDIC_TT ); r( wxSTC_INDIC_DIAGONAL ); r( wxSTC_INDIC_STRIKE ); r( wxSTC_INDIC0_MASK ); r( wxSTC_INDIC1_MASK ); r( wxSTC_INDIC2_MASK ); r( wxSTC_INDICS_MASK ); r( wxSTC_INDIC_BOX ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_INDIC_CONTAINER ); #endif r( wxSTC_INDIC_HIDDEN ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_INDIC_ROUNDBOX ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_INDIC_STRAIGHTBOX ); r( wxSTC_INDIC_DASH ); r( wxSTC_INDIC_DOTS ); r( wxSTC_INDIC_SQUIGGLELOW ); r( wxSTC_INDIC_DOTBOX ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_INNO_COMMENT ); r( wxSTC_INNO_COMMENT_PASCAL ); r( wxSTC_INNO_DEFAULT ); r( wxSTC_INNO_IDENTIFIER ); r( wxSTC_INNO_KEYWORD ); r( wxSTC_INNO_KEYWORD_PASCAL ); r( wxSTC_INNO_KEYWORD_USER ); r( wxSTC_INNO_PARAMETER ); r( wxSTC_INNO_PREPROC ); #if WXPERL_W_VERSION_LT( 2, 9, 1 ) r( wxSTC_INNO_PREPROC_INLINE ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_INNO_INLINE_EXPANSION ); #endif r( wxSTC_INNO_SECTION ); r( wxSTC_INNO_STRING_DOUBLE ); r( wxSTC_INNO_STRING_SINGLE ); r( wxSTC_INVALID_POSITION ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_IV_LOOKBOTH ); r( wxSTC_IV_LOOKFORWARD ); r( wxSTC_IV_NONE ); r( wxSTC_IV_REAL ); #endif break; case 'K': r( wxSTC_KEY_DOWN ); r( wxSTC_KEY_UP ); r( wxSTC_KEY_LEFT ); r( wxSTC_KEY_RIGHT ); r( wxSTC_KEY_HOME ); r( wxSTC_KEY_END ); r( wxSTC_KEY_PRIOR ); r( wxSTC_KEY_NEXT ); r( wxSTC_KEY_DELETE ); r( wxSTC_KEY_INSERT ); r( wxSTC_KEY_ESCAPE ); r( wxSTC_KEY_BACK ); r( wxSTC_KEY_TAB ); r( wxSTC_KEY_RETURN ); r( wxSTC_KEY_ADD ); r( wxSTC_KEY_SUBTRACT ); r( wxSTC_KEY_DIVIDE ); r( wxSTC_KEYWORDSET_MAX ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_KEY_MENU ); r( wxSTC_KEY_RWIN ); r( wxSTC_KEY_WIN ); #endif r( wxSTC_KIX_COMMENT ); r( wxSTC_KIX_DEFAULT ); r( wxSTC_KIX_FUNCTIONS ); r( wxSTC_KIX_IDENTIFIER ); r( wxSTC_KIX_KEYWORD ); r( wxSTC_KIX_MACRO ); r( wxSTC_KIX_NUMBER ); r( wxSTC_KIX_OPERATOR ); r( wxSTC_KIX_STRING1 ); r( wxSTC_KIX_STRING2 ); r( wxSTC_KIX_VAR ); break; case 'L': #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_L_TAG2 ); r( wxSTC_L_MATH2 ); r( wxSTC_L_COMMENT2 ); r( wxSTC_L_VERBATIM ); r( wxSTC_L_SHORTCMD ); r( wxSTC_L_SPECIAL ); r( wxSTC_L_CMDOPT ); r( wxSTC_L_ERROR ); r( wxSTC_LUA_LABEL ); r( wxSTC_LEX_TXT2TAGS ); r( wxSTC_LEX_A68K ); r( wxSTC_LEX_MODULA ); r( wxSTC_LEX_COFFEESCRIPT ); r( wxSTC_LEX_TCMD ); r( wxSTC_LEX_AVS ); r( wxSTC_LEX_ECL ); r( wxSTC_LEX_OSCRIPT ); r( wxSTC_LEX_VISUALPROLOG ); #endif r( wxSTC_LEX_ADA ); r( wxSTC_LEX_ASM ); #ifdef wxSTC_LEX_ASP r( wxSTC_LEX_ASP ); #endif r( wxSTC_LEX_AUTOMATIC ); r( wxSTC_LEX_AVE ); r( wxSTC_LEX_BAAN ); r( wxSTC_LEX_BATCH ); r( wxSTC_LEX_BULLANT ); r( wxSTC_LEX_CONF ); r( wxSTC_LEX_CONTAINER ); r( wxSTC_LEX_CPP ); r( wxSTC_LEX_CSS ); r( wxSTC_LEX_DIFF ); r( wxSTC_LEX_EIFFEL ); r( wxSTC_LEX_EIFFELKW ); r( wxSTC_LEX_ERRORLIST ); #if WXPERL_W_VERSION_GE( 2, 5, 2 ) r( wxSTC_LEX_FORTH ); #endif r( wxSTC_LEX_FORTRAN ); r( wxSTC_LEX_HTML ); r( wxSTC_LEX_LATEX ); r( wxSTC_LEX_LISP ); r( wxSTC_LEX_LUA ); r( wxSTC_LEX_MAKEFILE ); r( wxSTC_LEX_MATLAB ); r( wxSTC_LEX_NNCRONTAB ); r( wxSTC_LEX_NULL ); r( wxSTC_LEX_NSIS ); r( wxSTC_LEX_PASCAL ); r( wxSTC_LEX_PERL ); #ifdef wxSTC_LEX_PHP r( wxSTC_LEX_PHP ); #endif #ifdef wxSTC_LEX_PHPSCRIPT r( wxSTC_LEX_PHPSCRIPT ); #endif r( wxSTC_LEX_PROPERTIES ); r( wxSTC_LEX_PS ); r( wxSTC_LEX_PYTHON ); r( wxSTC_LEX_RUBY ); r( wxSTC_LEX_SCRIPTOL ); r( wxSTC_LEX_SQL ); r( wxSTC_LEX_TCL ); #if WXPERL_W_VERSION_GE( 2, 5, 2 ) r( wxSTC_LEX_YAML ); r( wxSTC_LEX_TEX ); #endif r( wxSTC_LEX_VB ); r( wxSTC_LEX_VBSCRIPT ); r( wxSTC_LEX_XCODE ); r( wxSTC_LEX_XML ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_LEX_ABAQUS ); #endif r( wxSTC_LEX_APDL ); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxSTC_LEX_ASN1 ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_LEX_ASYMPTOTE ); #endif r( wxSTC_LEX_AU3 ); r( wxSTC_LEX_BASH ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_LEX_BLITZBASIC ); r( wxSTC_LEX_CAML ); r( wxSTC_LEX_CLW ); #endif r( wxSTC_LEX_CLWNOCASE ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_LEX_CMAKE ); #endif r( wxSTC_LEX_CPPNOCASE ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_LEX_CSOUND ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_LEX_D ); #endif r( wxSTC_LEX_ERLANG ); r( wxSTC_LEX_ESCRIPT ); r( wxSTC_LEX_F77 ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_LEX_FLAGSHIP ); r( wxSTC_LEX_FREEBASIC ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_LEX_GAP ); #endif r( wxSTC_LEX_GUI4CLI ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_LEX_HASKELL ); r( wxSTC_LEX_INNOSETUP ); #endif r( wxSTC_LEX_KIX ); r( wxSTC_LEX_LOT ); r( wxSTC_LEX_LOUT ); r( wxSTC_LEX_METAPOST ); r( wxSTC_LEX_MMIXAL ); r( wxSTC_LEX_MSSQL ); r( wxSTC_LEX_OCTAVE ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_LEX_OPAL ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_LEX_PLM ); #endif r( wxSTC_LEX_POV ); r( wxSTC_LEX_POWERBASIC ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_LEX_PROGRESS ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_LEX_PUREBASIC ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_LEX_R ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_LEX_REBOL ); r( wxSTC_LEX_SMALLTALK ); #endif r( wxSTC_LEX_SPECMAN ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_LEX_SPICE ); r( wxSTC_LEX_TADS3 ); #endif r( wxSTC_LEX_VERILOG ); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxSTC_LEX_VHDL ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_LEX_MAGIK ); r( wxSTC_LEX_POWERSHELL ); r( wxSTC_LEX_MYSQL ); r( wxSTC_LEX_PO ); r( wxSTC_LEX_TAL ); r( wxSTC_LEX_COBOL ); r( wxSTC_LEX_TACL ); r( wxSTC_LEX_SORCUS ); r( wxSTC_LEX_POWERPRO ); r( wxSTC_LEX_NIMROD ); r( wxSTC_LEX_SML ); r( wxSTC_LEX_MARKDOWN ); #endif r( wxSTC_LASTSTEPINUNDOREDO ); r( wxSTC_L_DEFAULT ); r( wxSTC_L_COMMAND ); r( wxSTC_L_TAG ); r( wxSTC_L_MATH ); r( wxSTC_L_COMMENT ); r( wxSTC_LUA_DEFAULT ); r( wxSTC_LUA_COMMENT ); r( wxSTC_LUA_COMMENTLINE ); r( wxSTC_LUA_COMMENTDOC ); r( wxSTC_LUA_NUMBER ); r( wxSTC_LUA_WORD ); r( wxSTC_LUA_STRING ); r( wxSTC_LUA_CHARACTER ); r( wxSTC_LUA_LITERALSTRING ); r( wxSTC_LUA_PREPROCESSOR ); r( wxSTC_LUA_OPERATOR ); r( wxSTC_LUA_IDENTIFIER ); r( wxSTC_LUA_STRINGEOL ); r( wxSTC_LUA_WORD2 ); r( wxSTC_LUA_WORD3 ); r( wxSTC_LUA_WORD4 ); r( wxSTC_LUA_WORD5 ); r( wxSTC_LUA_WORD6 ); r( wxSTC_LISP_DEFAULT ); r( wxSTC_LISP_COMMENT ); r( wxSTC_LISP_NUMBER ); r( wxSTC_LISP_KEYWORD ); r( wxSTC_LISP_STRING ); r( wxSTC_LISP_STRINGEOL ); r( wxSTC_LISP_IDENTIFIER ); r( wxSTC_LISP_OPERATOR ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_LISP_KEYWORD_KW ); r( wxSTC_LISP_MULTI_COMMENT ); r( wxSTC_LISP_SPECIAL ); r( wxSTC_LISP_SYMBOL ); #endif r( wxSTC_LEXER_START ); r( wxSTC_LOT_ABORT ); r( wxSTC_LOT_BREAK ); r( wxSTC_LOT_DEFAULT ); r( wxSTC_LOT_FAIL ); r( wxSTC_LOT_HEADER ); r( wxSTC_LOT_PASS ); r( wxSTC_LOT_SET ); r( wxSTC_LOUT_COMMENT ); r( wxSTC_LOUT_DEFAULT ); r( wxSTC_LOUT_IDENTIFIER ); r( wxSTC_LOUT_NUMBER ); r( wxSTC_LOUT_OPERATOR ); r( wxSTC_LOUT_STRING ); r( wxSTC_LOUT_STRINGEOL ); r( wxSTC_LOUT_WORD ); r( wxSTC_LOUT_WORD2 ); r( wxSTC_LOUT_WORD3 ); r( wxSTC_LOUT_WORD4 ); r( wxSTC_LUA_WORD7 ); r( wxSTC_LUA_WORD8 ); break; case 'M': #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_MARGINOPTION_NONE ); r( wxSTC_MARGINOPTION_SUBLINESELECT ); r( wxSTC_MARK_RGBAIMAGE ); r( wxSTC_MOD_LEXERSTATE ); r( wxSTC_MODEVENTMASKALL ); r( wxSTC_MODULA_DEFAULT ); r( wxSTC_MODULA_COMMENT ); r( wxSTC_MODULA_DOXYCOMM ); r( wxSTC_MODULA_DOXYKEY ); r( wxSTC_MODULA_KEYWORD ); r( wxSTC_MODULA_RESERVED ); r( wxSTC_MODULA_NUMBER ); r( wxSTC_MODULA_BASENUM ); r( wxSTC_MODULA_FLOAT ); r( wxSTC_MODULA_STRING ); r( wxSTC_MODULA_STRSPEC ); r( wxSTC_MODULA_CHAR ); r( wxSTC_MODULA_CHARSPEC ); r( wxSTC_MODULA_PROC ); r( wxSTC_MODULA_PRAGMA ); r( wxSTC_MODULA_PRGKEY ); r( wxSTC_MODULA_OPERATOR ); r( wxSTC_MODULA_BADSTR ); r( wxSTC_MULTIPASTE_ONCE ); r( wxSTC_MULTIPASTE_EACH ); #endif r( wxSTC_MARKER_MAX ); r( wxSTC_MARK_CIRCLE ); r( wxSTC_MARK_ROUNDRECT ); r( wxSTC_MARK_ARROW ); r( wxSTC_MARK_SMALLRECT ); r( wxSTC_MARK_SHORTARROW ); r( wxSTC_MARK_EMPTY ); r( wxSTC_MARK_ARROWDOWN ); r( wxSTC_MARK_MINUS ); r( wxSTC_MARK_PLUS ); r( wxSTC_MARK_VLINE ); r( wxSTC_MARK_LCORNER ); r( wxSTC_MARK_TCORNER ); r( wxSTC_MARK_BOXPLUS ); r( wxSTC_MARK_BOXPLUSCONNECTED ); r( wxSTC_MARK_BOXMINUS ); r( wxSTC_MARK_BOXMINUSCONNECTED ); r( wxSTC_MARK_LCORNERCURVE ); r( wxSTC_MARK_TCORNERCURVE ); r( wxSTC_MARK_CIRCLEPLUS ); r( wxSTC_MARK_CIRCLEPLUSCONNECTED ); r( wxSTC_MARK_CIRCLEMINUS ); r( wxSTC_MARK_CIRCLEMINUSCONNECTED ); r( wxSTC_MARK_BACKGROUND ); r( wxSTC_MARK_DOTDOTDOT ); r( wxSTC_MARK_ARROWS ); r( wxSTC_MARK_CHARACTER ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_MARK_FULLRECT ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_MARK_LEFTRECT ); r( wxSTC_MARK_AVAILABLE ); r( wxSTC_MARK_UNDERLINE ); r( wxSTC_MARGIN_TEXT ); r( wxSTC_MARGIN_RTEXT ); r( wxSTC_MOD_CHANGEMARGIN ); r( wxSTC_MOD_CHANGEANNOTATION ); r( wxSTC_MOD_CONTAINER ); r( wxSTC_MAGIK_DEFAULT ); r( wxSTC_MAGIK_COMMENT ); r( wxSTC_MAGIK_HYPER_COMMENT ); r( wxSTC_MAGIK_STRING ); r( wxSTC_MAGIK_CHARACTER ); r( wxSTC_MAGIK_NUMBER ); r( wxSTC_MAGIK_IDENTIFIER ); r( wxSTC_MAGIK_OPERATOR ); r( wxSTC_MAGIK_FLOW ); r( wxSTC_MAGIK_CONTAINER ); r( wxSTC_MAGIK_BRACKET_BLOCK ); r( wxSTC_MAGIK_BRACE_BLOCK ); r( wxSTC_MAGIK_SQBRACKET_BLOCK ); r( wxSTC_MAGIK_UNKNOWN_KEYWORD ); r( wxSTC_MAGIK_KEYWORD ); r( wxSTC_MAGIK_PRAGMA ); r( wxSTC_MAGIK_SYMBOL ); r( wxSTC_MYSQL_DEFAULT ); r( wxSTC_MYSQL_COMMENT ); r( wxSTC_MYSQL_COMMENTLINE ); r( wxSTC_MYSQL_VARIABLE ); r( wxSTC_MYSQL_SYSTEMVARIABLE ); r( wxSTC_MYSQL_KNOWNSYSTEMVARIABLE ); r( wxSTC_MYSQL_NUMBER ); r( wxSTC_MYSQL_MAJORKEYWORD ); r( wxSTC_MYSQL_KEYWORD ); r( wxSTC_MYSQL_DATABASEOBJECT ); r( wxSTC_MYSQL_PROCEDUREKEYWORD ); r( wxSTC_MYSQL_STRING ); r( wxSTC_MYSQL_SQSTRING ); r( wxSTC_MYSQL_DQSTRING ); r( wxSTC_MYSQL_OPERATOR ); r( wxSTC_MYSQL_FUNCTION ); r( wxSTC_MYSQL_IDENTIFIER ); r( wxSTC_MYSQL_QUOTEDIDENTIFIER ); r( wxSTC_MYSQL_USER1 ); r( wxSTC_MYSQL_USER2 ); r( wxSTC_MYSQL_USER3 ); r( wxSTC_MYSQL_HIDDENCOMMAND ); r( wxSTC_MARKDOWN_DEFAULT ); r( wxSTC_MARKDOWN_LINE_BEGIN ); r( wxSTC_MARKDOWN_STRONG1 ); r( wxSTC_MARKDOWN_STRONG2 ); r( wxSTC_MARKDOWN_EM1 ); r( wxSTC_MARKDOWN_EM2 ); r( wxSTC_MARKDOWN_HEADER1 ); r( wxSTC_MARKDOWN_HEADER2 ); r( wxSTC_MARKDOWN_HEADER3 ); r( wxSTC_MARKDOWN_HEADER4 ); r( wxSTC_MARKDOWN_HEADER5 ); r( wxSTC_MARKDOWN_HEADER6 ); r( wxSTC_MARKDOWN_PRECHAR ); r( wxSTC_MARKDOWN_ULIST_ITEM ); r( wxSTC_MARKDOWN_OLIST_ITEM ); r( wxSTC_MARKDOWN_BLOCKQUOTE ); r( wxSTC_MARKDOWN_STRIKEOUT ); r( wxSTC_MARKDOWN_HRULE ); r( wxSTC_MARKDOWN_LINK ); r( wxSTC_MARKDOWN_CODE ); r( wxSTC_MARKDOWN_CODE2 ); r( wxSTC_MARKDOWN_CODEBK ); #endif r( wxSTC_MARK_PIXMAP ); r( wxSTC_MARKNUM_FOLDEREND ); r( wxSTC_MARKNUM_FOLDEROPENMID ); r( wxSTC_MARKNUM_FOLDERMIDTAIL ); r( wxSTC_MARKNUM_FOLDERTAIL ); r( wxSTC_MARKNUM_FOLDERSUB ); r( wxSTC_MARKNUM_FOLDER ); r( wxSTC_MARKNUM_FOLDEROPEN ); r( wxSTC_MASK_FOLDERS ); r( wxSTC_MARGIN_SYMBOL ); r( wxSTC_MARGIN_NUMBER ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_MARGIN_BACK ); r( wxSTC_MARGIN_FORE ); #endif r( wxSTC_MOD_INSERTTEXT ); r( wxSTC_MOD_DELETETEXT ); r( wxSTC_MOD_CHANGESTYLE ); r( wxSTC_MOD_CHANGEFOLD ); r( wxSTC_MOD_CHANGEMARKER ); r( wxSTC_MOD_BEFOREINSERT ); r( wxSTC_MOD_BEFOREDELETE ); r( wxSTC_MODEVENTMASKALL ); r( wxSTC_MAKE_DEFAULT ); r( wxSTC_MAKE_COMMENT ); r( wxSTC_MAKE_PREPROCESSOR ); r( wxSTC_MAKE_IDENTIFIER ); r( wxSTC_MAKE_OPERATOR ); r( wxSTC_MAKE_TARGET ); r( wxSTC_MAKE_IDEOL ); r( wxSTC_MATLAB_DEFAULT ); r( wxSTC_MATLAB_COMMENT ); r( wxSTC_MATLAB_COMMAND ); r( wxSTC_MATLAB_NUMBER ); r( wxSTC_MATLAB_KEYWORD ); r( wxSTC_MATLAB_STRING ); r( wxSTC_MATLAB_OPERATOR ); r( wxSTC_MATLAB_IDENTIFIER ); r( wxSTC_MATLAB_DOUBLEQUOTESTRING ); r( wxSTC_METAPOST_COMMAND ); r( wxSTC_METAPOST_DEFAULT ); r( wxSTC_METAPOST_EXTRA ); r( wxSTC_METAPOST_GROUP ); r( wxSTC_METAPOST_SPECIAL ); r( wxSTC_METAPOST_SYMBOL ); r( wxSTC_METAPOST_TEXT ); r( wxSTC_MMIXAL_CHAR ); r( wxSTC_MMIXAL_COMMENT ); r( wxSTC_MMIXAL_HEX ); r( wxSTC_MMIXAL_INCLUDE ); r( wxSTC_MMIXAL_LABEL ); r( wxSTC_MMIXAL_LEADWS ); r( wxSTC_MMIXAL_NUMBER ); r( wxSTC_MMIXAL_OPCODE ); r( wxSTC_MMIXAL_OPCODE_POST ); r( wxSTC_MMIXAL_OPCODE_PRE ); r( wxSTC_MMIXAL_OPCODE_UNKNOWN ); r( wxSTC_MMIXAL_OPCODE_VALID ); r( wxSTC_MMIXAL_OPERANDS ); r( wxSTC_MMIXAL_OPERATOR ); r( wxSTC_MMIXAL_REF ); r( wxSTC_MMIXAL_REGISTER ); r( wxSTC_MMIXAL_STRING ); r( wxSTC_MMIXAL_SYMBOL ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_MOD_CHANGEINDICATOR ); r( wxSTC_MOD_CHANGELINESTATE ); #endif r( wxSTC_MSSQL_COLUMN_NAME ); r( wxSTC_MSSQL_COLUMN_NAME_2 ); r( wxSTC_MSSQL_COMMENT ); r( wxSTC_MSSQL_DATATYPE ); r( wxSTC_MSSQL_DEFAULT ); r( wxSTC_MSSQL_DEFAULT_PREF_DATATYPE ); r( wxSTC_MSSQL_FUNCTION ); r( wxSTC_MSSQL_GLOBAL_VARIABLE ); r( wxSTC_MSSQL_IDENTIFIER ); r( wxSTC_MSSQL_LINE_COMMENT ); r( wxSTC_MSSQL_NUMBER ); r( wxSTC_MSSQL_OPERATOR ); r( wxSTC_MSSQL_STATEMENT ); r( wxSTC_MSSQL_STORED_PROCEDURE ); r( wxSTC_MSSQL_STRING ); r( wxSTC_MSSQL_SYSTABLE ); r( wxSTC_MSSQL_VARIABLE ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_MULTILINEUNDOREDO ); r( wxSTC_MULTISTEPUNDOREDO ); #endif break; case 'N': r( wxSTC_NNCRONTAB_DEFAULT ); r( wxSTC_NNCRONTAB_COMMENT ); r( wxSTC_NNCRONTAB_TASK ); r( wxSTC_NNCRONTAB_SECTION ); r( wxSTC_NNCRONTAB_KEYWORD ); r( wxSTC_NNCRONTAB_MODIFIER ); r( wxSTC_NNCRONTAB_ASTERISK ); r( wxSTC_NNCRONTAB_NUMBER ); r( wxSTC_NNCRONTAB_STRING ); r( wxSTC_NNCRONTAB_ENVIRONMENT ); r( wxSTC_NNCRONTAB_IDENTIFIER ); r( wxSTC_NSIS_DEFAULT ); r( wxSTC_NSIS_COMMENT ); r( wxSTC_NSIS_STRINGDQ ); r( wxSTC_NSIS_STRINGLQ ); r( wxSTC_NSIS_STRINGRQ ); r( wxSTC_NSIS_FUNCTION ); r( wxSTC_NSIS_VARIABLE ); r( wxSTC_NSIS_LABEL ); r( wxSTC_NSIS_USERDEFINED ); r( wxSTC_NSIS_SECTIONDEF ); r( wxSTC_NSIS_SUBSECTIONDEF ); r( wxSTC_NSIS_IFDEFINEDEF ); r( wxSTC_NSIS_MACRODEF ); r( wxSTC_NSIS_STRINGVAR ); r( wxSTC_NSIS_NUMBER ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_NSIS_COMMENTBOX ); r( wxSTC_NSIS_FUNCTIONDEF ); r( wxSTC_NSIS_PAGEEX ); r( wxSTC_NSIS_SECTIONGROUP ); #endif break; case 'O': #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_OSCRIPT_DEFAULT ); r( wxSTC_OSCRIPT_LINE_COMMENT ); r( wxSTC_OSCRIPT_BLOCK_COMMENT ); r( wxSTC_OSCRIPT_DOC_COMMENT ); r( wxSTC_OSCRIPT_PREPROCESSOR ); r( wxSTC_OSCRIPT_NUMBER ); r( wxSTC_OSCRIPT_SINGLEQUOTE_STRING ); r( wxSTC_OSCRIPT_DOUBLEQUOTE_STRING ); r( wxSTC_OSCRIPT_CONSTANT ); r( wxSTC_OSCRIPT_IDENTIFIER ); r( wxSTC_OSCRIPT_GLOBAL ); r( wxSTC_OSCRIPT_KEYWORD ); r( wxSTC_OSCRIPT_OPERATOR ); r( wxSTC_OSCRIPT_LABEL ); r( wxSTC_OSCRIPT_TYPE ); r( wxSTC_OSCRIPT_FUNCTION ); r( wxSTC_OSCRIPT_OBJECT ); r( wxSTC_OSCRIPT_PROPERTY ); r( wxSTC_OSCRIPT_METHOD ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_OPAL_BOOL_CONST ); r( wxSTC_OPAL_COMMENT_BLOCK ); r( wxSTC_OPAL_COMMENT_LINE ); r( wxSTC_OPAL_DEFAULT ); r( wxSTC_OPAL_INTEGER ); r( wxSTC_OPAL_KEYWORD ); r( wxSTC_OPAL_PAR ); r( wxSTC_OPAL_SORT ); r( wxSTC_OPAL_SPACE ); r( wxSTC_OPAL_STRING ); #endif r( wxSTC_OPTIONAL_START ); break; case 'P': r( wxSTC_PRINT_NORMAL ); r( wxSTC_PRINT_INVERTLIGHT ); r( wxSTC_PRINT_BLACKONWHITE ); r( wxSTC_PRINT_COLOURONWHITE ); r( wxSTC_PRINT_COLOURONWHITEDEFAULTBG ); r( wxSTC_PERFORMED_USER ); r( wxSTC_PERFORMED_UNDO ); r( wxSTC_PERFORMED_REDO ); r( wxSTC_P_DEFAULT ); r( wxSTC_P_COMMENTLINE ); r( wxSTC_P_NUMBER ); r( wxSTC_P_STRING ); r( wxSTC_P_CHARACTER ); r( wxSTC_P_WORD ); r( wxSTC_P_TRIPLE ); r( wxSTC_P_TRIPLEDOUBLE ); r( wxSTC_P_CLASSNAME ); r( wxSTC_P_DEFNAME ); r( wxSTC_P_OPERATOR ); r( wxSTC_P_IDENTIFIER ); r( wxSTC_P_COMMENTBLOCK ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_P_STRINGEOL ); r( wxSTC_P_DECORATOR ); r( wxSTC_P_WORD2 ); #endif r( wxSTC_PL_DEFAULT ); r( wxSTC_PL_ERROR ); r( wxSTC_PL_COMMENTLINE ); r( wxSTC_PL_POD ); r( wxSTC_PL_NUMBER ); r( wxSTC_PL_WORD ); r( wxSTC_PL_STRING ); r( wxSTC_PL_CHARACTER ); r( wxSTC_PL_PUNCTUATION ); r( wxSTC_PL_PREPROCESSOR ); r( wxSTC_PL_OPERATOR ); r( wxSTC_PL_IDENTIFIER ); r( wxSTC_PL_SCALAR ); r( wxSTC_PL_ARRAY ); r( wxSTC_PL_HASH ); r( wxSTC_PL_SYMBOLTABLE ); r( wxSTC_PL_REGEX ); r( wxSTC_PL_REGSUBST ); r( wxSTC_PL_LONGQUOTE ); r( wxSTC_PL_BACKTICKS ); r( wxSTC_PL_DATASECTION ); r( wxSTC_PL_HERE_DELIM ); r( wxSTC_PL_HERE_Q ); r( wxSTC_PL_HERE_QQ ); r( wxSTC_PL_HERE_QX ); r( wxSTC_PL_STRING_Q ); r( wxSTC_PL_STRING_QQ ); r( wxSTC_PL_STRING_QX ); r( wxSTC_PL_STRING_QR ); r( wxSTC_PL_STRING_QW ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_PL_FORMAT ); r( wxSTC_PL_FORMAT_IDENT ); r( wxSTC_PL_SUB_PROTOTYPE ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_PL_STRING_VAR ); r( wxSTC_PL_XLAT ); r( wxSTC_PL_REGEX_VAR ); r( wxSTC_PL_REGSUBST_VAR ); r( wxSTC_PL_BACKTICKS_VAR ); r( wxSTC_PL_HERE_QQ_VAR ); r( wxSTC_PL_HERE_QX_VAR ); r( wxSTC_PL_STRING_QQ_VAR ); r( wxSTC_PL_STRING_QX_VAR ); r( wxSTC_PL_STRING_QR_VAR ); r( wxSTC_POWERSHELL_FUNCTION ); r( wxSTC_POWERSHELL_USER1 ); r( wxSTC_POWERSHELL_COMMENTSTREAM ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_PL_POD_VERB ); r( wxSTC_PL_VARIABLE_INDEXER ); #endif r( wxSTC_PROPS_DEFAULT ); r( wxSTC_PROPS_COMMENT ); r( wxSTC_PROPS_SECTION ); r( wxSTC_PROPS_ASSIGNMENT ); r( wxSTC_PROPS_DEFVAL ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_PROPS_KEY ); #endif r( wxSTC_PS_DEFAULT ); r( wxSTC_PS_COMMENT ); r( wxSTC_PS_DSC_COMMENT ); r( wxSTC_PS_DSC_VALUE ); r( wxSTC_PS_NUMBER ); r( wxSTC_PS_NAME ); r( wxSTC_PS_KEYWORD ); r( wxSTC_PS_LITERAL ); r( wxSTC_PS_IMMEVAL ); r( wxSTC_PS_PAREN_ARRAY ); r( wxSTC_PS_PAREN_DICT ); r( wxSTC_PS_PAREN_PROC ); r( wxSTC_PS_TEXT ); r( wxSTC_PS_HEXSTRING ); r( wxSTC_PS_BASE85STRING ); r( wxSTC_PS_BADSTRINGCHAR ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_PLM_COMMENT ); r( wxSTC_PLM_CONTROL ); r( wxSTC_PLM_DEFAULT ); r( wxSTC_PLM_IDENTIFIER ); r( wxSTC_PLM_KEYWORD ); r( wxSTC_PLM_NUMBER ); r( wxSTC_PLM_OPERATOR ); r( wxSTC_PLM_STRING ); #endif r( wxSTC_POV_BADDIRECTIVE ); r( wxSTC_POV_COMMENT ); r( wxSTC_POV_COMMENTLINE ); r( wxSTC_POV_DEFAULT ); r( wxSTC_POV_DIRECTIVE ); r( wxSTC_POV_IDENTIFIER ); r( wxSTC_POV_NUMBER ); r( wxSTC_POV_OPERATOR ); r( wxSTC_POV_STRING ); r( wxSTC_POV_STRINGEOL ); r( wxSTC_POV_WORD2 ); r( wxSTC_POV_WORD3 ); r( wxSTC_POV_WORD4 ); r( wxSTC_POV_WORD5 ); r( wxSTC_POV_WORD6 ); r( wxSTC_POV_WORD7 ); r( wxSTC_POV_WORD8 ); #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_POWERSHELL_DEFAULT ); r( wxSTC_POWERSHELL_COMMENT ); r( wxSTC_POWERSHELL_STRING ); r( wxSTC_POWERSHELL_CHARACTER ); r( wxSTC_POWERSHELL_NUMBER ); r( wxSTC_POWERSHELL_VARIABLE ); r( wxSTC_POWERSHELL_OPERATOR ); r( wxSTC_POWERSHELL_IDENTIFIER ); r( wxSTC_POWERSHELL_KEYWORD ); r( wxSTC_POWERSHELL_CMDLET ); r( wxSTC_POWERSHELL_ALIAS ); r( wxSTC_PO_DEFAULT ); r( wxSTC_PO_COMMENT ); r( wxSTC_PO_MSGID ); r( wxSTC_PO_MSGID_TEXT ); r( wxSTC_PO_MSGSTR ); r( wxSTC_PO_MSGSTR_TEXT ); r( wxSTC_PO_MSGCTXT ); r( wxSTC_PO_MSGCTXT_TEXT ); r( wxSTC_PO_FUZZY ); r( wxSTC_PAS_DEFAULT ); r( wxSTC_PAS_IDENTIFIER ); r( wxSTC_PAS_COMMENT ); r( wxSTC_PAS_COMMENT2 ); r( wxSTC_PAS_COMMENTLINE ); r( wxSTC_PAS_PREPROCESSOR ); r( wxSTC_PAS_PREPROCESSOR2 ); r( wxSTC_PAS_NUMBER ); r( wxSTC_PAS_HEXNUMBER ); r( wxSTC_PAS_WORD ); r( wxSTC_PAS_STRING ); r( wxSTC_PAS_STRINGEOL ); r( wxSTC_PAS_CHARACTER ); r( wxSTC_PAS_OPERATOR ); r( wxSTC_PAS_ASM ); r( wxSTC_POWERPRO_DEFAULT ); r( wxSTC_POWERPRO_COMMENTBLOCK ); r( wxSTC_POWERPRO_COMMENTLINE ); r( wxSTC_POWERPRO_NUMBER ); r( wxSTC_POWERPRO_WORD ); r( wxSTC_POWERPRO_WORD2 ); r( wxSTC_POWERPRO_WORD3 ); r( wxSTC_POWERPRO_WORD4 ); r( wxSTC_POWERPRO_DOUBLEQUOTEDSTRING ); r( wxSTC_POWERPRO_SINGLEQUOTEDSTRING ); r( wxSTC_POWERPRO_LINECONTINUE ); r( wxSTC_POWERPRO_OPERATOR ); r( wxSTC_POWERPRO_IDENTIFIER ); r( wxSTC_POWERPRO_STRINGEOL ); r( wxSTC_POWERPRO_VERBATIM ); r( wxSTC_POWERPRO_ALTQUOTE ); r( wxSTC_POWERPRO_FUNCTION ); #endif break; case 'R': #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_RB_BACKTICKS ); r( wxSTC_RB_CHARACTER ); r( wxSTC_RB_CLASSNAME ); r( wxSTC_RB_CLASS_VAR ); r( wxSTC_RB_COMMENTLINE ); r( wxSTC_RB_DATASECTION ); r( wxSTC_RB_DEFAULT ); r( wxSTC_RB_DEFNAME ); r( wxSTC_RB_ERROR ); r( wxSTC_RB_GLOBAL ); r( wxSTC_RB_HERE_DELIM ); r( wxSTC_RB_HERE_Q ); r( wxSTC_RB_HERE_QQ ); r( wxSTC_RB_HERE_QX ); r( wxSTC_RB_IDENTIFIER ); r( wxSTC_RB_INSTANCE_VAR ); r( wxSTC_RB_MODULE_NAME ); r( wxSTC_RB_NUMBER ); r( wxSTC_RB_OPERATOR ); r( wxSTC_RB_POD ); r( wxSTC_RB_REGEX ); r( wxSTC_RB_STDERR ); r( wxSTC_RB_STDIN ); r( wxSTC_RB_STDOUT ); r( wxSTC_RB_STRING ); r( wxSTC_RB_STRING_Q ); r( wxSTC_RB_STRING_QQ ); r( wxSTC_RB_STRING_QR ); r( wxSTC_RB_STRING_QW ); r( wxSTC_RB_STRING_QX ); r( wxSTC_RB_SYMBOL ); r( wxSTC_RB_UPPER_BOUND ); r( wxSTC_RB_WORD ); r( wxSTC_RB_WORD_DEMOTED ); r( wxSTC_REBOL_BINARY ); r( wxSTC_REBOL_BRACEDSTRING ); r( wxSTC_REBOL_CHARACTER ); r( wxSTC_REBOL_COMMENTBLOCK ); r( wxSTC_REBOL_COMMENTLINE ); r( wxSTC_REBOL_DATE ); r( wxSTC_REBOL_DEFAULT ); r( wxSTC_REBOL_EMAIL ); r( wxSTC_REBOL_FILE ); r( wxSTC_REBOL_IDENTIFIER ); r( wxSTC_REBOL_ISSUE ); r( wxSTC_REBOL_MONEY ); r( wxSTC_REBOL_NUMBER ); r( wxSTC_REBOL_OPERATOR ); r( wxSTC_REBOL_PAIR ); r( wxSTC_REBOL_PREFACE ); r( wxSTC_REBOL_QUOTEDSTRING ); r( wxSTC_REBOL_TAG ); r( wxSTC_REBOL_TIME ); r( wxSTC_REBOL_TUPLE ); r( wxSTC_REBOL_URL ); r( wxSTC_REBOL_WORD ); r( wxSTC_REBOL_WORD2 ); r( wxSTC_REBOL_WORD3 ); r( wxSTC_REBOL_WORD4 ); r( wxSTC_REBOL_WORD5 ); r( wxSTC_REBOL_WORD6 ); r( wxSTC_REBOL_WORD7 ); r( wxSTC_REBOL_WORD8 ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_R_BASEKWORD ); r( wxSTC_R_COMMENT ); r( wxSTC_R_DEFAULT ); r( wxSTC_R_IDENTIFIER ); r( wxSTC_R_INFIX ); r( wxSTC_R_INFIXEOL ); r( wxSTC_R_KWORD ); r( wxSTC_R_NUMBER ); r( wxSTC_R_OPERATOR ); r( wxSTC_R_OTHERKWORD ); r( wxSTC_R_STRING ); r( wxSTC_R_STRING2 ); #endif break; case 'S': #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_SCMOD_META ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_STATUS_OK ); r( wxSTC_STATUS_FAILURE ); r( wxSTC_STATUS_BADALLOC ); r( wxSTC_SCVS_NONE ); r( wxSTC_SCVS_RECTANGULARSELECTION ); r( wxSTC_SCVS_USERACCESSIBLE ); r( wxSTC_SORCUS_DEFAULT ); r( wxSTC_SORCUS_COMMAND ); r( wxSTC_SORCUS_PARAMETER ); r( wxSTC_SORCUS_COMMENTLINE ); r( wxSTC_SORCUS_STRING ); r( wxSTC_SORCUS_STRINGEOL ); r( wxSTC_SORCUS_IDENTIFIER ); r( wxSTC_SORCUS_OPERATOR ); r( wxSTC_SORCUS_NUMBER ); r( wxSTC_SORCUS_CONSTANT ); r( wxSTC_SML_DEFAULT ); r( wxSTC_SML_IDENTIFIER ); r( wxSTC_SML_TAGNAME ); r( wxSTC_SML_KEYWORD ); r( wxSTC_SML_KEYWORD2 ); r( wxSTC_SML_KEYWORD3 ); r( wxSTC_SML_LINENUM ); r( wxSTC_SML_OPERATOR ); r( wxSTC_SML_NUMBER ); r( wxSTC_SML_CHAR ); r( wxSTC_SML_STRING ); r( wxSTC_SML_COMMENT ); r( wxSTC_SML_COMMENT1 ); r( wxSTC_SML_COMMENT2 ); r( wxSTC_SML_COMMENT3 ); #endif r( wxSTC_STYLE_DEFAULT ); r( wxSTC_STYLE_LINENUMBER ); r( wxSTC_STYLE_BRACELIGHT ); r( wxSTC_STYLE_BRACEBAD ); r( wxSTC_STYLE_CONTROLCHAR ); r( wxSTC_STYLE_INDENTGUIDE ); r( wxSTC_STYLE_LASTPREDEFINED ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_STYLE_CALLTIP ); #endif r( wxSTC_STYLE_MAX ); r( wxSTC_SCMOD_SHIFT ); r( wxSTC_SCMOD_CTRL ); r( wxSTC_SCMOD_ALT ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_SCMOD_NORM ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_SCMOD_SUPER ); #endif r( wxSTC_SCRIPTOL_DEFAULT ); r( wxSTC_SCRIPTOL_COMMENTLINE ); r( wxSTC_SCRIPTOL_NUMBER ); r( wxSTC_SCRIPTOL_STRING ); r( wxSTC_SCRIPTOL_CHARACTER ); r( wxSTC_SCRIPTOL_PREPROCESSOR ); r( wxSTC_SCRIPTOL_OPERATOR ); r( wxSTC_SCRIPTOL_IDENTIFIER ); r( wxSTC_SCRIPTOL_STRINGEOL ); r( wxSTC_SCRIPTOL_CLASSNAME ); r( wxSTC_SCRIPTOL_COMMENTBLOCK ); r( wxSTC_SCRIPTOL_CSTYLE ); r( wxSTC_SCRIPTOL_KEYWORD ); r( wxSTC_SCRIPTOL_PERSISTENT ); r( wxSTC_SCRIPTOL_TRIPLE ); r( wxSTC_SCRIPTOL_WHITE ); r( wxSTC_SH_BACKTICKS ); r( wxSTC_SH_CHARACTER ); r( wxSTC_SH_COMMENTLINE ); r( wxSTC_SH_DEFAULT ); r( wxSTC_SH_ERROR ); r( wxSTC_SH_HERE_DELIM ); r( wxSTC_SH_HERE_Q ); r( wxSTC_SH_IDENTIFIER ); r( wxSTC_SH_NUMBER ); r( wxSTC_SH_OPERATOR ); r( wxSTC_SH_PARAM ); r( wxSTC_SH_SCALAR ); r( wxSTC_SH_STRING ); r( wxSTC_SH_WORD ); r( wxSTC_SN_CODE ); r( wxSTC_SN_COMMENTLINE ); r( wxSTC_SN_COMMENTLINEBANG ); r( wxSTC_SN_DEFAULT ); r( wxSTC_SN_IDENTIFIER ); r( wxSTC_SN_NUMBER ); r( wxSTC_SN_OPERATOR ); r( wxSTC_SN_PREPROCESSOR ); r( wxSTC_SN_REGEXTAG ); r( wxSTC_SN_SIGNAL ); r( wxSTC_SN_STRING ); r( wxSTC_SN_STRINGEOL ); r( wxSTC_SN_USER ); r( wxSTC_SN_WORD ); r( wxSTC_SN_WORD2 ); r( wxSTC_SN_WORD3 ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_SPICE_COMMENTLINE ); r( wxSTC_SPICE_DEFAULT ); r( wxSTC_SPICE_DELIMITER ); r( wxSTC_SPICE_IDENTIFIER ); r( wxSTC_SPICE_KEYWORD ); r( wxSTC_SPICE_KEYWORD2 ); r( wxSTC_SPICE_KEYWORD3 ); r( wxSTC_SPICE_NUMBER ); r( wxSTC_SPICE_VALUE ); r( wxSTC_SQL_CHARACTER ); r( wxSTC_SQL_COMMENT ); r( wxSTC_SQL_COMMENTDOC ); r( wxSTC_SQL_COMMENTDOCKEYWORD ); r( wxSTC_SQL_COMMENTDOCKEYWORDERROR ); r( wxSTC_SQL_COMMENTLINE ); r( wxSTC_SQL_COMMENTLINEDOC ); r( wxSTC_SQL_DEFAULT ); r( wxSTC_SQL_IDENTIFIER ); r( wxSTC_SQL_NUMBER ); r( wxSTC_SQL_OPERATOR ); r( wxSTC_SQL_QUOTEDIDENTIFIER ); r( wxSTC_SQL_SQLPLUS ); r( wxSTC_SQL_SQLPLUS_COMMENT ); r( wxSTC_SQL_SQLPLUS_PROMPT ); r( wxSTC_SQL_STRING ); r( wxSTC_SQL_USER1 ); r( wxSTC_SQL_USER2 ); r( wxSTC_SQL_USER3 ); r( wxSTC_SQL_USER4 ); r( wxSTC_SQL_WORD ); r( wxSTC_SQL_WORD2 ); r( wxSTC_ST_ASSIGN ); r( wxSTC_ST_BINARY ); r( wxSTC_ST_BOOL ); r( wxSTC_ST_CHARACTER ); r( wxSTC_ST_COMMENT ); r( wxSTC_ST_DEFAULT ); r( wxSTC_ST_GLOBAL ); r( wxSTC_ST_KWSEND ); r( wxSTC_ST_NIL ); r( wxSTC_ST_NUMBER ); r( wxSTC_ST_RETURN ); r( wxSTC_ST_SELF ); r( wxSTC_ST_SPECIAL ); r( wxSTC_ST_SPEC_SEL ); r( wxSTC_ST_STRING ); r( wxSTC_ST_SUPER ); r( wxSTC_ST_SYMBOL ); r( wxSTC_START ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_STARTACTION ); #endif #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxSTC_SEL_STREAM ); r( wxSTC_SEL_RECTANGLE ); r( wxSTC_SEL_LINES ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_SEL_THIN ); #endif r( wxEVT_STC_CHANGE ); r( wxEVT_STC_STYLENEEDED ); r( wxEVT_STC_CHARADDED ); r( wxEVT_STC_SAVEPOINTREACHED ); r( wxEVT_STC_SAVEPOINTLEFT ); r( wxEVT_STC_ROMODIFYATTEMPT ); r( wxEVT_STC_KEY ); r( wxEVT_STC_DOUBLECLICK ); r( wxEVT_STC_UPDATEUI ); r( wxEVT_STC_MODIFIED ); r( wxEVT_STC_MACRORECORD ); r( wxEVT_STC_MARGINCLICK ); r( wxEVT_STC_NEEDSHOWN ); #if WXPERL_W_VERSION_LT( 2, 5, 2 ) r( wxEVT_STC_POSCHANGED ); #endif r( wxEVT_STC_PAINTED ); r( wxEVT_STC_USERLISTSELECTION ); r( wxEVT_STC_URIDROPPED ); r( wxEVT_STC_DWELLSTART ); r( wxEVT_STC_DWELLEND ); r( wxEVT_STC_START_DRAG ); r( wxEVT_STC_DRAG_OVER ); r( wxEVT_STC_DO_DROP ); r( wxEVT_STC_ZOOM ); r( wxEVT_STC_HOTSPOT_CLICK ); r( wxEVT_STC_HOTSPOT_DCLICK ); r( wxEVT_STC_CALLTIP_CLICK ); #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxEVT_STC_AUTOCOMP_CANCELLED ); r( wxEVT_STC_AUTOCOMP_CHAR_DELETED ); #endif break; case 'T': #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_TCMD_DEFAULT ); r( wxSTC_TCMD_COMMENT ); r( wxSTC_TCMD_WORD ); r( wxSTC_TCMD_LABEL ); r( wxSTC_TCMD_HIDE ); r( wxSTC_TCMD_COMMAND ); r( wxSTC_TCMD_IDENTIFIER ); r( wxSTC_TCMD_OPERATOR ); r( wxSTC_TCMD_ENVIRONMENT ); r( wxSTC_TCMD_EXPANSION ); r( wxSTC_TCMD_CLABEL ); r( wxSTC_TECHNOLOGY_DEFAULT ); r( wxSTC_TECHNOLOGY_DIRECTWRITE ); r( wxSTC_TXT2TAGS_DEFAULT ); r( wxSTC_TXT2TAGS_LINE_BEGIN ); r( wxSTC_TXT2TAGS_STRONG1 ); r( wxSTC_TXT2TAGS_STRONG2 ); r( wxSTC_TXT2TAGS_EM1 ); r( wxSTC_TXT2TAGS_EM2 ); r( wxSTC_TXT2TAGS_HEADER1 ); r( wxSTC_TXT2TAGS_HEADER2 ); r( wxSTC_TXT2TAGS_HEADER3 ); r( wxSTC_TXT2TAGS_HEADER4 ); r( wxSTC_TXT2TAGS_HEADER5 ); r( wxSTC_TXT2TAGS_HEADER6 ); r( wxSTC_TXT2TAGS_PRECHAR ); r( wxSTC_TXT2TAGS_ULIST_ITEM ); r( wxSTC_TXT2TAGS_OLIST_ITEM ); r( wxSTC_TXT2TAGS_BLOCKQUOTE ); r( wxSTC_TXT2TAGS_STRIKEOUT ); r( wxSTC_TXT2TAGS_HRULE ); r( wxSTC_TXT2TAGS_LINK ); r( wxSTC_TXT2TAGS_CODE ); r( wxSTC_TXT2TAGS_CODE2 ); r( wxSTC_TXT2TAGS_CODEBK ); r( wxSTC_TXT2TAGS_COMMENT ); r( wxSTC_TXT2TAGS_OPTION ); r( wxSTC_TXT2TAGS_PREPROC ); r( wxSTC_TXT2TAGS_POSTPROC ); r( wxSTC_TYPE_BOOLEAN ); r( wxSTC_TYPE_INTEGER ); r( wxSTC_TYPE_STRING ); #endif r( wxSTC_TIME_FOREVER ); #if WXPERL_W_VERSION_GE( 2, 5, 2 ) r( wxSTC_TEX_DEFAULT ); r( wxSTC_TEX_SPECIAL ); r( wxSTC_TEX_GROUP ); r( wxSTC_TEX_SYMBOL ); r( wxSTC_TEX_COMMAND ); r( wxSTC_TEX_TEXT ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_T3_BLOCK_COMMENT ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_T3_BRACE ); #endif r( wxSTC_T3_DEFAULT ); r( wxSTC_T3_D_STRING ); r( wxSTC_T3_HTML_DEFAULT ); r( wxSTC_T3_HTML_STRING ); r( wxSTC_T3_HTML_TAG ); r( wxSTC_T3_IDENTIFIER ); r( wxSTC_T3_KEYWORD ); r( wxSTC_T3_LIB_DIRECTIVE ); r( wxSTC_T3_LINE_COMMENT ); r( wxSTC_T3_MSG_PARAM ); r( wxSTC_T3_NUMBER ); r( wxSTC_T3_OPERATOR ); r( wxSTC_T3_PREPROCESSOR ); r( wxSTC_T3_S_STRING ); r( wxSTC_T3_USER1 ); r( wxSTC_T3_USER2 ); r( wxSTC_T3_USER3 ); r( wxSTC_T3_X_DEFAULT ); r( wxSTC_T3_X_STRING ); r( wxSTC_TCL_BLOCK_COMMENT ); r( wxSTC_TCL_COMMENT ); r( wxSTC_TCL_COMMENTLINE ); r( wxSTC_TCL_COMMENT_BOX ); r( wxSTC_TCL_DEFAULT ); r( wxSTC_TCL_EXPAND ); r( wxSTC_TCL_IDENTIFIER ); r( wxSTC_TCL_IN_QUOTE ); r( wxSTC_TCL_MODIFIER ); r( wxSTC_TCL_NUMBER ); r( wxSTC_TCL_OPERATOR ); r( wxSTC_TCL_SUBSTITUTION ); r( wxSTC_TCL_SUB_BRACE ); r( wxSTC_TCL_WORD ); r( wxSTC_TCL_WORD2 ); r( wxSTC_TCL_WORD3 ); r( wxSTC_TCL_WORD4 ); r( wxSTC_TCL_WORD5 ); r( wxSTC_TCL_WORD6 ); r( wxSTC_TCL_WORD7 ); r( wxSTC_TCL_WORD8 ); r( wxSTC_TCL_WORD_IN_QUOTE ); #endif break; case 'U': #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_UNDO_MAY_COALESCE ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_UPDATE_CONTENT ); r( wxSTC_UPDATE_SELECTION ); r( wxSTC_UPDATE_V_SCROLL ); r( wxSTC_UPDATE_H_SCROLL ); #endif break; case 'V': #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_VISUALPROLOG_DEFAULT ); r( wxSTC_VISUALPROLOG_KEY_MAJOR ); r( wxSTC_VISUALPROLOG_KEY_MINOR ); r( wxSTC_VISUALPROLOG_KEY_DIRECTIVE ); r( wxSTC_VISUALPROLOG_COMMENT_BLOCK ); r( wxSTC_VISUALPROLOG_COMMENT_LINE ); r( wxSTC_VISUALPROLOG_COMMENT_KEY ); r( wxSTC_VISUALPROLOG_COMMENT_KEY_ERROR ); r( wxSTC_VISUALPROLOG_IDENTIFIER ); r( wxSTC_VISUALPROLOG_VARIABLE ); r( wxSTC_VISUALPROLOG_ANONYMOUS ); r( wxSTC_VISUALPROLOG_NUMBER ); r( wxSTC_VISUALPROLOG_OPERATOR ); r( wxSTC_VISUALPROLOG_CHARACTER ); r( wxSTC_VISUALPROLOG_CHARACTER_TOO_MANY ); r( wxSTC_VISUALPROLOG_CHARACTER_ESCAPE_ERROR ); r( wxSTC_VISUALPROLOG_STRING ); r( wxSTC_VISUALPROLOG_STRING_ESCAPE ); r( wxSTC_VISUALPROLOG_STRING_ESCAPE_ERROR ); r( wxSTC_VISUALPROLOG_STRING_EOL_OPEN ); r( wxSTC_VISUALPROLOG_STRING_VERBATIM ); r( wxSTC_VISUALPROLOG_STRING_VERBATIM_SPECIAL ); r( wxSTC_VISUALPROLOG_STRING_VERBATIM_EOL ); #endif r( wxSTC_VISIBLE_SLOP ); r( wxSTC_VISIBLE_STRICT ); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) r( wxSTC_VHDL_ATTRIBUTE ); r( wxSTC_VHDL_COMMENT ); r( wxSTC_VHDL_COMMENTLINEBANG ); r( wxSTC_VHDL_DEFAULT ); r( wxSTC_VHDL_IDENTIFIER ); r( wxSTC_VHDL_KEYWORD ); r( wxSTC_VHDL_NUMBER ); r( wxSTC_VHDL_OPERATOR ); r( wxSTC_VHDL_STDFUNCTION ); r( wxSTC_VHDL_STDOPERATOR ); r( wxSTC_VHDL_STDPACKAGE ); r( wxSTC_VHDL_STDTYPE ); r( wxSTC_VHDL_STRING ); r( wxSTC_VHDL_STRINGEOL ); r( wxSTC_VHDL_USERWORD ); #endif r( wxSTC_V_COMMENT ); r( wxSTC_V_COMMENTLINE ); r( wxSTC_V_COMMENTLINEBANG ); r( wxSTC_V_DEFAULT ); r( wxSTC_V_IDENTIFIER ); r( wxSTC_V_NUMBER ); r( wxSTC_V_OPERATOR ); r( wxSTC_V_PREPROCESSOR ); r( wxSTC_V_STRING ); r( wxSTC_V_STRINGEOL ); r( wxSTC_V_USER ); r( wxSTC_V_WORD ); r( wxSTC_V_WORD2 ); r( wxSTC_V_WORD3 ); break; case 'W': #if WXPERL_W_VERSION_GE( 2, 9, 5 ) r( wxSTC_WEIGHT_NORMAL ); r( wxSTC_WEIGHT_SEMIBOLD ); r( wxSTC_WEIGHT_BOLD ); r( wxSTC_WRAPVISUALFLAG_MARGIN ); #endif r( wxSTC_WRAP_NONE ); r( wxSTC_WRAP_WORD ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) r( wxSTC_WRAP_CHAR ); #endif r( wxSTC_WRAPVISUALFLAGLOC_DEFAULT ); r( wxSTC_WRAPVISUALFLAGLOC_END_BY_TEXT ); r( wxSTC_WRAPVISUALFLAGLOC_START_BY_TEXT ); r( wxSTC_WRAPVISUALFLAG_END ); r( wxSTC_WRAPVISUALFLAG_NONE ); r( wxSTC_WRAPVISUALFLAG_START ); r( wxSTC_WS_INVISIBLE ); r( wxSTC_WS_VISIBLEALWAYS ); r( wxSTC_WS_VISIBLEAFTERINDENT ); #if WXPERL_W_VERSION_GE( 2, 9, 4 ) r( wxSTC_WRAPINDENT_FIXED ); r( wxSTC_WRAPINDENT_SAME ); r( wxSTC_WRAPINDENT_INDENT ); #endif break; case 'Y': r( wxSTC_YAML_COMMENT ); r( wxSTC_YAML_DEFAULT ); r( wxSTC_YAML_DOCUMENT ); r( wxSTC_YAML_ERROR ); r( wxSTC_YAML_IDENTIFIER ); r( wxSTC_YAML_KEYWORD ); r( wxSTC_YAML_NUMBER ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) r( wxSTC_YAML_OPERATOR ); #endif r( wxSTC_YAML_REFERENCE ); r( wxSTC_YAML_TEXT ); break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants stc_module( &stc_constant ); Wx-0.9923/ext/stc/lib/000775000000000000 012316265010 12534 5ustar00Mark000000000000Wx-0.9923/ext/stc/lib/Wx/000775000000000000 012316265010 13132 5ustar00Mark000000000000Wx-0.9923/ext/stc/lib/Wx/STC.pm000664000000000000 767012306612241 14214 0ustar00Mark000000000000############################################################################# ## Name: ext/stc/lib/Wx/STC.pm ## Purpose: Wx::STC ## Author: Mattia Barbon ## Modified by: ## Created: 23/05/2002 ## RCS-ID: $Id: STC.pm 3404 2012-10-01 15:44:18Z mdootson $ ## Copyright: (c) 2002-2005 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::STC; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::load_dll( 'stc' ); Wx::wx_boot( 'Wx::STC', $VERSION ); # # properly setup inheritance tree # no strict; package Wx::StyledTextCtrl; @ISA = qw(Wx::Control); package Wx::StyledTextEvent; @ISA = qw(Wx::CommandEvent); package Wx::Event; use strict; # !parser: sub { $_[0] =~ m/sub (EVT_\w+)/ } # !package: Wx::Event sub EVT_STC_CHANGE($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_CHANGE, $_[2] ) }; sub EVT_STC_STYLENEEDED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_STYLENEEDED, $_[2] ) }; sub EVT_STC_CHARADDED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_CHARADDED, $_[2] ) }; sub EVT_STC_SAVEPOINTREACHED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_SAVEPOINTREACHED, $_[2] ) }; sub EVT_STC_SAVEPOINTLEFT($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_SAVEPOINTLEFT, $_[2] ) }; sub EVT_STC_ROMODIFYATTEMPT($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_ROMODIFYATTEMPT, $_[2] ) }; sub EVT_STC_KEY($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_KEY, $_[2] ) }; sub EVT_STC_DOUBLECLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_DOUBLECLICK, $_[2] ) }; sub EVT_STC_UPDATEUI($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_UPDATEUI, $_[2] ) }; sub EVT_STC_MODIFIED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_MODIFIED, $_[2] ) }; sub EVT_STC_MACRORECORD($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_MACRORECORD, $_[2] ) }; sub EVT_STC_MARGINCLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_MARGINCLICK, $_[2] ) }; sub EVT_STC_NEEDSHOWN($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_NEEDSHOWN, $_[2] ) }; sub EVT_STC_POSCHANGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_POSCHANGED, $_[2] ) }; sub EVT_STC_PAINTED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_PAINTED, $_[2] ) }; sub EVT_STC_USERLISTSELECTION($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_USERLISTSELECTION, $_[2] ) }; sub EVT_STC_URIDROPPED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_URIDROPPED, $_[2] ) }; sub EVT_STC_DWELLSTART($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_DWELLSTART, $_[2] ) }; sub EVT_STC_DWELLEND($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_DWELLEND, $_[2] ) }; sub EVT_STC_START_DRAG($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_START_DRAG, $_[2] ) }; sub EVT_STC_DRAG_OVER($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_DRAG_OVER, $_[2] ) }; sub EVT_STC_DO_DROP($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_DO_DROP, $_[2] ) }; sub EVT_STC_ZOOM($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_ZOOM, $_[2] ) }; sub EVT_STC_HOTSPOT_CLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_HOTSPOT_CLICK, $_[2] ) }; sub EVT_STC_HOTSPOT_DCLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_HOTSPOT_DCLICK, $_[2] ) }; sub EVT_STC_CALLTIP_CLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_CALLTIP_CLICK, $_[2] ) }; sub EVT_STC_AUTOCOMP_SELECTION($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_AUTOCOMP_SELECTION, $_[2] ) }; sub EVT_STC_INDICATOR_CLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_INDICATOR_CLICK, $_[2] ) }; sub EVT_STC_INDICATOR_RELEASE($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_INDICATOR_RELEASE, $_[2] ) }; sub EVT_STC_AUTOCOMP_CANCELLED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_AUTOCOMP_CANCELLED, $_[2] ) }; sub EVT_STC_AUTOCOMP_CHAR_DELETED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_STC_AUTOCOMP_CHAR_DELETED, $_[2] ) }; 1; # local variables: # mode: cperl # end: Wx-0.9923/ext/stc/Makefile.PL000664000000000000 146612306612241 14030 0ustar00Mark000000000000############################################################################# ## Name: ext/stc/Makefile.PL ## Purpose: Makefile.PL for wxSTC ## Author: Mattia Barbon ## Modified by: ## Created: 23/05/2002 ## RCS-ID: $Id: Makefile.PL 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2002-2003 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::STC', VERSION_FROM => 'lib/Wx/STC.pm', WX_CORE_LIB => 'stc core base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/stc/STC.xs000664000000000000 176712306612241 13067 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/stc/STC.xs // Purpose: XS for Wx::STC // Author: Mattia Barbon // Modified by: // Created: 23/05/2002 // RCS-ID: $Id: STC.xs 2935 2010-07-04 11:46:58Z mbarbon $ // Copyright: (c) 2002-2004, 2006-2010 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #undef THIS MODULE=Wx__STC BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/StyledTextCtrl.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/StyledTextEvent.xsp #include "cpp/st_constants.cpp" # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__STC Wx-0.9923/ext/stc/t/000775000000000000 012316265011 12232 5ustar00Mark000000000000Wx-0.9923/ext/stc/t/01_load.t000775000000000000 21712306612241 13701 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::STC; print "ok\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/stc/t/02_inheritance.t000775000000000000 36012306612241 15253 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::STC; test_inheritance_end(); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/stc/typemap000664000000000000 121412306612241 13447 0ustar00Mark000000000000############################################################################# ## Name: ext/stc/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 23/05/2002 ## RCS-ID: $Id: typemap 2317 2008-01-18 22:00:14Z mbarbon $ ## Copyright: (c) 2002-2004, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxDragResult T_ENUM wxStyledTextCtrl * O_WXOBJECT wxStyledTextEvent * O_WXOBJECT Wx-0.9923/ext/stc/XS/000775000000000000 012316265011 12321 5ustar00Mark000000000000Wx-0.9923/ext/stc/XS/StyledTextCtrl.xsp000664000000000000 10350212306612241 16134 0ustar00Mark000000000000############################################################################# ## Name: ext/stc/XS/StyledTextCtrl.xsp ## Purpose: XS for Wx::StyledTextCtrl ## Author: Marcus Friedlaender and Mattia Barbon ## Created: 23/05/2002 ## RCS-ID: $Id: StyledTextCtrl.xsp 3407 2012-10-01 22:33:59Z mdootson $ ## Copyright: (c) 2002-2004, 2006-2008, 2010 Graciliano M. P., ## Marcus Friedlaender, Mattia Barbon, Simon Flack ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# ## // current up to wxWidgets rev 71556 ## // updates %module{Wx}; #undef FindText #include "wx/stc/stc.h" %typemap{wxDragResult}{simple}; %typemap{wxFontEncoding}{simple}; %name{Wx::StyledTextCtrl} class wxStyledTextCtrl { %{ wxStyledTextCtrl* wxStyledTextCtrl::new( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxSTCNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxStyledTextCtrl( parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL void wxStyledTextCtrl::AddText( text ) wxString text void wxStyledTextCtrl::SetLexer( lexer ) int lexer int wxStyledTextCtrl::GetLexer() ## Extract style settings from a spec-string which is composed of one or ## more of the following comma separated elements: ## ## bold turns on bold ## italic turns on italics ## fore:#RRGGBB sets the foreground colour ## back:#RRGGBB sets the background colour ## face:[facename] sets the font face name to use ## size:[num] sets the font size in points ## eol turns on eol filling ## underline turns on underlining void wxStyledTextCtrl::StyleSetSpec( style, spec ) int style wxString spec void wxStyledTextCtrl::StyleSetFont( style, font ) int style wxFont* font CODE: THIS->StyleSetFont( style, *font ); void wxStyledTextCtrl::StyleSetFontAttr( styleNum, size, faceName, bold, italic, underline ) int styleNum int size wxString faceName bool bold bool italic bool underline void wxStyledTextCtrl::StyleClearAll() void wxStyledTextCtrl::ClearDocumentStyle() void wxStyledTextCtrl::StyleSetForeground( style, fore ) int style wxColour* fore CODE: THIS->StyleSetForeground( style, *fore ); void wxStyledTextCtrl::StyleSetBackground( style, back ) int style wxColour* back CODE: THIS->StyleSetBackground( style, *back ); void wxStyledTextCtrl::StyleSetBold( style, bold ) int style bool bold void wxStyledTextCtrl::StyleSetItalic( style, italic ) int style bool italic void wxStyledTextCtrl::StyleSetUnderline( style, underline ) int style bool underline void wxStyledTextCtrl::InsertText(pos, text) int pos wxString text void wxStyledTextCtrl::StyleSetSize(style, size_points) int style int size_points void wxStyledTextCtrl::StyleSetFaceName(style, font_name) int style wxString font_name void wxStyledTextCtrl::StyleSetEOLFilled( style, filled ) int style bool filled void wxStyledTextCtrl::StyleResetDefault() void wxStyledTextCtrl::StyleSetCase( style, caseForce ) int style int caseForce void wxStyledTextCtrl::StyleSetCharacterSet( style, characterSet ) int style int characterSet void wxStyledTextCtrl::SetSelForeground( useSetting, fore ) bool useSetting wxColour* fore CODE: THIS->SetSelForeground( useSetting, *fore ); void wxStyledTextCtrl::SetSelBackground( useSetting, back ) bool useSetting wxColour* back CODE: THIS->SetSelBackground( useSetting, *back ); void wxStyledTextCtrl::SetCaretForeground( fore ) wxColour* fore CODE: THIS->SetCaretForeground( *fore ); void wxStyledTextCtrl::CmdKeyAssign( key, modifiers, cmd ) int key int modifiers int cmd void wxStyledTextCtrl::CmdKeyClear( key, modifiers ) int key int modifiers void wxStyledTextCtrl::CmdKeyClearAll() void wxStyledTextCtrl::SetStyleBytes( length, styleBytes ) int length char* styleBytes void wxStyledTextCtrl::StyleSetVisible( style, visible ) int style bool visible int wxStyledTextCtrl::GetCaretPeriod() void wxStyledTextCtrl::SetCaretPeriod( periodMilliseconds ) int periodMilliseconds void wxStyledTextCtrl::SetWordChars( characters ) wxString characters void wxStyledTextCtrl::BeginUndoAction() void wxStyledTextCtrl::EndUndoAction() void wxStyledTextCtrl::IndicatorSetStyle( indic, style ) int indic int style int wxStyledTextCtrl::IndicatorGetStyle( indic ) int indic void wxStyledTextCtrl::IndicatorSetForeground( indic, fore ) int indic wxColour* fore CODE: THIS->IndicatorSetForeground( indic, *fore ); void wxStyledTextCtrl::SetWhitespaceForeground( useSetting, fore ) bool useSetting wxColour* fore CODE: THIS->SetWhitespaceForeground( useSetting, *fore ); void wxStyledTextCtrl::SetWhitespaceBackground( useSetting, back ) bool useSetting wxColour* back CODE: THIS->SetWhitespaceBackground( useSetting, *back ); void wxStyledTextCtrl::SetStyleBits( bits ) int bits int wxStyledTextCtrl::GetStyleBits() void wxStyledTextCtrl::SetLineState( line, state ) int line int state int wxStyledTextCtrl::GetLineState( line ) int line int wxStyledTextCtrl::GetMaxLineState() bool wxStyledTextCtrl::GetCaretLineVisible() void wxStyledTextCtrl::SetCaretLineVisible( show ) bool show #if WXPERL_W_VERSION_LT( 2, 7, 0 ) void wxStyledTextCtrl::SetCaretLineBack( back ) wxColour* back CODE: THIS->SetCaretLineBack( *back ); #else void wxStyledTextCtrl::SetCaretLineBack( back ) wxColour* back CODE: THIS->SetCaretLineBackground( *back ); void wxStyledTextCtrl::SetCaretLineBackground( back ) wxColour* back CODE: THIS->SetCaretLineBackground( *back ); #endif void wxStyledTextCtrl::StyleSetChangeable( style, changeable ) int style bool changeable void wxStyledTextCtrl::AutoCompShow( lenEntered, itemList ) int lenEntered wxString itemList void wxStyledTextCtrl::AutoCompCancel() bool wxStyledTextCtrl::AutoCompActive() int wxStyledTextCtrl::AutoCompPosStart() void wxStyledTextCtrl::AutoCompComplete() void wxStyledTextCtrl::AutoCompStops( characterSet ) wxString characterSet void wxStyledTextCtrl::AutoCompSetSeparator( separatorCharacter ) int separatorCharacter int wxStyledTextCtrl::AutoCompGetSeparator() void wxStyledTextCtrl::AutoCompSelect( text ) wxString text void wxStyledTextCtrl::AutoCompSetCancelAtStart( cancel ) bool cancel bool wxStyledTextCtrl::AutoCompGetCancelAtStart() void wxStyledTextCtrl::AutoCompSetFillUps( characterSet ) wxString characterSet void wxStyledTextCtrl::AutoCompSetChooseSingle( chooseSingle ) bool chooseSingle bool wxStyledTextCtrl::AutoCompGetChooseSingle() bool wxStyledTextCtrl::AutoCompGetIgnoreCase() void wxStyledTextCtrl::UserListShow( listType, itemList ) int listType wxString itemList void wxStyledTextCtrl::AutoCompSetAutoHide( autoHide ) bool autoHide bool wxStyledTextCtrl::AutoCompGetAutoHide() void wxStyledTextCtrl::AutoCompSetDropRestOfWord( dropRestOfWord ) bool dropRestOfWord bool wxStyledTextCtrl::AutoCompGetDropRestOfWord() void wxStyledTextCtrl::SetIndent( indentSize ) int indentSize int wxStyledTextCtrl::GetIndent() void wxStyledTextCtrl::SetUseTabs( useTabs ) bool useTabs bool wxStyledTextCtrl::GetUseTabs() void wxStyledTextCtrl::SetLineIndentation( line, indentSize ) int line int indentSize int wxStyledTextCtrl::GetLineIndentation( line ) int line int wxStyledTextCtrl::GetLineIndentPosition( line ) int line int wxStyledTextCtrl::GetColumn( pos ) int pos void wxStyledTextCtrl::SetUseHorizontalScrollBar( show ) bool show bool wxStyledTextCtrl::GetUseHorizontalScrollBar() void wxStyledTextCtrl::SetIndentationGuides( show ) bool show bool wxStyledTextCtrl::GetIndentationGuides() void wxStyledTextCtrl::SetHighlightGuide( column ) int column int wxStyledTextCtrl::GetHighlightGuide() int wxStyledTextCtrl::GetLineEndPosition( line ) int line int wxStyledTextCtrl::GetCodePage() bool wxStyledTextCtrl::GetReadOnly() void wxStyledTextCtrl::SetCurrentPos( pos ) int pos void wxStyledTextCtrl::SetSelectionStart( pos ) int pos int wxStyledTextCtrl::GetSelectionStart() void wxStyledTextCtrl::SetSelectionEnd( pos ) int pos int wxStyledTextCtrl::GetSelectionEnd() void wxStyledTextCtrl::SetPrintMagnification( magnification ) int magnification int wxStyledTextCtrl::GetPrintMagnification() void wxStyledTextCtrl::SetPrintColourMode( mode ) int mode int wxStyledTextCtrl::GetPrintColourMode() int wxStyledTextCtrl::FindText( minPos, maxPos, text, flags = 0 ) int minPos int maxPos wxString text int flags int wxStyledTextCtrl::GetFirstVisibleLine() int wxStyledTextCtrl::GetLineCount() void wxStyledTextCtrl::SetMarginLeft( pixelWidth ) int pixelWidth int wxStyledTextCtrl::GetMarginLeft() void wxStyledTextCtrl::SetMarginRight( pixelWidth ) int pixelWidth int wxStyledTextCtrl::GetMarginRight() bool wxStyledTextCtrl::GetModify() void wxStyledTextCtrl::SetSelection( start, end ) int start int end #if WXPERL_W_VERSION_GE( 2, 6, 0 ) void wxStyledTextCtrl::SetSelectionMode( mode ) int mode int wxStyledTextCtrl::GetSelectionMode() #endif void wxStyledTextCtrl::HideSelection( normal ) bool normal int wxStyledTextCtrl::LineFromPosition( pos ) int pos int wxStyledTextCtrl::PositionFromLine( line ) int line void wxStyledTextCtrl::LineScroll( columns, lines ) int columns int lines void wxStyledTextCtrl::EnsureCaretVisible() void wxStyledTextCtrl::ReplaceSelection( text ) wxString text void wxStyledTextCtrl::SetReadOnly( readOnly ) bool readOnly bool wxStyledTextCtrl::CanPaste() bool wxStyledTextCtrl::CanUndo() void wxStyledTextCtrl::EmptyUndoBuffer() void wxStyledTextCtrl::Undo() void wxStyledTextCtrl::Cut() void wxStyledTextCtrl::Copy() void wxStyledTextCtrl::Paste() void wxStyledTextCtrl::Clear() int wxStyledTextCtrl::GetTextLength() void wxStyledTextCtrl::SetOvertype( overtype ) bool overtype bool wxStyledTextCtrl::GetOvertype() void wxStyledTextCtrl::SetCaretWidth( pixelWidth ) int pixelWidth int wxStyledTextCtrl::GetCaretWidth() void wxStyledTextCtrl::SetTargetStart( pos ) int pos int wxStyledTextCtrl::GetTargetStart() void wxStyledTextCtrl::SetTargetEnd( pos ) int pos int wxStyledTextCtrl::GetTargetEnd() int wxStyledTextCtrl::ReplaceTarget( text ) wxString text int wxStyledTextCtrl::ReplaceTargetRE( text ) wxString text int wxStyledTextCtrl::SearchInTarget( text ) wxString text void wxStyledTextCtrl::SetSearchFlags( flags ) int flags int wxStyledTextCtrl::GetSearchFlags() void wxStyledTextCtrl::CallTipShow( pos, definition ) int pos wxString definition void wxStyledTextCtrl::CallTipCancel() bool wxStyledTextCtrl::CallTipActive() int wxStyledTextCtrl::CallTipPosAtStart() void wxStyledTextCtrl::CallTipSetHighlight( start, end ) int start int end void wxStyledTextCtrl::CallTipSetBackground( back ) wxColour* back CODE: THIS->CallTipSetBackground( *back ); int wxStyledTextCtrl::VisibleFromDocLine( line ) int line int wxStyledTextCtrl::DocLineFromVisible( lineDisplay ) int lineDisplay void wxStyledTextCtrl::SetFoldLevel( line, level ) int line int level int wxStyledTextCtrl::GetFoldLevel( line ) int line int wxStyledTextCtrl::GetLastChild( line, level ) int line int level int wxStyledTextCtrl::GetFoldParent( line ) int line void wxStyledTextCtrl::ShowLines( lineStart, lineEnd ) int lineStart int lineEnd void wxStyledTextCtrl::HideLines( lineStart, lineEnd ) int lineStart int lineEnd bool wxStyledTextCtrl::GetLineVisible( line ) int line void wxStyledTextCtrl::SetFoldExpanded( line, expanded ) int line bool expanded bool wxStyledTextCtrl::GetFoldExpanded( line ) int line void wxStyledTextCtrl::ToggleFold( line ) int line void wxStyledTextCtrl::EnsureVisible( line ) int line void wxStyledTextCtrl::SetFoldFlags( flags ) int flags void wxStyledTextCtrl::EnsureVisibleEnforcePolicy( line ) int line void wxStyledTextCtrl::SetTabIndents( tabIndents ) bool tabIndents bool wxStyledTextCtrl::GetTabIndents() void wxStyledTextCtrl::SetBackSpaceUnIndents( bsUnIndents ) bool bsUnIndents bool wxStyledTextCtrl::GetBackSpaceUnIndents() void wxStyledTextCtrl::SetMouseDwellTime( periodMilliseconds ) int periodMilliseconds int wxStyledTextCtrl::GetMouseDwellTime() int wxStyledTextCtrl::WordStartPosition( pos, onlyWordCharacters ) int pos bool onlyWordCharacters int wxStyledTextCtrl::WordEndPosition( pos, onlyWordCharacters ) int pos bool onlyWordCharacters void wxStyledTextCtrl::SetLayoutCache( mode ) int mode int wxStyledTextCtrl::GetLayoutCache() void wxStyledTextCtrl::SetScrollWidth( pixelWidth ) int pixelWidth int wxStyledTextCtrl::GetScrollWidth() int wxStyledTextCtrl::TextWidth( style, text ) int style wxString text void wxStyledTextCtrl::SetEndAtLastLine( endAtLastLine ) bool endAtLastLine int wxStyledTextCtrl::GetEndAtLastLine() int wxStyledTextCtrl::TextHeight( line ) int line void wxStyledTextCtrl::HomeDisplay() void wxStyledTextCtrl::HomeDisplayExtend() void wxStyledTextCtrl::LineEndDisplay() void wxStyledTextCtrl::LineEndDisplayExtend() void wxStyledTextCtrl::MoveCaretInsideView() int wxStyledTextCtrl::LineLength( line ) int line void wxStyledTextCtrl::BraceHighlight( pos1, pos2 ) int pos1 int pos2 void wxStyledTextCtrl::BraceBadLight( pos ) int pos int wxStyledTextCtrl::BraceMatch( pos ) int pos bool wxStyledTextCtrl::GetViewEOL() void wxStyledTextCtrl::SetViewEOL( visible ) bool visible void* wxStyledTextCtrl::GetDocPointer() void wxStyledTextCtrl::SetDocPointer( docPointer ) void* docPointer void wxStyledTextCtrl::SetModEventMask( mask ) int mask int wxStyledTextCtrl::GetEdgeColumn() void wxStyledTextCtrl::SetEdgeColumn( column ) int column int wxStyledTextCtrl::GetEdgeMode() void wxStyledTextCtrl::SetEdgeMode( mode ) int mode void wxStyledTextCtrl::SetEdgeColour( edgeColour ) wxColour edgeColour void wxStyledTextCtrl::SearchAnchor() int wxStyledTextCtrl::SearchNext( flags, text ) int flags wxString text int wxStyledTextCtrl::SearchPrev( flags, text ) int flags wxString text int wxStyledTextCtrl::LinesOnScreen() void wxStyledTextCtrl::UsePopUp( allowPopUp ) bool allowPopUp bool wxStyledTextCtrl::SelectionIsRectangle() void wxStyledTextCtrl::SetZoom( zoom ) int zoom int wxStyledTextCtrl::GetZoom() void* wxStyledTextCtrl::CreateDocument() void wxStyledTextCtrl::AddRefDocument( docPointer ) void* docPointer void wxStyledTextCtrl::ReleaseDocument( docPointer ) void* docPointer int wxStyledTextCtrl::GetModEventMask() void wxStyledTextCtrl::SetSTCFocus( focus ) bool focus bool wxStyledTextCtrl::GetSTCFocus() void wxStyledTextCtrl::SetStatus( statusCode ) int statusCode int wxStyledTextCtrl::GetStatus() void wxStyledTextCtrl::SetMouseDownCaptures( captures ) bool captures bool wxStyledTextCtrl::GetMouseDownCaptures() void wxStyledTextCtrl::SetControlCharSymbol( symbol ) int symbol int wxStyledTextCtrl::GetControlCharSymbol() void wxStyledTextCtrl::WordPartLeft() void wxStyledTextCtrl::WordPartLeftExtend() void wxStyledTextCtrl::WordPartRight() void wxStyledTextCtrl::WordPartRightExtend() void wxStyledTextCtrl::SetVisiblePolicy( visiblePolicy, visibleSlop ) int visiblePolicy int visibleSlop void wxStyledTextCtrl::DelLineLeft() void wxStyledTextCtrl::DelLineRight() void wxStyledTextCtrl::SetXOffset( newOffset ) int newOffset int wxStyledTextCtrl::GetXOffset() void wxStyledTextCtrl::SetXCaretPolicy( caretPolicy, caretSlop ) int caretPolicy int caretSlop void wxStyledTextCtrl::SetYCaretPolicy( caretPolicy, caretSlop ) int caretPolicy int caretSlop void wxStyledTextCtrl::StartRecord() void wxStyledTextCtrl::StopRecord() void wxStyledTextCtrl::Colourise( start, end ) int start int end void wxStyledTextCtrl::SetProperty( key, value ) wxString key wxString value void wxStyledTextCtrl::SetKeyWords( keywordSet, keyWords ) int keywordSet wxString keyWords void wxStyledTextCtrl::SetLexerLanguage( language ) wxString language ## Retrieve the selected text wxString wxStyledTextCtrl::GetSelectedText() ## Retrieve a range of text wxString wxStyledTextCtrl::GetTextRange(startPos, endPos) int startPos int endPos ## Retrieve all the text in the document. wxString wxStyledTextCtrl::GetText() ## Returns the position of the opposite end of the selection to the caret. int wxStyledTextCtrl::GetAnchor() ## Returns the style byte at the position int wxStyledTextCtrl::GetStyleAt(pos) int pos ## Redoes the next action on the undo history. void wxStyledTextCtrl::Redo() ## Select all the text in the document. void wxStyledTextCtrl::SelectAll() ## Remember the current position in the undo history as the position ## at which the document was saved. void wxStyledTextCtrl::SetSavePoint() ## Replace the contents of the document with the argument text. void wxStyledTextCtrl::SetText(text) wxString text ## Are there any redoable actions in the undo history? bool wxStyledTextCtrl::CanRedo() ## Retrieve the line number at which a particular marker is located. int wxStyledTextCtrl::MarkerLineFromHandle( handle ) int handle ## Delete a marker void wxStyledTextCtrl::MarkerDeleteHandle( handle ) int handle ## Is undo history being collected? bool wxStyledTextCtrl::GetUndoCollection() ## Are white space characters currently visible? ## Returns one of SCWS_* constants. int wxStyledTextCtrl::GetViewWhiteSpace() ## Make white space characters invisible, always visible or visible outside indentation. void wxStyledTextCtrl::SetViewWhiteSpace( viewWs ) int viewWs ## Find the position from a point within the window. int wxStyledTextCtrl::PositionFromPoint( pt ) wxPoint pt int wxStyledTextCtrl::PositionFromPointClose( x, y ) int x int y ## Set caret to start of a line and ensure it is visible. void wxStyledTextCtrl::GotoLine(line) int line ## Set caret to a position and ensure it is visible. void wxStyledTextCtrl::GotoPos(pos) int pos void wxStyledTextCtrl::SetAnchor( posAnchor ) int posAnchor int wxStyledTextCtrl::GetEndStyled() void wxStyledTextCtrl::ConvertEOLs( eolMode ) int eolMode int wxStyledTextCtrl::GetEOLMode() void wxStyledTextCtrl::SetEOLMode( eolMode ) int eolMode void wxStyledTextCtrl::StartStyling( pos, mask ) int pos int mask void wxStyledTextCtrl::SetStyling( length, style ) int length int style bool wxStyledTextCtrl::GetBufferedDraw() void wxStyledTextCtrl::SetBufferedDraw( buffered ) bool buffered void wxStyledTextCtrl::SetTabWidth( tabWidth ) int tabWidth int wxStyledTextCtrl::GetTabWidth() void wxStyledTextCtrl::SetCodePage( codePage ) int codePage void wxStyledTextCtrl::MarkerDefine( markerNumber, markerSymbol, foreground, background ) int markerNumber int markerSymbol wxColour* foreground wxColour* background CODE: THIS->MarkerDefine( markerNumber, markerSymbol, *foreground, *background ); void wxStyledTextCtrl::MarkerDefineBitmap( markerNumber, bmp ) int markerNumber wxBitmap* bmp C_ARGS: markerNumber, *bmp void wxStyledTextCtrl::MarkerSetForeground( markerNumber, fore ) int markerNumber wxColour* fore CODE: THIS->MarkerSetForeground( markerNumber, *fore ); void wxStyledTextCtrl::MarkerSetBackground( markerNumber, back ) int markerNumber wxColour* back CODE: THIS->MarkerSetBackground( markerNumber, *back ); int wxStyledTextCtrl::MarkerAdd( line, markerNumber ) int line int markerNumber void wxStyledTextCtrl::MarkerDelete( line, markerNumber ) int line int markerNumber void wxStyledTextCtrl::MarkerDeleteAll( markerNumber ) int markerNumber int wxStyledTextCtrl::MarkerGet( line ) int line int wxStyledTextCtrl::MarkerNext( lineStart, markerMask ) int lineStart int markerMask int wxStyledTextCtrl::MarkerPrevious( lineStart, markerMask ) int lineStart int markerMask void wxStyledTextCtrl::SetMarginType( margin, marginType ) int margin int marginType int wxStyledTextCtrl::GetMarginType( margin ) int margin void wxStyledTextCtrl::SetMarginWidth( margin, pixelWidth ) int margin int pixelWidth int wxStyledTextCtrl::GetMarginWidth( margin ) int margin void wxStyledTextCtrl::SetMarginMask( margin, mask ) int margin int mask int wxStyledTextCtrl::GetMarginMask( margin ) int margin void wxStyledTextCtrl::SetMarginSensitive( margin, sensitive ) int margin bool sensitive bool wxStyledTextCtrl::GetMarginSensitive( margin ) int margin ## Returns the position of the caret int wxStyledTextCtrl::GetCurrentPos() int wxStyledTextCtrl::GetLength() int wxStyledTextCtrl::GetCharAt( pos ) int pos ## Sets whether text is word wrapped void wxStyledTextCtrl::SetWrapMode(mode) int mode ## Retrieve whether text is word wrapped int wxStyledTextCtrl::GetWrapMode() ## Retrieve the contents of a line. wxString wxStyledTextCtrl::GetLine(line) int line ## Delete all text in the document void wxStyledTextCtrl::ClearAll() ## Returns the line number of the line with the caret. int wxStyledTextCtrl::GetCurrentLine() void wxStyledTextCtrl::CmdKeyExecute( cmd ) int cmd void wxStyledTextCtrl::SetMargins( left, right ) int left int right void wxStyledTextCtrl::SetUndoCollection( collectUndo ) bool collectUndo wxColour* wxStyledTextCtrl::IndicatorGetForeground( indic ) int indic CODE: RETVAL = new wxColour( THIS->IndicatorGetForeground( indic ) ); OUTPUT: RETVAL #if WXPERL_W_VERSION_LT( 2, 7, 0 ) wxColour* wxStyledTextCtrl::GetCaretLineBack() CODE: RETVAL = new wxColour( THIS->GetCaretLineBack() ); OUTPUT: RETVAL #endif wxColour* wxStyledTextCtrl::GetCaretForeground() CODE: RETVAL = new wxColour( THIS->GetCaretForeground() ); OUTPUT: RETVAL int wxStyledTextCtrl::FormatRange( doDraw , startPos , endPos , draw , target , renderRect , pageRect ) bool doDraw int startPos int endPos wxDC* draw wxDC* target wxRect* renderRect wxRect* pageRect CODE: RETVAL = THIS->FormatRange( doDraw, startPos, endPos, draw, target, *renderRect, *pageRect ); OUTPUT: RETVAL wxColour* wxStyledTextCtrl::GetEdgeColour() CODE: RETVAL = new wxColour( THIS->GetEdgeColour() ); OUTPUT: RETVAL bool wxStyledTextCtrl::GetLastKeydownProcessed() void wxStyledTextCtrl::SetLastKeydownProcessed( val ) bool val wxPoint* wxStyledTextCtrl::PointFromPosition( pos ) int pos CODE: RETVAL = new wxPoint( THIS->PointFromPosition( pos ) ); OUTPUT: RETVAL void wxStyledTextCtrl::ScrollToLine( line ) int line void wxStyledTextCtrl::SetHScrollBar( bar ) wxScrollBar* bar void wxStyledTextCtrl::SetVScrollBar( bar ) wxScrollBar* bar void wxStyledTextCtrl::GetSelection() PREINIT: int start, end; PPCODE: THIS->GetSelection( &start, &end ); XPUSHs( newSViv( start ) ); XPUSHs( newSViv( end ) ); bool wxStyledTextCtrl::SaveFile(wxString filename) bool wxStyledTextCtrl::LoadFile(wxString filename) #if WXPERL_W_VERSION_GE( 2, 6, 0 ) && WXPERL_W_VERSION_LT( 2, 9, 4 ) void wxStyledTextCtrl::AddTextRaw( text ) const char* text = wxUSE_UNICODE ? SvPVutf8( $arg, PL_na ) : SvPV( $arg, PL_na ); void wxStyledTextCtrl::InsertTextRaw( pos, text ) int pos const char* text = wxUSE_UNICODE ? SvPVutf8( $arg, PL_na ) : SvPV( $arg, PL_na ); void wxStyledTextCtrl::AppendTextRaw( text ) const char* text = wxUSE_UNICODE ? SvPVutf8( $arg, PL_na ) : SvPV( $arg, PL_na ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 4 ) void wxStyledTextCtrl::AddTextRaw( text, length = -1 ) const char* text = SvPVutf8( $arg, PL_na ); int length void wxStyledTextCtrl::InsertTextRaw( pos, text ) int pos const char* text = SvPVutf8( $arg, PL_na ); void wxStyledTextCtrl::AppendTextRaw( text, length = -1 ) const char* text = SvPVutf8( $arg, PL_na ); int length #endif %} void Allocate( int bytes ); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) void AppendText( const wxString& text ); #endif int AutoCompGetCurrent(); int AutoCompGetTypeSeparator(); void AutoCompSetTypeSeparator( int separatorCharacter ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void AutoCompSetMaxWidth( int characterCount ); int AutoCompGetMaxWidth(); void AutoCompSetMaxHeight( int rowCount ); int AutoCompGetMaxHeight(); #endif void AutoCompSetIgnoreCase( bool ignoreCase ); void BackTab(); void CallTipSetForeground( const wxColour& fore ); void CallTipSetForegroundHighlight( const wxColour& fore ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void CallTipUseStyle( int tabSize ); #endif void Cancel(); void CharLeft(); void CharLeftExtend(); void CharRight(); void CharRightExtend(); void CharLeftRectExtend(); void CharRightRectExtend(); void ChooseCaretX(); void ClearRegisteredImages(); void CopyRange( int start, int end ); void CopyText( int length, const wxString& text ); void DelWordLeft(); void DelWordRight(); void DeleteBack(); void DeleteBackNotLine(); #if wxUSE_DRAG_AND_DROP wxDragResult DoDragOver( wxCoord x, wxCoord y, wxDragResult def ); bool DoDropText( long x, long y, const wxString& data ); #endif void DocumentStart(); void DocumentStartExtend(); void DocumentEnd(); void DocumentEndExtend(); void EditToggleOvertype(); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) int FindColumn( int line, int column ); #endif void FormFeed(); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void SetCaretLineBackAlpha( int alpha ); int GetCaretLineBackAlpha(); wxColour GetCaretLineBackground(); bool GetCaretSticky(); void SetCaretSticky( bool useCaretStickyBehaviour ); void ToggleCaretSticky(); #endif int GetLineSelStartPosition( int line ); int GetLineSelEndPosition( int line ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void SetPasteConvertEndings( bool convert ); bool GetPasteConvertEndings(); #endif void SetPrintWrapMode( int mode ); int GetPrintWrapMode(); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxString GetProperty( const wxString& key ); wxString GetPropertyExpanded( const wxString& key ); int GetPropertyInt( const wxString& key ); #endif int GetSTCCursor(); void SetSTCCursor( int cursorType ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) int GetSelAlpha(); void SetSelAlpha( int alpha ); int GetStyleBitsNeeded(); #endif bool GetTwoPhaseDraw(); void SetTwoPhaseDraw( bool twoPhase ); void SetUseAntiAliasing( bool useAA ); bool GetUseAntiAliasing(); void SetUseVerticalScrollBar( bool show ); bool GetUseVerticalScrollBar(); void SetWrapVisualFlags( int wrapVisualFlags ); int GetWrapVisualFlags(); void SetWrapVisualFlagsLocation( int wrapVisualFlagsLocation ); int GetWrapVisualFlagsLocation(); void SetWrapStartIndent( int indent ); int GetWrapStartIndent(); void Home(); void HomeExtend(); void HomeRectExtend(); void HomeWrap(); void HomeWrapExtend(); void LineCopy(); void LineCut(); void LineDelete(); void LineDownExtend(); void LineDownRectExtend(); void LineDuplicate(); void LineEnd(); void LineEndExtend(); void LineEndRectExtend(); void LineEndWrap(); void LineEndWrapExtend(); void LineScrollDown(); void LineScrollUp(); void LineTranspose(); void LineUpExtend(); void LineUpRectExtend(); void LineUp(); void LineDown(); void LinesJoin(); void LinesSplit( int pixelWidth ); void LowerCase(); void UpperCase(); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void MarkerAddSet( int line, int set ); void MarkerSetAlpha( int markerNumber, int alpha ); #endif void NewLine(); void PageDown(); void PageDownExtend(); void PageDownRectExtend(); void PageUp(); void PageUpExtend(); void PageUpRectExtend(); void ParaDown(); void ParaDownExtend(); void ParaUp(); void ParaUpExtend(); int PositionBefore( int pos ); int PositionAfter( int pos ); void RegisterImage( int type, const wxBitmap& bmp ); void ScrollToColumn( int column ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void SelectionDuplicate(); #endif void SetCharsDefault(); void SetFoldMarginColour( bool useSetting, const wxColour& back ); void SetFoldMarginHiColour( bool useSetting, const wxColour& fore ); void SetHotspotActiveForeground( bool useSetting, const wxColour& fore ); void SetHotspotActiveBackground( bool useSetting, const wxColour& back ); void SetHotspotActiveUnderline( bool underline ); void SetHotspotSingleLine( bool singleLine ); void SetWhitespaceChars( const wxString& characters ); void StutteredPageUp(); void StutteredPageUpExtend(); void StutteredPageDown(); void StutteredPageDownExtend(); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) void StyleSetFontEncoding( int style, wxFontEncoding encoding ); #endif void StyleSetHotSpot( int style, bool hotspot ); void Tab(); void TargetFromSelection(); void VCHome(); void VCHomeExtend(); void VCHomeRectExtend(); void VCHomeWrap(); void VCHomeWrapExtend(); void WordLeft(); void WordLeftEnd(); void WordLeftEndExtend(); void WordLeftExtend(); void WordRight(); void WordRightEnd(); void WordRightEndExtend(); void WordRightExtend(); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) int WrapCount( int line ); #endif void ZoomIn(); void ZoomOut(); #if WXPERL_W_VERSION_GE( 2, 9, 4 ) void SetWhitespaceSize(int size); int GetWhitespaceSize() const; void SetWrapIndentMode(int mode); int GetWrapIndentMode() const; void SetFirstVisibleLine(int lineDisplay); void CopyAllowLine(); const char* GetCharacterPointer(); void SetKeysUnicode(bool keysUnicode); bool GetKeysUnicode() const; void IndicatorSetAlpha(int indicator, int alpha); int IndicatorGetAlpha(int indicator) const; void SetExtraAscent(int extraAscent); int GetExtraAscent() const; void SetExtraDescent(int extraDescent); int GetExtraDescent() const; int GetMarkerSymbolDefined(int markerNumber); void MarginSetText(int line, const wxString& text); wxString MarginGetText(int line) const; void MarginSetStyle(int line, int style); int MarginGetStyle(int line) const; void MarginSetStyles(int line, const wxString& styles); wxString MarginGetStyles(int line) const; void MarginTextClearAll(); void MarginSetStyleOffset(int style); int MarginGetStyleOffset() const; void AnnotationSetText(int line, const wxString& text); wxString AnnotationGetText(int line) const; void AnnotationSetStyle(int line, int style); int AnnotationGetStyle(int line) const; void AnnotationSetStyles(int line, const wxString& styles); wxString AnnotationGetStyles(int line) const; int AnnotationGetLines(int line) const; void AnnotationClearAll(); void AnnotationSetVisible(int visible); int AnnotationGetVisible() const; void AnnotationSetStyleOffset(int style); int AnnotationGetStyleOffset() const; void AddUndoAction(int token, int flags); int CharPositionFromPoint(int x, int y); int CharPositionFromPointClose(int x, int y); void SetMultipleSelection(bool multipleSelection); bool GetMultipleSelection() const; void SetAdditionalSelectionTyping(bool additionalSelectionTyping); bool GetAdditionalSelectionTyping() const; void SetAdditionalCaretsBlink(bool additionalCaretsBlink); bool GetAdditionalCaretsBlink() const; void SetAdditionalCaretsVisible(bool additionalCaretsBlink); bool GetAdditionalCaretsVisible() const; int GetSelections() const; void ClearSelections(); int AddSelection(int caret, int anchor); void SetMainSelection(int selection); int GetMainSelection() const; void SetSelectionNCaret(int selection, int pos); int GetSelectionNCaret(int selection) const; void SetSelectionNAnchor(int selection, int posAnchor); int GetSelectionNAnchor(int selection) const; void SetSelectionNCaretVirtualSpace(int selection, int space); int GetSelectionNCaretVirtualSpace(int selection) const; void SetSelectionNAnchorVirtualSpace(int selection, int space); int GetSelectionNAnchorVirtualSpace(int selection) const; void SetSelectionNStart(int selection, int pos); int GetSelectionNStart(int selection) const; void SetSelectionNEnd(int selection, int pos); int GetSelectionNEnd(int selection) const; void SetRectangularSelectionCaret(int pos); int GetRectangularSelectionCaret() const; void SetRectangularSelectionAnchor(int posAnchor); int GetRectangularSelectionAnchor() const; void SetRectangularSelectionCaretVirtualSpace(int space); int GetRectangularSelectionCaretVirtualSpace() const; void SetRectangularSelectionAnchorVirtualSpace(int space); int GetRectangularSelectionAnchorVirtualSpace() const; void SetVirtualSpaceOptions(int virtualSpaceOptions); int GetVirtualSpaceOptions() const; void SetRectangularSelectionModifier(int modifier); int GetRectangularSelectionModifier() const; void SetAdditionalSelForeground(const wxColour& fore); void SetAdditionalSelBackground(const wxColour& back); void SetAdditionalSelAlpha(int alpha); int GetAdditionalSelAlpha() const; void SetAdditionalCaretForeground(const wxColour& fore); wxColour GetAdditionalCaretForeground() const; void RotateSelection(); void SwapMainAnchorCaret(); #endif }; Wx-0.9923/ext/stc/XS/StyledTextEvent.xsp000664000000000000 410012306612241 16243 0ustar00Mark000000000000############################################################################# ## Name: ext/stc/XS/StyledTextEvent.xsp ## Purpose: XS++ for Wx::StyledTextEvent ## Author: Mattia Barbon ## Created: 27/12/2003 ## RCS-ID: $Id: StyledTextEvent.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2003-2004 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}; %typemap{wxStyledTextEvent*}{simple}; %typemap{wxDragResult}{simple}; %name{Wx::StyledTextEvent} class wxStyledTextEvent { void SetPosition(int pos); void SetKey(int k); void SetModifiers(int m); void SetModificationType(int t); void SetText(const wxString& t); void SetLength(int len); void SetLinesAdded(int num); void SetLine(int val); void SetFoldLevelNow(int val); void SetFoldLevelPrev(int val); void SetMargin(int val); void SetMessage(int val); void SetWParam(int val); void SetLParam(int val); void SetListType(int val); void SetX(int val); void SetY(int val); void SetDragText(const wxString& val); void SetDragAllowMove(bool val); #ifdef STC_USE_DND void SetDragResult(wxDragResult val); #endif int GetPosition() const; int GetKey() const; int GetModifiers() const; int GetModificationType() const; wxString GetText() const; int GetLength() const; int GetLinesAdded() const; int GetLine() const; int GetFoldLevelNow() const; int GetFoldLevelPrev() const; int GetMargin() const; int GetMessage() const; int GetWParam() const; int GetLParam() const; int GetListType() const; int GetX() const; int GetY() const; wxString GetDragText(); bool GetDragAllowMove(); #ifdef STC_USE_DND wxDragResult GetDragResult(); #endif bool GetShift() const; bool GetControl() const; bool GetAlt() const; ## virtual wxEvent* Clone() const; }; Wx-0.9923/ext/test/000775000000000000 012316265011 12155 5ustar00Mark000000000000Wx-0.9923/ext/test/cpp/000775000000000000 012316265010 12736 5ustar00Mark000000000000Wx-0.9923/ext/test/cpp/include/000775000000000000 012316265010 14361 5ustar00Mark000000000000Wx-0.9923/ext/test/cpp/include/perltest.h000664000000000000 522012306612235 16457 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/test/cpp/include/perltest.h // Purpose: test classes for wxPerl // Author: Mark Dootson // Modified by: // Created: 2012-09-28 // RCS-ID: $Id$ // Copyright: (c) 2012 Mark Dootson // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #ifndef _WXPERL_PERLTEST_CLASSES_H #define _WXPERL_PERLTEST_CLASSES_H class wxPerlTestAbstractNonObject { public: wxPerlTestAbstractNonObject( const wxString& moniker = wxT("AbstractNonObject") ); virtual ~wxPerlTestAbstractNonObject(); wxString GetMoniker() const { return m_moniker; } wxString GetMessage() const { return DoGetMessage(); } virtual wxString DoGetMessage() const = 0; virtual wxString EchoClassName() { return wxT("wxPerlTestAbstractNonObject"); } virtual wxString OnlyInBase() { return wxT("wxPerlTestAbstractNonObject"); } private: wxString m_moniker; DECLARE_NO_COPY_CLASS(wxPerlTestAbstractNonObject); }; class wxPerlTestNonObject: public wxPerlTestAbstractNonObject { public: wxPerlTestNonObject( const wxString& moniker = wxT("NonObject") ); virtual ~wxPerlTestNonObject(); virtual wxString DoGetMessage() const; virtual wxString EchoClassName() { return wxT("wxPerlTestNonObject"); } private: DECLARE_NO_COPY_CLASS(wxPerlTestNonObject); }; class wxPerlTestAbstractObject: public wxObject { public: wxPerlTestAbstractObject( const wxString& moniker = wxT("AbstractObject") ); virtual ~wxPerlTestAbstractObject(); wxString GetMoniker() const { return m_moniker; } wxString GetMessage() const { return DoGetMessage(); } virtual wxString DoGetMessage() const = 0; virtual wxString EchoClassName() { return wxT("wxPerlTestAbstractObject"); } virtual wxString OnlyInBase() { return wxT("wxPerlTestAbstractObject"); } private: wxString m_moniker; DECLARE_ABSTRACT_CLASS(wxPerlTestAbstractObject) DECLARE_NO_COPY_CLASS(wxPerlTestAbstractObject); }; class wxPerlTestObject: public wxPerlTestAbstractObject { public: wxPerlTestObject( const wxString& moniker = wxT("Object") ); virtual ~wxPerlTestObject(); virtual wxString DoGetMessage() const; virtual wxString EchoClassName() { return wxT("wxPerlTestObject"); } private: DECLARE_DYNAMIC_CLASS(wxPerlTestObject) DECLARE_NO_COPY_CLASS(wxPerlTestObject); }; #endif Wx-0.9923/ext/test/cpp/src/000775000000000000 012316265010 13525 5ustar00Mark000000000000Wx-0.9923/ext/test/cpp/src/perltest.cpp000664000000000000 335612306612235 16166 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/test/cpp/src/perltest.cpp // Purpose: test classes for wxPerl // Author: Mark Dootson // Modified by: // Created: 2012-09-28 // RCS-ID: $Id$ // Copyright: (c) 2012 Mark Dootson // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #include "cpp/include/perltest.h" // ---------------------------------------------------------------------------- wxPerlTestAbstractNonObject::wxPerlTestAbstractNonObject( const wxString& moniker ) { m_moniker = moniker; } wxPerlTestAbstractNonObject::~wxPerlTestAbstractNonObject() { } wxPerlTestNonObject::wxPerlTestNonObject( const wxString& moniker ) : wxPerlTestAbstractNonObject( moniker ) { } wxPerlTestNonObject::~wxPerlTestNonObject() { } wxPerlTestAbstractObject::wxPerlTestAbstractObject( const wxString& moniker ) : wxObject() { m_moniker = moniker; } wxPerlTestAbstractObject::~wxPerlTestAbstractObject() { } wxPerlTestObject::wxPerlTestObject( const wxString& moniker ) : wxPerlTestAbstractObject( moniker ) { } wxPerlTestObject::~wxPerlTestObject() { } wxString wxPerlTestNonObject::DoGetMessage() const { return wxT("A message from the C++ class wxPerlTestNonObject"); } IMPLEMENT_ABSTRACT_CLASS(wxPerlTestAbstractObject, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxPerlTestObject, wxPerlTestAbstractObject) wxString wxPerlTestObject::DoGetMessage() const { return wxT("A message from the C++ class wxPerlTestObject"); } Wx-0.9923/ext/test/lib/000775000000000000 012316265011 12723 5ustar00Mark000000000000Wx-0.9923/ext/test/lib/Wx/000775000000000000 012316265011 13321 5ustar00Mark000000000000Wx-0.9923/ext/test/lib/Wx/PerlTest.pm000664000000000000 145212306612235 15506 0ustar00Mark000000000000############################################################################# ## Name: ext/test/lib/Wx/PerlTest.pm ## Purpose: Wx::PerlTest various tests ## Author: Mark Dootson ## Modified by: ## Created: 2012-09-28 ## RCS-ID: $Id: PerlTest.pm 3395 2012-09-29 02:01:49Z mdootson $ ## Copyright: (c) 2012 Mark Dootson ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::PerlTest; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::wx_boot( 'Wx::PerlTest', $VERSION ); # # properly setup inheritance tree # no strict; use strict; 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/test/Makefile.PL000664000000000000 151212306612235 14211 0ustar00Mark000000000000############################################################################# ## Name: ext/test/Makefile.PL ## Purpose: Makefile.PL for wxPerlTest ## Author: Mark Dootson ## Modified by: ## Created: 2012-09-28 ## RCS-ID: $Id: Makefile.PL 3395 2012-09-29 02:01:49Z mdootson $ ## Copyright: (c) 2012 Mark Dootson ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::PerlTest', VERSION_FROM => 'lib/Wx/PerlTest.pm', WX_CORE_LIB => 'core base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/test/PerlTest.xs000664000000000000 156112306612235 14361 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: PerlTest.xs // Purpose: XS for PerlTest // Author: Mark Dootson // Modified by: // Created: 2012-09-28 // RCS-ID: $Id:$ // Copyright: (c) 2012 Mark Dootson // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/constants.h" #include "cpp/overload.h" #undef THIS #include MODULE = Wx__PerlTest BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); #include "cpp/include/perltest.h" INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/PerlTest.xsp MODULE = Wx__PerlTest Wx-0.9923/ext/test/t/000775000000000000 012316265010 12417 5ustar00Mark000000000000Wx-0.9923/ext/test/t/01_load.t000775000000000000 121712306612235 14113 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::PerlTest; package MyAbstractNonObject; use base qw( Wx::PlPerlTestAbstractNonObject ); sub new { shift->SUPER::new( @_ ) } package MyNonObject; use base qw( Wx::PlPerlTestNonObject ); sub new { shift->SUPER::new( @_ ) } package MyAbstractObject; use base qw( Wx::PlPerlTestAbstractObject ); sub new { shift->SUPER::new( @_ ) } package main; my $anonobj = MyAbstractNonObject->new; my $aobj = MyAbstractObject->new; my $nonobj = MyNonObject->new; my $obj = Wx::PerlTestObject->new; print "ok\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/test/t/02_inheritance.t000775000000000000 36512306612235 15451 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::PerlTest; test_inheritance_end(); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/test/t/03_threads.t000775000000000000 223012306612235 14624 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use Test::More tests => 4; use Wx::PerlTest; package MyAbstractNonObject; use base qw( Wx::PlPerlTestAbstractNonObject ); sub new { shift->SUPER::new( @_ ) } package MyAbstractObject; use base qw( Wx::PlPerlTestAbstractObject ); sub new { shift->SUPER::new( @_ ) } package MyNonObject; use base qw( Wx::PlPerlTestNonObject ); sub new { shift->SUPER::new( @_ ) } package main; my $app = Wx::App->new( sub { 1 } ); my $anonobj = MyAbstractNonObject->new; my $aobj = MyAbstractObject->new; my $nonobj = MyNonObject->new; my $obj = Wx::PerlTestObject->new; my $anonobj2 = MyAbstractNonObject->new; my $aobj2 = MyAbstractObject->new; my $nonobj2 = MyNonObject->new; my $obj2 = Wx::PerlTestObject->new; undef $anonobj2; undef $aobj2; undef $nonobj2; undef $obj2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/test/t/07_callback.t000775000000000000 200612306612235 14733 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx::PerlTest; use Test::More 'tests' => 4; package MyAbstractNonObject; use base qw( Wx::PlPerlTestAbstractNonObject ); sub new { my $class = shift; my $self = $class->SUPER::new( @_ ); $self->{storedmsg} = 'Foo Bar'; return $self; } sub DoGetMessage { return $_[0]->{storedmsg}; } package MyNonObject; use base qw( MyAbstractNonObject ); sub new { my $class = shift; my $self = $class->SUPER::new( 'My None Object' ); $self->{storedmsg} = 'Foo Bar Crazy'; return $self; } sub DoGetMessage { return $_[0]->SUPER::DoGetMessage(); } package main; my $anonobj = MyAbstractNonObject->new; my $nonobj = MyNonObject->new; is( $anonobj->GetMoniker, 'AbstractNonObject', 'Base Moniker Works'); is( $anonobj->GetMessage, 'Foo Bar', 'Custom Message From Hash Object' ); is( $nonobj->GetMoniker, 'My None Object', 'Derived Moniker Works'); is( $nonobj->GetMessage, 'Foo Bar Crazy', 'Derived Non obj' ); # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/test/typemap000664000000000000 160212306612235 13641 0ustar00Mark000000000000############################################################################# ## Name: ext/test/typemap ## Purpose: typemap ## Author: Mark Dootson ## Modified by: ## Created: 2012-09-28 ## RCS-ID: $Id:$ ## Copyright: (c) 2012 Mark Dootson ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxPerlTestAbstractNonObject * O_NON_WXOBJECT_THR wxPlPerlTestAbstractNonObject * O_NON_WXOBJECT_VXSP_THR wxPerlTestNonObject * O_NON_WXOBJECT_THR wxPlPerlTestNonObject * O_NON_WXOBJECT_VXSP_THR wxPerlTestAbstractObject * O_WXOBJECT_THR wxPlPerlTestAbstractObject * O_WXOBJECT_THR wxPerlTestObject * O_WXOBJECT_THR wxPlPerlTestObject * O_WXOBJECT_THR Wx-0.9923/ext/test/typemap.xsp000664000000000000 151312306612235 14453 0ustar00Mark000000000000############################################################################# ## Name: ext/test/typemap.xsp ## Purpose: XS++ typemap ## Author: Mark Dootson ## Modified by: ## Created: 2012-09-28 ## RCS-ID: $Id:$ ## Copyright: (c) 2012 Mark Dootson ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %typemap{wxPerlTestAbstractNonObject*}{simple}; %typemap{wxPlPerlTestAbstractNonObject*}{simple}; %typemap{wxPerlTestNonObject*}{simple}; %typemap{wxPlPerlTestNonObject*}{simple}; %typemap{wxPerlTestAbstractObject*}{simple}; %typemap{wxPlPerlTestAbstractObject*}{simple}; %typemap{wxPerlTestObject*}{simple}; %typemap{wxPlPerlTestObject*}{simple}; Wx-0.9923/ext/test/XS/000775000000000000 012316265011 12507 5ustar00Mark000000000000Wx-0.9923/ext/test/XS/PerlTest.xsp000664000000000000 766312306612235 15104 0ustar00Mark000000000000############################################################################# ## Name: ext/test/XS/PerlTest.xsp ## Purpose: XS++ for Wx::PerlTest ## Author: Mark Dootson ## Modified by: ## Created: 2012-09-28 ## RCS-ID: $Id: $ ## Copyright: (c) 2012 Mark Dootson ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %module{Wx}; %loadplugin{build::Wx::XSP::Virtual}; %name{Wx::PerlTestAbstractNonObject} class wxPerlTestAbstractNonObject { %NoVirtualBase; %VirtualNonObject; %{ static void wxPerlTestAbstractNonObject::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: wxPerlTestAbstractNonObject( const wxString& moniker = wxT("AbstractNonObject") ); virtual ~wxPerlTestAbstractNonObject() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; %}; wxString GetMoniker() const; wxString GetMessage() const; virtual wxString DoGetMessage() const %Virtual{pure}; virtual wxString EchoClassName() %Virtual; virtual wxString OnlyInBase() %Virtual; }; %name{Wx::PerlTestNonObject} class wxPerlTestNonObject : public %name{Wx::PerlTestAbstractNonObject} wxPerlTestAbstractNonObject { %NoVirtualBase; %VirtualNonObject; %{ static void wxPerlTestNonObject::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: wxPerlTestNonObject( const wxString& moniker = wxT("NonObject") ); virtual ~wxPerlTestNonObject() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; %}; virtual wxString DoGetMessage() const %Virtual; virtual wxString EchoClassName() %Virtual; }; %name{Wx::PerlTestAbstractObject} class wxPerlTestAbstractObject : public %name{Wx::Object} wxObject { %NoVirtualBase; %VirtualImplementation{ %Name{wxPlPerlTestAbstractObject}; %Declaration{% WXPLI_DECLARE_DYNAMIC_CLASS( wxPlPerlTestAbstractObject ); %}; %Implementation{% WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlPerlTestAbstractObject, wxPerlTestAbstractObject ); %}; }; %{ static void wxPerlTestAbstractObject::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: wxPerlTestAbstractObject( const wxString& moniker = wxT("AbstractObject") ); virtual ~wxPerlTestAbstractObject() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; %}; wxString GetMoniker() const; wxString GetMessage() const; virtual wxString DoGetMessage() const %Virtual{pure}; virtual wxString EchoClassName() %Virtual; virtual wxString OnlyInBase() %Virtual; }; %name{Wx::PerlTestObject} class wxPerlTestObject : public %name{Wx::PerlTestAbstractObject} wxPerlTestAbstractObject { %NoVirtualBase; %VirtualImplementation{ %Name{wxPlPerlTestObject}; %Declaration{% WXPLI_DECLARE_DYNAMIC_CLASS( wxPlPerlTestObject ); %}; %Implementation{% WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlPerlTestObject, wxPerlTestObject ); %}; }; %{ static void wxPerlTestObject::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: wxPerlTestObject( const wxString& moniker = wxT("Object") ); virtual ~wxPerlTestObject() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; %}; virtual wxString DoGetMessage() const %Virtual; virtual wxString EchoClassName() %Virtual; }; Wx-0.9923/ext/webview/000775000000000000 012316265011 12646 5ustar00Mark000000000000Wx-0.9923/ext/webview/lib/000775000000000000 012316265011 13414 5ustar00Mark000000000000Wx-0.9923/ext/webview/lib/Wx/000775000000000000 012316265011 14012 5ustar00Mark000000000000Wx-0.9923/ext/webview/lib/Wx/WebView.pm000664000000000000 214212306612246 16004 0ustar00Mark000000000000############################################################################# ## Name: ext/webview/lib/Wx/WebView.pm ## Purpose: Wx::WebView and related classes ## Author: Mark Dootson ## Created: 17/03/2012 ## SVN-ID: $Id: WebView.pm 3220 2012-03-18 03:02:46Z mdootson $ ## Copyright: (c) 2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# BEGIN { package Wx::WebView; our $__wx_webview_present = Wx::_wx_optmod_webview(); } package Wx::WebView; use strict; our $VERSION = '0.01'; our $__wx_webview_present; if( $__wx_webview_present ) { Wx::load_dll( 'webview' ); Wx::wx_boot( 'Wx::WebView', $VERSION ); } # # properly setup inheritance tree # no strict; package Wx::WebViewHandler; package Wx::WebViewArchiveHandler; @ISA = qw( Wx::WebViewHandler ); package Wx::WebViewEvent; @ISA = qw( Wx::NotifyEvent ); package Wx::WebView; @ISA = qw( Wx::Control ); 1; Wx-0.9923/ext/webview/Makefile.PL000664000000000000 165612313647521 14717 0ustar00Mark000000000000############################################################################# ## Name: ext/webview/Makefile.PL ## Purpose: Makefile.PL for wxWebView ## Author: Mark Dootson ## Modified by: ## Created: 17/03/2012 ## SVN-ID: $Id: Makefile.PL 3220 2012-03-18 03:02:46Z mdootson $ ## Copyright: (c) 2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use Config; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::WebView', VERSION_FROM => 'lib/Wx/WebView.pm', REQUIRE_WX => 2.009003, WX_CORE_LIB => 'webview core base', REQUIRE_WX_LIB => 'webview', NO_WX_PLATFORMS => [ ], ); Wx-0.9923/ext/webview/t/000775000000000000 012316265011 13111 5ustar00Mark000000000000Wx-0.9923/ext/webview/t/01_load.t000775000000000000 14212306612245 14561 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Test::More tests => 1; use Wx; use_ok( 'Wx::WebView' ); 1; Wx-0.9923/ext/webview/t/02_inheritance.t000775000000000000 43112306612245 16135 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib "../../t"; use if !Wx::_wx_optmod_webview(), 'Test::More' => skip_all => 'No WebView Support'; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); BEGIN { test_inheritance_start() } use Wx::WebView; test_inheritance_end(); Wx-0.9923/ext/webview/t/03_threads.t000775000000000000 175612313646123 15332 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::_wx_optmod_webview(), 'Test::More' => skip_all => 'No WebView Support'; use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use Test::More tests => 4; use Wx::WebView; my $app = Wx::App->new( sub { 1 } ); my $frame = Wx::Frame->new(undef, -1, 'Test Frame'); my $wcontrol = Wx::WebView::NewDefault(); my $wcontrol2 = Wx::WebView::New($frame, -1); my $march1 = Wx::WebViewArchiveHandler->new('zip'); my $march2 = Wx::WebViewArchiveHandler->new('zip'); my $item1 = Wx::WebViewHistoryItem->new('someurl', 'sometitle'); my $item2 = Wx::WebViewHistoryItem->new('someurl', 'sometitle'); $wcontrol2->Destroy; undef $wcontrol2; undef $march2; undef $item2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/webview/typemap000664000000000000 157612306612245 14345 0ustar00Mark000000000000############################################################################# ## Name: ext/webview/typemap ## Purpose: typemap ## Author: Mark Dootson ## Modified by: ## Created: 17/03/2012 ## SVN-ID: $Id:$ ## Copyright: (c) 2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxWebViewHandler * O_NON_WXOBJECT wxWebViewHistoryItem * O_NON_WXOBJECT_THR wxWebViewArchiveHandler * O_NON_WXOBJECT wxWebViewEvent * O_WXOBJECT wxWebView * O_WXEVTHANDLER wxWebViewBackend T_ENUM wxWebViewReloadFlags T_ENUM wxWebViewZoomType T_ENUM wxWebViewZoom T_ENUM wxFSFile * O_NON_WXOBJECT_THR Wx-0.9923/ext/webview/typemap.xsp000664000000000000 165312313652523 15153 0ustar00Mark000000000000############################################################################# ## Name: ext/webview/typemap.xsp ## Purpose: typemap file for xsubppp.pl ## Author: Mark Dootson ## Modified by: ## Created: 17/03/2012 ## SVN-ID: $Id: $ ## Copyright: (c) 2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %typemap{wxWebViewHandler*}{simple}; %typemap{wxWebViewHistoryItem*}{simple}; %typemap{wxWebViewArchiveHandler*}{simple}; %typemap{wxWebViewEvent*}{simple}; %typemap{wxWebView*}{simple}; %typemap{wxWebViewBackend}{simple}; %typemap{wxWebViewReloadFlags}{simple}; %typemap{wxWebViewZoomType}{simple}; %typemap{wxWebViewZoom}{simple}; %typemap{wxFSFile*}{simple}; %typemap{wxInputStream&}{reference}; %typemap{void*}{simple}; Wx-0.9923/ext/webview/WebView.xs000664000000000000 260312313652624 14662 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/webview/WebView.xs // Purpose: XS for Wx::WebView // Author: Mark Dootson // Modified by: // Created: 17/03/2012 // SVN-ID: $Id: $ // Copyright: (c) 2012 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/constants.h" #include "cpp/overload.h" #undef THIS #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_WEBVIEW #include #include #include #include "cpp/streams.h" #include "cpp/helpers.h" #endif MODULE=Wx__WebView BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); #if WXPERL_W_VERSION_GE( 2, 9, 3 ) && wxUSE_WEBVIEW #if WXPERL_W_VERSION_GE( 3, 0, 0) INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/WebViewV3.xsp #else INCLUDE_COMMAND: $^X -I../.. -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp -t ../../typemap.xsp XS/WebViewV2.xsp #endif MODULE=Wx__WebView PACKAGE=Wx::WebView #include "cpp/ovl_const.cpp" #endif # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__WebView Wx-0.9923/ext/webview/XS/000775000000000000 012316265011 13200 5ustar00Mark000000000000Wx-0.9923/ext/webview/XS/WebViewV2.xsp000664000000000000 1731712313652430 15627 0ustar00Mark000000000000%module{Wx}; ##///////////////////////////////////////////////////////////////////////////// ##// Name: webview.h ##// Purpose: interface of wxWebView ##// Author: wxWidgets team ##// RCS-ID: $Id$ ##// Licence: wxWindows licence ##///////////////////////////////////////////////////////////////////////////// #if wxUSE_WEBVIEW %loadplugin{build::Wx::XSP::Overload}; %loadplugin{build::Wx::XSP::Enum}; %loadplugin{build::Wx::XSP::Event}; %EventExportTag{webview}; %EnumExportTag{webview}; %Event{%EVT_WEB_VIEW_NAVIGATING(id, func)%} {wxEVT_COMMAND_WEB_VIEW_NAVIGATING}; %Event{%EVT_WEB_VIEW_NAVIGATED(id, func)%} {wxEVT_COMMAND_WEB_VIEW_NAVIGATED}; %Event{%EVT_WEB_VIEW_LOADED(id, func)%} {wxEVT_COMMAND_WEB_VIEW_LOADED}; %Event{%EVT_WEB_VIEW_ERROR(id, func)%} {wxEVT_COMMAND_WEB_VIEW_ERROR}; %Event{%EVT_WEB_VIEW_NEWWINDOW(id, func)%} {wxEVT_COMMAND_WEB_VIEW_NEWWINDOW}; %Event{%EVT_WEB_VIEW_TITLE_CHANGED(id, func)%} {wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED}; enum wxWebViewZoom { wxWEB_VIEW_ZOOM_TINY, wxWEB_VIEW_ZOOM_SMALL, wxWEB_VIEW_ZOOM_MEDIUM, wxWEB_VIEW_ZOOM_LARGE, wxWEB_VIEW_ZOOM_LARGEST }; enum wxWebViewZoomType { wxWEB_VIEW_ZOOM_TYPE_LAYOUT, wxWEB_VIEW_ZOOM_TYPE_TEXT }; enum wxWebViewNavigationError { wxWEB_NAV_ERR_CONNECTION, wxWEB_NAV_ERR_CERTIFICATE, wxWEB_NAV_ERR_AUTH, wxWEB_NAV_ERR_SECURITY, wxWEB_NAV_ERR_NOT_FOUND, wxWEB_NAV_ERR_REQUEST, wxWEB_NAV_ERR_USER_CANCELLED, wxWEB_NAV_ERR_OTHER }; enum wxWebViewReloadFlags { wxWEB_VIEW_RELOAD_DEFAULT, wxWEB_VIEW_RELOAD_NO_CACHE }; enum wxWebViewBackend { wxWEB_VIEW_BACKEND_DEFAULT, wxWEB_VIEW_BACKEND_WEBKIT, wxWEB_VIEW_BACKEND_IE }; %name{Wx::WebViewHistoryItem} class wxWebViewHistoryItem { %{ static void wxWebViewHistoryItem::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: wxWebViewHistoryItem(const wxString& url, const wxString& title); ~wxWebViewHistoryItem() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::WebViewHistoryItem", THIS, ST(0) ); delete THIS; %}; wxString GetUrl(); wxString GetTitle(); }; %name{Wx::WebViewHandler} class wxWebViewHandler { public: virtual wxFSFile* GetFile(const wxString &uri); virtual wxString GetName() const; }; %name{Wx::WebView} class wxWebView : public %name{Wx::Control} wxControl { public: static wxWebView* NewDefault(wxWebViewBackend backend = wxWEB_VIEW_BACKEND_DEFAULT) %code{% RETVAL = wxWebView::New( backend ); %} %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, "Wx::WebView" ); %}; static wxWebView* New(wxWindow* parent, wxWindowID id, const wxString& url = wxWebViewDefaultURLStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, wxWebViewBackend backend = wxWEB_VIEW_BACKEND_DEFAULT, long style = 0, const wxString& name = wxWebViewNameStr) %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, "Wx::WebView" ); %}; virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT); virtual void EnableContextMenu(bool enable = true); virtual bool IsContextMenuEnabled() const; // virtual void* GetNativeBackend() const; #if WXPERL_W_VERSION_GE( 2, 9, 5 ) virtual long Find(const wxString& text, int flags = wxWEB_VIEW_FIND_DEFAULT); #endif virtual bool Create(wxWindow* parent, wxWindowID id, const wxString& url = wxWebViewDefaultURLStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxWebViewNameStr); virtual wxString GetCurrentTitle() const; virtual wxString GetCurrentURL() const; virtual wxString GetPageSource() const; virtual wxString GetPageText() const; virtual bool IsBusy() const; virtual bool IsEditable() const; virtual void LoadURL(const wxString& url); virtual void Print(); /* TODO : IMP virtual void RegisterHandler(wxSharedPtr handler) = 0; */ virtual void RunScript(const wxString& javascript); virtual void SetEditable(bool enable = true); virtual void SetPage(const wxString& html, const wxString& baseUrl); %name{SetPageFH} virtual void SetPage(SV* fh, wxString baseUrl) %code{% wxInputStream* stream = wxPliInputStream_ctor( fh ); THIS->SetPage( *stream, baseUrl ); delete stream; %}; virtual void Stop(); virtual bool CanCopy() const; virtual bool CanCut() const; virtual bool CanPaste() const; virtual void Copy(); virtual void Cut(); virtual void Paste(); virtual bool CanGoBack(); virtual bool CanGoForward() const; virtual void ClearHistory(); virtual void EnableHistory(bool enable = true); %{ void wxWebView::GetBackwardHistory() PPCODE: wxVector > back = THIS->GetBackwardHistory(); size_t num = back.size(); EXTEND( SP, (IV)num ); for( size_t i = 0; i < num; ++i ) { PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxWebViewHistoryItem( back[i]->GetUrl(), back[i]->GetTitle() ), "Wx::WebViewHistoryItem" ) ); } void wxWebView::GetForwardHistory() PPCODE: wxVector > forward = THIS->GetForwardHistory(); size_t num = forward.size(); EXTEND( SP, (IV)num ); for( size_t i = 0; i < num; ++i ) { PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxWebViewHistoryItem( forward[i]->GetUrl(), forward[i]->GetTitle() ), "Wx::WebViewHistoryItem" ) ); } %} virtual void GoBack(); virtual void GoForward(); /* not quite the standard implementation but it makes wxWebViewHistoryItem simpler */ virtual void LoadHistoryItem( wxWebViewHistoryItem* item ) %code{% THIS->LoadURL( item->GetUrl() ); %}; virtual void ClearSelection(); virtual void DeleteSelection(); virtual wxString GetSelectedSource() const; virtual wxString GetSelectedText() const; virtual bool HasSelection() const; virtual void SelectAll(); virtual bool CanRedo() const; virtual bool CanUndo() const; virtual void Redo(); virtual void Undo(); virtual bool CanSetZoomType(wxWebViewZoomType type) const; virtual wxWebViewZoom GetZoom() const; virtual wxWebViewZoomType GetZoomType() const; virtual void SetZoom(wxWebViewZoom zoom); virtual void SetZoomType(wxWebViewZoomType zoomType); }; %name{Wx::WebViewEvent} class wxWebViewEvent : public %name{Wx::NotifyEvent} wxNotifyEvent { public: %name{newDefault} wxWebViewEvent() %Overload; %name{newFull} wxWebViewEvent(wxEventType type, int id, const wxString& href, const wxString& target) %Overload; const wxString& GetTarget() const; const wxString& GetURL() const; }; %name{Wx::WebViewArchiveHandler} class wxWebViewArchiveHandler : public %name{Wx::WebViewHandler} wxWebViewHandler { public: wxWebViewArchiveHandler(const wxString& scheme); virtual wxFSFile* GetFile(const wxString &uri); }; #endif Wx-0.9923/ext/webview/XS/WebViewV3.xsp000664000000000000 1724512313652503 15631 0ustar00Mark000000000000%module{Wx}; ##///////////////////////////////////////////////////////////////////////////// ##// Name: webview.h ##// Purpose: interface of wxWebView ##// Author: wxWidgets team ##// RCS-ID: $Id$ ##// Licence: wxWindows licence ##///////////////////////////////////////////////////////////////////////////// #if wxUSE_WEBVIEW %loadplugin{build::Wx::XSP::Overload}; %loadplugin{build::Wx::XSP::Enum}; %loadplugin{build::Wx::XSP::Event}; %EventExportTag{webview}; %EnumExportTag{webview}; %Event{%EVT_WEBVIEW_NAVIGATING(id, func)%} {wxEVT_COMMAND_WEBVIEW_NAVIGATING}; %Event{%EVT_WEBVIEW_NAVIGATED(id, func)%} {wxEVT_COMMAND_WEBVIEW_NAVIGATED}; %Event{%EVT_WEBVIEW_LOADED(id, func)%} {wxEVT_COMMAND_WEBVIEW_LOADED}; %Event{%EVT_WEBVIEW_ERROR(id, func)%} {wxEVT_COMMAND_WEBVIEW_ERROR}; %Event{%EVT_WEBVIEW_NEWWINDOW(id, func)%} {wxEVT_COMMAND_WEBVIEW_NEWWINDOW}; %Event{%EVT_WEBVIEW_TITLE_CHANGED(id, func)%} {wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED}; enum wxWebViewZoom { wxWEBVIEW_ZOOM_TINY, wxWEBVIEW_ZOOM_SMALL, wxWEBVIEW_ZOOM_MEDIUM, wxWEBVIEW_ZOOM_LARGE, wxWEBVIEW_ZOOM_LARGEST }; enum wxWebViewZoomType { wxWEBVIEW_ZOOM_TYPE_LAYOUT, wxWEBVIEW_ZOOM_TYPE_TEXT }; enum wxWebViewNavigationError { wxWEBVIEW_NAV_ERR_CONNECTION, wxWEBVIEW_NAV_ERR_CERTIFICATE, wxWEBVIEW_NAV_ERR_AUTH, wxWEBVIEW_NAV_ERR_SECURITY, wxWEBVIEW_NAV_ERR_NOT_FOUND, wxWEBVIEW_NAV_ERR_REQUEST, wxWEBVIEW_NAV_ERR_USER_CANCELLED, wxWEBVIEW_NAV_ERR_OTHER }; enum wxWebViewReloadFlags { wxWEBVIEW_RELOAD_DEFAULT, wxWEBVIEW_RELOAD_NO_CACHE }; enum wxWebViewFindFlags { wxWEBVIEW_FIND_WRAP, wxWEBVIEW_FIND_ENTIRE_WORD, wxWEBVIEW_FIND_MATCH_CASE, wxWEBVIEW_FIND_HIGHLIGHT_RESULT, wxWEBVIEW_FIND_BACKWARDS, wxWEBVIEW_FIND_DEFAULT }; %name{Wx::WebViewHistoryItem} class wxWebViewHistoryItem { %{ static void wxWebViewHistoryItem::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: wxWebViewHistoryItem(const wxString& url, const wxString& title); ~wxWebViewHistoryItem() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::WebViewHistoryItem", THIS, ST(0) ); delete THIS; %}; wxString GetUrl(); wxString GetTitle(); }; %name{Wx::WebViewHandler} class wxWebViewHandler { public: virtual wxFSFile* GetFile(const wxString &uri); virtual wxString GetName() const; }; %name{Wx::WebView} class wxWebView : public %name{Wx::Control} wxControl { public: static wxWebView* NewDefault(const wxString& backend = wxWebViewBackendDefault) %code{% RETVAL = wxWebView::New( backend ); %} %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, "Wx::WebView" ); %}; static wxWebView* New(wxWindow* parent, wxWindowID id, const wxString& url = wxWebViewDefaultURLStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxString& backend = wxWebViewBackendDefault, long style = 0, const wxString& name = wxWebViewNameStr) %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, "Wx::WebView" ); %}; virtual bool Create(wxWindow* parent, wxWindowID id, const wxString& url = wxWebViewDefaultURLStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxWebViewNameStr); virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT); virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); virtual void* GetNativeBackend() const; virtual wxString GetCurrentTitle() const; virtual wxString GetCurrentURL() const; virtual wxString GetPageSource() const; virtual wxString GetPageText() const; virtual bool IsBusy() const; virtual bool IsEditable() const; virtual void LoadURL(const wxString& url); virtual void Print(); /* TODO : IMP virtual void RegisterHandler(wxSharedPtr handler) = 0; */ virtual void RunScript(const wxString& javascript); virtual void SetEditable(bool enable = true); virtual void SetPage(const wxString& html, const wxString& baseUrl); %name{SetPageFH} virtual void SetPage(SV* fh, wxString baseUrl) %code{% wxInputStream* stream = wxPliInputStream_ctor( fh ); THIS->SetPage( *stream, baseUrl ); delete stream; %}; virtual void Stop(); virtual bool CanCopy() const; virtual bool CanCut() const; virtual bool CanPaste() const; virtual void Copy(); virtual void Cut(); virtual void Paste(); virtual bool CanGoBack(); virtual bool CanGoForward() const; virtual void ClearHistory(); virtual void EnableHistory(bool enable = true); %{ void wxWebView::GetBackwardHistory() PPCODE: wxVector > back = THIS->GetBackwardHistory(); size_t num = back.size(); EXTEND( SP, (IV)num ); for( size_t i = 0; i < num; ++i ) { PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxWebViewHistoryItem( back[i]->GetUrl(), back[i]->GetTitle() ), "Wx::WebViewHistoryItem" ) ); } void wxWebView::GetForwardHistory() PPCODE: wxVector > forward = THIS->GetForwardHistory(); size_t num = forward.size(); EXTEND( SP, (IV)num ); for( size_t i = 0; i < num; ++i ) { PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxWebViewHistoryItem( forward[i]->GetUrl(), forward[i]->GetTitle() ), "Wx::WebViewHistoryItem" ) ); } %} virtual void GoBack(); virtual void GoForward(); /* not quite the standard implementation but it makes wxWebViewHistoryItem simpler */ virtual void LoadHistoryItem( wxWebViewHistoryItem* item ) %code{% THIS->LoadURL( item->GetUrl() ); %}; virtual void ClearSelection(); virtual void DeleteSelection(); virtual wxString GetSelectedSource() const; virtual wxString GetSelectedText() const; virtual bool HasSelection() const; virtual void SelectAll(); virtual bool CanRedo() const; virtual bool CanUndo() const; virtual void Redo(); virtual void Undo(); virtual bool CanSetZoomType(wxWebViewZoomType type) const; virtual wxWebViewZoom GetZoom() const; virtual wxWebViewZoomType GetZoomType() const; virtual void SetZoom(wxWebViewZoom zoom); virtual void SetZoomType(wxWebViewZoomType zoomType); }; %name{Wx::WebViewEvent} class wxWebViewEvent : public %name{Wx::NotifyEvent} wxNotifyEvent { public: %name{newDefault} wxWebViewEvent() %Overload; %name{newFull} wxWebViewEvent(wxEventType type, int id, const wxString& href, const wxString& target) %Overload; const wxString& GetTarget() const; const wxString& GetURL() const; }; %name{Wx::WebViewArchiveHandler} class wxWebViewArchiveHandler : public %name{Wx::WebViewHandler} wxWebViewHandler { public: wxWebViewArchiveHandler(const wxString& scheme); virtual wxFSFile* GetFile(const wxString &uri); }; #endif Wx-0.9923/ext/xrc/000775000000000000 012316265011 11772 5ustar00Mark000000000000Wx-0.9923/ext/xrc/cpp/000775000000000000 012316265011 12554 5ustar00Mark000000000000Wx-0.9923/ext/xrc/cpp/xr_constants.cpp000664000000000000 322412313575737 16106 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/xrc/cpp/xr_constants.cpp // Purpose: constants for XRC // Author: Mattia Barbon // Modified by: // Created: 04/04/2002 // RCS-ID: $Id: xr_constants.cpp 2057 2007-06-18 23:03:00Z mbarbon $ // Copyright: (c) 2002-2005 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include "cpp/constants.h" #include "wx/xrc/xmlres.h" #if WXPERL_W_VERSION_GE( 2, 9, 5 ) #include "wx/xml/xml.h" #endif double xrc_constant( const char* name, int arg ) { // !package: Wx // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> } // !tag: xrc #define r( n ) \ if( strEQ( name, #n ) ) \ return n; WX_PL_CONSTANT_INIT(); switch( fl ) { case 'X': r( wxXRC_USE_LOCALE ); r( wxXRC_NO_SUBCLASSING ); #if WXPERL_W_VERSION_GE( 2, 5, 3 ) r( wxXRC_NO_RELOADING ); #endif r( wxXML_ELEMENT_NODE ); r( wxXML_ATTRIBUTE_NODE ); r( wxXML_TEXT_NODE ); r( wxXML_CDATA_SECTION_NODE ); r( wxXML_ENTITY_REF_NODE ); r( wxXML_ENTITY_NODE ); r( wxXML_PI_NODE ); r( wxXML_COMMENT_NODE ); r( wxXML_DOCUMENT_NODE ); r( wxXML_DOCUMENT_TYPE_NODE ); r( wxXML_DOCUMENT_FRAG_NODE ); r( wxXML_NOTATION_NODE ); r( wxXML_HTML_DOCUMENT_NODE ); break; } #undef r WX_PL_CONSTANT_CLEANUP(); } wxPlConstants xrc_module( &xrc_constant ); Wx-0.9923/ext/xrc/lib/000775000000000000 012316265011 12540 5ustar00Mark000000000000Wx-0.9923/ext/xrc/lib/Wx/000775000000000000 012316265011 13136 5ustar00Mark000000000000Wx-0.9923/ext/xrc/lib/Wx/XRC.pm000664000000000000 234612306612242 14216 0ustar00Mark000000000000############################################################################# ## Name: ext/xrc/lib/Wx/XRC.pm ## Purpose: Wx::XRC (pulls in all wxWidgets XML Resources) ## Author: Mattia Barbon ## Modified by: ## Created: 27/07/2001 ## RCS-ID: $Id: XRC.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2004, 2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::XRC; use Wx; use strict; use vars qw($VERSION); $VERSION = '0.01'; Wx::load_dll( 'xml' ); Wx::load_dll( 'html' ); Wx::load_dll( 'adv' ); Wx::load_dll( 'xrc' ); Wx::wx_boot( 'Wx::XRC', $VERSION ); # init wxModules Wx::XmlInitXmlModule(); Wx::XmlInitResourceModule(); *Wx::XmlResource::GetXMLID = \&Wx::XmlResource::GetXRCID; # Wx::XmlResource::AddSubclassFactory( Wx::XmlSubclassFactory->new ); # # properly setup inheritance tree # no strict; package Wx::PlXmlResourceHandler; @ISA = qw(Wx::XmlResourceHandler); package Wx::PliXmlSubclassFactory; @ISA = qw(Wx::XmlSubclassFactory); use strict; 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/xrc/Makefile.PL000664000000000000 155512306612242 14033 0ustar00Mark000000000000############################################################################# ## Name: ext/xrc/Makefile.PL ## Purpose: Makefile.PL for wxWidgets XML resources (xrc) ## Author: Mattia Barbon ## Modified by: ## Created: 27/07/2001 ## RCS-ID: $Id: Makefile.PL 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2001-2005, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use lib '../../build'; use Wx::build::MakeMaker; wxWriteMakefile( NAME => 'Wx::XRC', VERSION_FROM => 'lib/Wx/XRC.pm', WX_CORE_LIB => 'xrc xml html adv core base', ); # local variables: # mode: cperl # end: Wx-0.9923/ext/xrc/t/000775000000000000 012316265010 12234 5ustar00Mark000000000000Wx-0.9923/ext/xrc/t/01_load.t000775000000000000 21712306612242 13705 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..1\n"; } use strict; use Wx; use Wx::XRC; print "ok\n"; # Local variables: # # mode: cperl # # End: # Wx-0.9923/ext/xrc/t/03_threads.t000775000000000000 103512306612242 14441 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS, 'Test::More' => skip_all => 'No thread support'; use Test::More tests => 4; use Wx::XRC; my $app = Wx::App->new( sub { 1 } ); my $xr = Wx::XmlResource->new; my $xr2 = Wx::XmlResource->new; undef $xr2; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); END { ok( 1, 'At END' ) }; Wx-0.9923/ext/xrc/typemap000664000000000000 165212306612242 13461 0ustar00Mark000000000000############################################################################# ## Name: ext/xrc/typemap ## Purpose: typemap ## Author: Mattia Barbon ## Modified by: ## Created: 27/07/2001 ## RCS-ID: $Id: typemap 2317 2008-01-18 22:00:14Z mbarbon $ ## Copyright: (c) 2001, 2003-2004, 2006, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxXmlNodeType T_ENUM wxXmlResource * O_NON_WXOBJECT_THR wxXmlResourceHandler * O_WXOBJECT wxXmlSubclassFactory * O_NON_WXOBJECT wxPliXmlSubclassFactory * O_NON_WXOBJECT wxXmlNode* O_NON_WXOBJECT wxXmlDocument* O_WXOBJECT wxXmlProperty* O_NON_WXOBJECT wxXmlAttribute* O_NON_WXOBJECT wxPlXmlResourceHandler* O_WXOBJECT Wx-0.9923/ext/xrc/XRC.xs000664000000000000 263512306612242 13071 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: ext/xrc/XRC.xs // Purpose: XS for wxWidgets XML Resources // Author: Mattia Barbon // Modified by: // Created: 27/07/2001 // RCS-ID: $Id: XRC.xs 2757 2010-01-17 10:26:27Z mbarbon $ // Copyright: (c) 2001-2004, 2006, 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 ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/xr_constants.cpp" #undef THIS MODULE=Wx__XRC BOOT: INIT_PLI_HELPERS( wx_pli_helpers ); INCLUDE: XS/XmlResource.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/XmlSubclassFactory.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/XmlDocument.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/XmlNode.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t ../../typemap.xsp XS/XmlResourceHandler.xsp MODULE=Wx__XRC PACKAGE=Wx PREFIX=wx void wxXmlInitXmlModule() CODE: // nothing here void wxXmlInitResourceModule() #include "cpp/overload.h" #include "cpp/ovl_const.cpp" # //FIXME//tricky #if defined(__WXMSW__) #undef XS #define XS( name ) WXXS( name ) #endif MODULE=Wx__XRC Wx-0.9923/ext/xrc/XS/000775000000000000 012316265011 12324 5ustar00Mark000000000000Wx-0.9923/ext/xrc/XS/XmlDocument.xsp000664000000000000 332712306612242 15405 0ustar00Mark000000000000############################################################################# ## Name: ext/xrc/XS/XmlDocument.xsp ## Purpose: XS for Wx::XmlDocument ## Author: Mattia Barbon ## Modified by: ## Created: 25/07/2003 ## RCS-ID: $Id: XmlDocument.xsp 2281 2007-11-11 13:46:12Z mbarbon $ ## Copyright: (c) 2003, 2007 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}; %typemap{wxXmlNode*}{simple}; %name{Wx::XmlDocument} class wxXmlDocument { ## wxXmlDocument(); ## wxXmlDocument(const wxString& filename, ## const wxString& encoding = wxT("UTF-8")); ## wxXmlDocument(wxInputStream& stream, ## const wxString& encoding = wxT("UTF-8")); ## ~wxXmlDocument() { delete m_root; } ## wxXmlDocument(const wxXmlDocument& doc); ## wxXmlDocument& operator=(const wxXmlDocument& doc); ## bool Load(const wxString& filename, ## const wxString& encoding = wxT("UTF-8")); ## bool Load(wxInputStream& stream, ## const wxString& encoding = wxT("UTF-8")); ## // Saves document as .xml file. ## bool Save(const wxString& filename) const; ## bool Save(wxOutputStream& stream) const; bool IsOk() const; wxXmlNode *GetRoot() const; wxString GetVersion() const; wxString GetFileEncoding() const; void SetRoot(wxXmlNode *node); void SetVersion(const wxString& version); void SetFileEncoding(const wxString& encoding); #if !wxUSE_UNICODE wxString GetEncoding() const; void SetEncoding(const wxString& enc); #endif }; Wx-0.9923/ext/xrc/XS/XmlNode.xsp000664000000000000 1074012306612242 14531 0ustar00Mark000000000000############################################################################# ## Name: ext/xrc/XS/XmlNode.xsp ## Purpose: XS for Wx::XmlNode ## Author: Mattia Barbon ## Modified by: ## Created: 25/07/2003 ## RCS-ID: $Id: XmlNode.xsp 2281 2007-11-11 13:46:12Z mbarbon $ ## Copyright: (c) 2003, 2007 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}; %typemap{wxXmlProperty*}{simple}; %typemap{wxXmlAttribute*}{simple}; %typemap{wxXmlNode*}{simple}; %typemap{wxXmlNodeType}{simple}; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) %name{Wx::XmlAttribute} class wxXmlAttribute { wxXmlAttribute(const wxString& name = wxEmptyString, const wxString& value = wxEmptyString, wxXmlAttribute* next = NULL); wxString GetName() const; wxString GetValue() const; wxXmlAttribute* GetNext() const; void SetName(const wxString& name); void SetValue(const wxString& value); void SetNext(wxXmlAttribute* next); }; %{ void wxXmlAttribute::Destroy() CODE: delete THIS; %} #else %name{Wx::XmlProperty} class wxXmlProperty { wxXmlProperty(const wxString& name = wxEmptyString, const wxString& value = wxEmptyString, wxXmlProperty* next = NULL); wxString GetName() const; wxString GetValue() const; wxXmlProperty* GetNext() const; void SetName(const wxString& name); void SetValue(const wxString& value); void SetNext(wxXmlProperty* next); }; %{ void wxXmlProperty::Destroy() CODE: delete THIS; %} #endif %name{Wx::XmlNode} class wxXmlNode { #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxXmlNode(wxXmlNode* parent = NULL, wxXmlNodeType type = wxXmlNodeType(0), const wxString& name = wxEmptyString, const wxString& content = wxEmptyString, wxXmlAttribute* props = NULL, wxXmlNode* next = NULL); #else wxXmlNode(wxXmlNode* parent = NULL, wxXmlNodeType type = wxXmlNodeType(0), const wxString& name = wxEmptyString, const wxString& content = wxEmptyString, wxXmlProperty* props = NULL, wxXmlNode* next = NULL); #endif void AddChild(wxXmlNode* child); void InsertChild(wxXmlNode *child, wxXmlNode *before_node); bool RemoveChild(wxXmlNode *child); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void AddAttribute(const wxString& name, const wxString& value); bool DeleteAttribute(const wxString& name); #else void AddProperty(const wxString& name, const wxString& value); bool DeleteProperty(const wxString& name); #endif wxXmlNodeType GetType() const; wxString GetName() const; wxString GetContent() const; wxXmlNode *GetParent() const; wxXmlNode *GetNext() const; wxXmlNode *GetChildren() const; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxXmlAttribute *GetAttributes() const; #else wxXmlProperty *GetProperties() const; #endif ## bool GetPropVal(const wxString& propName, wxString *value) const; ## wxString GetPropVal(const wxString& propName, ## const wxString& defaultVal) const; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool HasAttribute(const wxString& propName) const; #else bool HasProp(const wxString& propName) const; #endif void SetType(wxXmlNodeType type); void SetName(const wxString& name); void SetContent(const wxString& con); void SetParent(wxXmlNode *parent); void SetNext(wxXmlNode *next); void SetChildren(wxXmlNode *child); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void SetAttributes(wxXmlAttribute *prop); #else void SetProperties(wxXmlProperty *prop); #endif ## void AddProperty(wxXmlProperty *prop); }; %{ void wxXmlNode::Destroy() CODE: delete THIS; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) SV* wxXmlNode::GetAttribute(name, value = &PL_sv_undef) wxString name SV* value CODE: wxString tmp; bool ok = THIS->GetAttribute(name, &tmp); if( ok ) RETVAL = wxPli_wxString_2_sv( aTHX_ tmp, NEWSV(0, 0) ); else RETVAL = SvREFCNT_inc( value ); OUTPUT: RETVAL #else SV* wxXmlNode::GetPropVal(name, value = &PL_sv_undef) wxString name SV* value CODE: wxString tmp; bool ok = THIS->GetPropVal(name, &tmp); if( ok ) RETVAL = wxPli_wxString_2_sv( aTHX_ tmp, NEWSV(0, 0) ); else RETVAL = SvREFCNT_inc( value ); OUTPUT: RETVAL #endif %}Wx-0.9923/ext/xrc/XS/XmlResource.xs000664000000000000 1123212306612242 15250 0ustar00Mark000000000000############################################################################# ## Name: ext/xrc/XS/XmlResource.xs ## Purpose: XS for Wx::XmlResource ## Author: Mattia Barbon ## Modified by: ## Created: 27/07/2001 ## RCS-ID: $Id: XmlResource.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2004, 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 #include #include #include #include #include #include "cpp/overload.h" MODULE=Wx PACKAGE=Wx::XmlResource #if WXPERL_W_VERSION_GE( 2, 7, 1 ) wxXmlResource* wxXmlResource::new( flags = wxXRC_USE_LOCALE, domain = wxEmptyString ) int flags wxString domain #else wxXmlResource* wxXmlResource::new( flags = wxXRC_USE_LOCALE ) int flags #endif static void wxXmlResource::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxXmlResource::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::XmlResource", THIS, ST(0) ); delete THIS; bool wxXmlResource::Load( filemask ) wxString filemask #if WXPERL_W_VERSION_GE( 2, 6, 3 ) bool wxXmlResource::Unload( filemask ) wxString filemask #endif void wxXmlResource::InitAllHandlers() void wxXmlResource::AddHandler( handler ) wxXmlResourceHandler* handler void wxXmlResource::ClearHandlers() wxMenu* wxXmlResource::LoadMenu( name ) wxString name wxMenuBar* wxXmlResource::LoadMenuBar( name ) wxString name wxMenuBar* wxXmlResource::LoadMenuBarOnParent( parent, name ) wxWindow* parent wxString name CODE: RETVAL = THIS->LoadMenuBar( parent, name ); OUTPUT: RETVAL wxToolBar* wxXmlResource::LoadToolBar( parent, name ) wxWindow* parent wxString name wxDialog* wxXmlResource::LoadDialog( parent, name ) wxWindow* parent wxString name bool wxXmlResource::LoadOnDialog( dialog, parent, name ) wxDialog* dialog wxWindow* parent wxString name CODE: RETVAL = THIS->LoadDialog( dialog, parent, name ); OUTPUT: RETVAL wxPanel* wxXmlResource::LoadPanel( parent, name ) wxWindow* parent wxString name bool wxXmlResource::LoadOnPanel( panel, parent, name ) wxPanel* panel wxWindow* parent wxString name CODE: RETVAL = THIS->LoadPanel( panel, parent, name ); OUTPUT: RETVAL void wxXmlResource::LoadFrame( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wfrm_wwin_s, LoadOnFrame ) MATCH_REDISP( wxPliOvl_wwin_s, LoadFrame2 ) END_OVERLOAD( "Wx::XmlResource::LoadFrame" ) wxFrame* wxXmlResource::LoadFrame2( parent, name ) wxWindow* parent wxString name CODE: RETVAL = THIS->LoadFrame( parent, name ); OUTPUT: RETVAL bool wxXmlResource::LoadOnFrame( frame, parent, name ) wxFrame* frame wxWindow* parent wxString name CODE: RETVAL = THIS->LoadFrame( frame, parent, name ); OUTPUT: RETVAL wxBitmap* wxXmlResource::LoadBitmap( name ) wxString name CODE: RETVAL = new wxBitmap( THIS->LoadBitmap( name ) ); OUTPUT: RETVAL wxIcon* wxXmlResource::LoadIcon( name ) wxString name CODE: RETVAL = new wxIcon( THIS->LoadIcon( name ) ); OUTPUT: RETVAL bool wxXmlResource::AttachUnknownControl( name, control, parent = 0 ) wxString name wxWindow* control wxWindow* parent int wxXmlResource::GetFlags() void wxXmlResource::SetFlags( flags ) int flags #if WXPERL_W_VERSION_GE( 2, 7, 2 ) int GetXRCID( str_id, value_if_not_found = wxID_NONE ) wxChar* str_id int value_if_not_found CODE: RETVAL = wxXmlResource::GetXRCID( str_id, value_if_not_found ); OUTPUT: RETVAL #else int GetXRCID( str_id ) wxChar* str_id CODE: RETVAL = wxXmlResource::GetXRCID( str_id ); OUTPUT: RETVAL #endif long wxXmlResource::GetVersion() int wxXmlResource::CompareVersion( major, minor, release, revision ) int major int minor int release int revision ##wxXmlResource* ##Get() ## CODE: ## RETVAL = wxXmlResource::Get(); ## OUTPUT: ## RETVAL ##void ##wxXmlResource::Set( res ) ## wxXmlResource* res ## CODE: ## wxXmlResource::Set( res ); ## void ## wxXmlResource::UpdateResources() void AddSubclassFactory( wxXmlSubclassFactory *factory ) CODE: wxPli_detach_object( aTHX_ ST(0) ); // avoid destructor wxXmlResource::AddSubclassFactory( factory ); #if WXPERL_W_VERSION_GE( 2, 7, 1 ) const wxChar* wxXmlResource::GetDomain() void wxXmlResource::SetDomain( const wxChar* domain ) #endif Wx-0.9923/ext/xrc/XS/XmlResourceHandler.xsp000664000000000000 2334712306612242 16740 0ustar00Mark000000000000############################################################################# ## Name: ext/xrc/XS/XmlResourceHandler.xsp ## Purpose: XS for Wx::XmlResourceHandler ## Author: Mattia Barbon ## Modified by: ## Created: 25/07/2003 ## RCS-ID: $Id: XmlResourceHandler.xsp 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2003-2004, 2007, 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}; %typemap{wxXmlNode*}{simple}; %typemap{wxXmlResource*}{simple}; %file{xspp/reshnd.h}; %{ #include "cpp/v_cback.h" #define DEC_V_CBACK_WXOBJECT__VOID_pure( METHOD ) \ wxObject* METHOD() #define DEF_V_CBACK_WXOBJECT__VOID_pure( CLASS, BASE, METHOD ) \ wxObject* CLASS::METHOD() \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, NULL ); \ wxObject* val = (wxObject*)wxPli_sv_2_object( aTHX_ ret, NULL ); \ SvREFCNT_dec( ret ); \ return val; \ } else \ return NULL; \ } #define DEC_V_CBACK_BOOL__WXXMLNODE_pure( METHOD ) \ bool METHOD( wxXmlNode* ) #define DEF_V_CBACK_BOOL__WXXMLNODE_pure( CLASS, BASE, METHOD ) \ bool CLASS::METHOD( wxXmlNode* param1 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, \ "o", param1, \ "Wx::XmlNode" ); \ bool val = SvTRUE( ret ); \ SvREFCNT_dec( ret ); \ return val; \ } else \ return false; \ } class wxPlXmlResourceHandler : public wxXmlResourceHandler { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlXmlResourceHandler ); WXPLI_DECLARE_V_CBACK(); public: wxPlXmlResourceHandler( const char* package ) :m_callback( "Wx::XmlResourceHandler" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } DEC_V_CBACK_BOOL__WXXMLNODE_pure( CanHandle ); DEC_V_CBACK_WXOBJECT__VOID_pure( DoCreateResource ); wxXmlResource* GetResource() { return m_resource; } wxXmlNode* GetNode() { return m_node; } wxString GetClass() { return m_class; } wxObject* GetParent() { return m_parent; } wxObject* GetInstance() { return m_instance; } wxWindow* GetParentAsWindow() { return m_parentAsWindow; } #if WXPERL_W_VERSION_LE( 2, 5, 2 ) wxWindow* GetInstanceAsWindow() { return m_instanceAsWindow; } #endif bool IsOfClass( wxXmlNode* node, const wxString& className ) { return wxXmlResourceHandler::IsOfClass( node, className ); } wxString GetNodeContent( wxXmlNode* node ) { return wxXmlResourceHandler::GetNodeContent( node ); } bool HasParam( const wxString& param ) { return wxXmlResourceHandler::HasParam( param ); } wxXmlNode* GetParamNode( const wxString& param ) { return wxXmlResourceHandler::GetParamNode( param ); } wxString GetParamValue( const wxString& param ) { return wxXmlResourceHandler::GetParamValue( param ); } void AddStyle( const wxString& name, int value ) { wxXmlResourceHandler::AddStyle( name, value ); } void AddWindowStyles() { wxXmlResourceHandler::AddWindowStyles(); } int GetStyle( const wxString& param, int defaults ) { return wxXmlResourceHandler::GetStyle( param, defaults ); } wxString GetText(const wxString& param, bool translate) { return wxXmlResourceHandler::GetText( param, translate ); } int GetID() { return wxXmlResourceHandler::GetID(); } wxString GetName() { return wxXmlResourceHandler::GetName(); } bool GetBool(const wxString& param, bool defaultv) { return wxXmlResourceHandler::GetBool( param, defaultv ); } long GetLong( const wxString& param, long defaultv) { return wxXmlResourceHandler::GetLong( param, defaultv ); } wxColour GetColour(const wxString& param) { return wxXmlResourceHandler::GetColour( param ); } wxSize GetSize(const wxString& param) { return wxXmlResourceHandler::GetSize( param ); } wxPoint GetPosition(const wxString& param) { return wxXmlResourceHandler::GetPosition( param ); } wxCoord GetDimension(const wxString& param, wxCoord defaultv) { return wxXmlResourceHandler::GetDimension( param, defaultv ); } wxBitmap GetBitmap(const wxString& param, const wxArtClient& defaultArtClient, wxSize size) { return wxXmlResourceHandler::GetBitmap( param, defaultArtClient, size ); } wxIcon GetIcon(const wxString& param, const wxArtClient& defaultArtClient, wxSize size) { return wxXmlResourceHandler::GetIcon( param, defaultArtClient, size ); } wxFont GetFont(const wxString& param) { return wxXmlResourceHandler::GetFont( param ); } void SetupWindow(wxWindow *wnd) { wxXmlResourceHandler::SetupWindow( wnd ); } void CreateChildren(wxObject *parent, bool this_hnd_only) { wxXmlResourceHandler::CreateChildren( parent, this_hnd_only ); } void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode) { wxXmlResourceHandler::CreateChildrenPrivately( parent, rootnode ); } wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance) { return wxXmlResourceHandler::CreateResFromNode( node, parent, instance ); } #if wxUSE_FILESYSTEM wxFileSystem& GetCurFileSystem(); #endif }; DEF_V_CBACK_BOOL__WXXMLNODE_pure( wxPlXmlResourceHandler, wxXmlResourceHandler, CanHandle ); DEF_V_CBACK_WXOBJECT__VOID_pure( wxPlXmlResourceHandler, wxXmlResourceHandler, DoCreateResource ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlXmlResourceHandler, wxXmlResourceHandler ); #else WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlXmlResourceHandler, wxObject ); #endif %} %file{-}; %{ #include "wx/window.h" #include "xspp/reshnd.h" MODULE=Wx PACKAGE=Wx::PlXmlResourceHandler wxPlXmlResourceHandler* wxPlXmlResourceHandler::new() CODE: RETVAL = new wxPlXmlResourceHandler( CLASS ); OUTPUT: RETVAL %} %name{Wx::XmlResourceHandler} class wxPlXmlResourceHandler { wxXmlResource* GetResource(); wxXmlNode* GetNode(); wxString GetClass(); wxObject* GetParent(); wxObject* GetInstance(); wxWindow* GetParentAsWindow(); #if WXPERL_W_VERSION_LE( 2, 5, 2 ) wxWindow* GetInstanceAsWindow(); #endif bool IsOfClass( wxXmlNode* node, const wxString& className ); wxString GetNodeContent( wxXmlNode* node ); bool HasParam( const wxString& param ); wxXmlNode* GetParamNode( const wxString& param ); wxString GetParamValue( const wxString& param ); void AddStyle( const wxString& name, int value ); void AddWindowStyles(); int GetStyle( const wxString& param = wxT("style"), int defaults = 0 ); wxString GetText(const wxString& param, bool translate = true ); int GetID(); wxString GetName(); bool GetBool(const wxString& param, bool defaultv = false); long GetLong( const wxString& param, long defaultv = 0); wxColour GetColour(const wxString& param); wxSize GetSize(const wxString& param = wxT("size")); wxPoint GetPosition(const wxString& param = wxT("pos")); wxCoord GetDimension(const wxString& param, wxCoord defaultv = 0); wxBitmap GetBitmap(const wxString& param = wxT("bitmap"), const wxArtClient& defaultArtClient = wxART_OTHER, wxSize size = wxDefaultSize); wxIcon GetIcon(const wxString& param = wxT("icon"), const wxArtClient& defaultArtClient = wxART_OTHER, wxSize size = wxDefaultSize); wxFont GetFont(const wxString& param = wxT("font")); void SetupWindow(wxWindow *wnd); void CreateChildren(wxObject *parent, bool this_hnd_only = false); void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL); wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance = NULL); #!sub CanHandle #!sub DoCreateResource }; Wx-0.9923/ext/xrc/XS/XmlSubclassFactory.xsp000664000000000000 477412306612242 16745 0ustar00Mark000000000000############################################################################# ## Name: ext/xrc/XS/XmlSubclassFactory.xsp ## Purpose: XS++ for Wx::XmlSubclassHandler ## Author: Mattia Barbon ## Modified by: ## Created: 03/06/2003 ## RCS-ID: $Id: XmlSubclassFactory.xsp 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2003-2004, 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}; %typemap{wxPliXmlSubclassFactory*}{simple}; %typemap{wxXmlSubclassFactory*}{simple}; %file{xspp/factory.h}; %{ #define DEC_V_CBACK_WXOBJECT__WXSTRING_pure( METHOD ) \ wxObject* METHOD( const wxString& ) #define DEF_V_CBACK_WXOBJECT__WXSTRING_pure( CLASS, BASE, METHOD ) \ wxObject* CLASS::METHOD( const wxString& param1 ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ SV* ret = wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, \ G_SCALAR, "P", ¶m1 );\ wxObject* val = (wxObject*)wxPli_sv_2_object( aTHX_ ret, NULL ); \ SvREFCNT_dec( ret ); \ return val; \ } \ return NULL; \ } #include "cpp/v_cback.h" class wxPliXmlSubclassFactory : public wxXmlSubclassFactory { wxPliVirtualCallback m_callback; public: wxPliXmlSubclassFactory( const char* package ) : m_callback( "Wx::XmlSubclassFactory" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } DEC_V_CBACK_WXOBJECT__WXSTRING_pure( Create ); }; DEF_V_CBACK_WXOBJECT__WXSTRING_pure( wxPliXmlSubclassFactory, wxXmlSubclassFactory, Create ); %} %file{-}; %{ #include "xspp/factory.h" %} %name{Wx::XmlSubclassFactory} class wxXmlSubclassFactory { wxXmlSubclassFactory() %code{% RETVAL = new wxPliXmlSubclassFactory( CLASS ); %}; ## ~wxXmlSubclassFactory(); }; Wx-0.9923/Frames.xs000664000000000000 345112306612266 12261 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: Frames.xs // Purpose: XS for Wx::Frame, Wx::Dialog, Wx::Panel // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: Frames.xs 3486 2013-04-16 17:39:27Z mdootson $ // Copyright: (c) 2000-2003, 2005-2010 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include "cpp/v_cback.h" #undef THIS WXPLI_BOOT_ONCE(Wx_Wnd); #define boot_Wx_Wnd wxPli_boot_Wx_Wnd MODULE=Wx_Wnd INCLUDE: XS/Panel.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/Dialog.xsp INCLUDE: XS/Frame.xs INCLUDE: XS/StatusBar.xs INCLUDE: XS/ToolBar.xs INCLUDE: XS/Wizard.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/IconBundle.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/TopLevelWindow.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/PopupWindow.xsp INCLUDE: XS/ColourDialog.xs INCLUDE: XS/DirDialog.xs INCLUDE: XS/FileDialog.xs INCLUDE: XS/TextEntryDialog.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/MessageDialog.xsp INCLUDE: XS/ProgressDialog.xs INCLUDE: XS/SingleChoiceDialog.xs INCLUDE: XS/MultiChoiceDialog.xs INCLUDE: XS/FontDialog.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/FindReplaceDialog.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/AboutDialog.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/PropertySheetDialog.xsp MODULE=Wx_Wnd Wx-0.9923/GDI.xs000664000000000000 461612306612233 11445 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: GDI.xs // Purpose: XS for various GDI objects // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: GDI.xs 2935 2010-07-04 11:46:58Z mbarbon $ // Copyright: (c) 2000-2003, 2005-2010 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #undef bool #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #undef THIS WXPLI_BOOT_ONCE(Wx_GDI); #define boot_Wx_GDI wxPli_boot_Wx_GDI #if WXPERL_W_VERSION_LT( 2, 9, 0 ) typedef int wxBrushStyle; typedef int wxPenStyle; typedef int wxPenJoin; typedef int wxPenCap; typedef int wxRasterOperationMode; typedef int wxMappingMode; typedef int wxPolygonFillMode; typedef int wxFloodFillStyle; #endif #if WXPERL_W_VERSION_LT( 2, 9, 1 ) typedef int wxImageResizeQuality; #endif MODULE=Wx_GDI INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/Animation.xsp INCLUDE: XS/Colour.xs INCLUDE: XS/ColourDatabase.xs INCLUDE: XS/Font.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/ImageList.xsp INCLUDE: XS/Bitmap.xs INCLUDE: XS/Icon.xs INCLUDE: XS/Cursor.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/DC.xsp INCLUDE: XS/Overlay.xs INCLUDE: XS/Pen.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/Brush.xsp INCLUDE: XS/Image.xs INCLUDE: XS/Palette.xs INCLUDE: XS/GraphicsContext.xs INCLUDE: XS/GraphicsPath.xs INCLUDE: XS/GraphicsMatrix.xs INCLUDE: XS/GraphicsObject.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/GraphicsRenderer.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/SVGFileDC.xsp MODULE=Wx PACKAGE=Wx PREFIX=wx wxRect* wxGetClientDisplayRect() CODE: RETVAL = new wxRect( wxGetClientDisplayRect() ); OUTPUT: RETVAL bool wxColourDisplay() CODE: RETVAL = wxColourDisplay(); OUTPUT: RETVAL int wxDisplayDepth() CODE: RETVAL = wxDisplayDepth(); OUTPUT: RETVAL wxSize* wxGetDisplaySizeMM() CODE: RETVAL = new wxSize( wxGetDisplaySizeMM() ); OUTPUT: RETVAL wxSize* wxGetDisplaySize() CODE: RETVAL = new wxSize( wxGetDisplaySize() ); OUTPUT: RETVAL MODULE=Wx_GDI Wx-0.9923/interface/000775000000000000 012316265010 12335 5ustar00Mark000000000000Wx-0.9923/interface/wx/000775000000000000 012316265011 12774 5ustar00Mark000000000000Wx-0.9923/interface/wx/bannerwindow.h000664000000000000 1540512306612235 15752 0ustar00Mark000000000000%module{Wx}; /////////////////////////////////////////////////////////////////////////////// // Name: interface/wx/bannerwindow.h // Purpose: wxBannerWindow class documentation // Author: Vadim Zeitlin // Created: 2011-08-16 // RCS-ID: $Id$ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// /** A simple banner window showing either a bitmap or text. Banner windows can be used to present some overview of the current window contents to the user in an aesthetically pleasant way. They are typically positioned along the left or top edge of the window (although this class also supports right- and bottom-aligned banners) and show either a bitmap with a logo or a few lines of text on a gradient-filled background. Using this class is very simple, e.g.: @code MyFrame::MyFrame(...) { ... create the frame itself ... // Create and initialize the banner. wxBannerWindow* banner = new wxBannerWindow(this, wxTOP); banner->SetText("Welcome to my wonderful program", " Before doing anything else, you need to connect to " "the online server.\n" " Please enter your credentials in the controls below."); // And position it along the left edge of the window. wxSizer* sizer = new wxBoxSizer(wxVERTICAL); sizer->Add(banner, wxSizerFlags().Expand()); ... add the rest of the window contents to the same sizer ... SetSizerAndFit(sizer); } @endcode This class is currently implemented generically and so looks the same under all platforms. @library{wxadv} @category{miscwnd} @genericAppearance{bannerwindow.png} @since 2.9.3 */ #if WXPERL_W_VERSION_GE( 2, 9, 3 ) #include %loadplugin{build::Wx::XSP::Overload}; %typemap{wxDirection}{simple}; %typemap{wxBannerWindow*}{simple}; %name{Wx::BannerWindow} class wxBannerWindow : public %name{Wx::Window} wxWindow { public: /** Default constructor, use Create() later. This constructor is only used for two-step creation, if possible, prefer using the constructor below directly instead of using this one and calling Create() later. */ %name{newDefault} wxBannerWindow() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Convenient constructor that should be used in the majority of cases. The only really important arguments of the full constructor below are @a parent and @a dir so this class provides a convenient constructor taking only them. The banner orientation changes how the text in it is displayed and also defines where is the bitmap truncated if it's too big to fit but doesn't do anything for the banner position, this is supposed to be taken care of in the usual way, e.g. using sizers. */ %name{newShort} wxBannerWindow(wxWindow* parent, wxDirection dir = wxLEFT) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Full constructor provided for consistency with the other classes only. Prefer to use the shorter constructor documented above. You should rarely, if ever, need to use non-default values for any other parameters: as the banner window doesn't generate any events, its identifier is not particularly useful; its position and size will be almost always managed by the containing sizer and it doesn't have any specific styles. So only the parent and the banner direction need to be specified. */ /*wxPerl - by making 3rd param required we can overload OK */ %name{newFull} wxBannerWindow(wxWindow* parent, wxWindowID winid, wxDirection dir, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxBannerWindowNameStr) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Really create the banner window for the objects created using the default constructor. It's an error to call Create() for the objects created using non-default constructor. */ bool Create(wxWindow* parent, wxWindowID winid, wxDirection dir = wxLEFT, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxBannerWindowNameStr); /** Provide the bitmap to use as background. Notice that ideally the bitmap should be big enough to always cover the entire banner, e.g. for a horizontal banner with wxTOP style its width should be bigger than any reasonable window size. Otherwise the bitmap is extended to cover the entire window area with a solid colour taken from the bitmap pixel on the edge in which direction the extension occurs so all bitmap pixels on this edge (top for wxLEFT, right for wxTOP and wxBOTTOM and bottom for wxRIGHT) should have the same colour to avoid jarring discontinuity. If, on the other hand, the bitmap is bigger than the window size, then it is truncated. For wxLEFT orientation the bitmap is truncated from the top, for wxTOP and wxBOTTOM -- from the right and for wxRIGHT -- from the bottom, so put the most important part of the bitmap information in the opposite direction where it will never be truncated. If no valid background bitmap is specified, the banner draws gradient background but if a valid bitmap is given here, the gradient is not draw and the start and end colours specified for it are ignored. @param bmp Bitmap to use as background. May be invalid to indicate that no background bitmap should be used. */ void SetBitmap(const wxBitmap& bmp); /** Set the text to display. This is mutually exclusive with SetBitmap(). Title is rendered in bold and should be single line, message can have multiple lines but is not wrapped automatically, include explicit line breaks in the string if you want to have multiple lines. */ void SetText(const wxString& title, const wxString& message); /** Set the colours between which the gradient runs. The gradient colours are ignored if SetBitmap() is used. */ void SetGradient(const wxColour& start, const wxColour& end); }; #endif Wx-0.9923/interface/wx/bmpbuttn.h000664000000000000 1562512306612235 15114 0ustar00Mark000000000000%module{Wx}; ///////////////////////////////////////////////////////////////////////////// // Name: bmpbuttn.h // Purpose: interface of wxBitmapButton // Author: wxWidgets team // RCS-ID: $Id: bmpbuttn.h 3405 2012-10-01 15:45:12Z mdootson $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include %loadplugin{build::Wx::XSP::Overload}; /** @class wxBitmapButton A bitmap button is a control that contains a bitmap. Notice that since wxWidgets 2.9.1 bitmap display is supported by the base wxButton class itself and the only tiny advantage of using this class is that it allows to specify the bitmap in its constructor, unlike wxButton. Please see the base class documentation for more information about images support in wxButton. @beginStyleTable @style{wxBU_LEFT} Left-justifies the bitmap label. @style{wxBU_TOP} Aligns the bitmap label to the top of the button. @style{wxBU_RIGHT} Right-justifies the bitmap label. @style{wxBU_BOTTOM} Aligns the bitmap label to the bottom of the button. @endStyleTable Note that the wxBU_EXACTFIT style supported by wxButton is not used by this class as bitmap buttons don't have any minimal standard size by default. @beginEventEmissionTable{wxCommandEvent} @event{EVT_BUTTON(id, func)} Process a @c wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked. @endEventTable @library{wxcore} @category{ctrl} @appearance{bitmapbutton.png} @see wxButton */ %name{Wx::BitmapButton} class wxBitmapButton : public %name{Wx::Button} wxButton { public: /** Static Constructors */ #if WXPERL_W_VERSION_GE( 2, 9, 5 ) static wxBitmapButton* NewCloseButton(wxWindow* parent, wxWindowID winid); #endif /** Default ctor. */ %name{newDefault} wxBitmapButton() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Constructor, creating and showing a button. @param parent Parent window. Must not be @NULL. @param id Button identifier. The value wxID_ANY indicates a default value. @param bitmap Bitmap to be displayed. @param pos Button position. If ::wxDefaultPosition is specified then a default position is chosen. @param size Button size. If ::wxDefaultSize is specified then the button is sized appropriately for the bitmap. @param style Window style. See wxBitmapButton. @param validator Window validator. @param name Window name. @remarks The bitmap parameter is normally the only bitmap you need to provide, and wxWidgets will draw the button correctly in its different states. If you want more control, call any of the functions SetBitmapPressed(), SetBitmapFocus(), SetBitmapDisabled(). @see Create(), wxValidator */ %name{newFull} wxBitmapButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxButtonNameStr) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Button creation function for two-step creation. For more details, see wxBitmapButton(). */ bool Create(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxButtonNameStr); //@{ /** Returns the bitmap for the disabled state, which may be invalid. @return A reference to the disabled state bitmap. @see SetBitmapDisabled() */ const wxBitmap& GetBitmapDisabled() const; // wxBitmap& GetBitmapDisabled(); TODO add %Skip annotation //@} //@{ /** Returns the bitmap for the focused state, which may be invalid. @return A reference to the focused state bitmap. @see SetBitmapFocus() */ const wxBitmap& GetBitmapFocus() const; // wxBitmap& GetBitmapFocus(); TODO add %Skip annotation //@} #if WXPERL_W_VERSION_GE( 2, 7, 0 ) //@{ /** Returns the bitmap used when the mouse is over the button, which may be invalid. @see SetBitmapHover() */ const wxBitmap& GetBitmapHover() const; // wxBitmap& GetBitmapHover(); TODO add %Skip annotation //@} #endif //@{ /** Returns the label bitmap (the one passed to the constructor), always valid. @return A reference to the button's label bitmap. @see SetBitmapLabel() */ const wxBitmap& GetBitmapLabel() const; // wxBitmap& GetBitmapLabel(); TODO add %Skip annotation //@} /** Returns the bitmap for the selected state. @return A reference to the selected state bitmap. @see SetBitmapSelected() */ const wxBitmap& GetBitmapSelected() const; /** Sets the bitmap for the disabled button appearance. @param bitmap The bitmap to set. @see GetBitmapDisabled(), SetBitmapLabel(), SetBitmapSelected(), SetBitmapFocus() */ virtual void SetBitmapDisabled(const wxBitmap& bitmap); /** Sets the bitmap for the button appearance when it has the keyboard focus. @param bitmap The bitmap to set. @see GetBitmapFocus(), SetBitmapLabel(), SetBitmapSelected(), SetBitmapDisabled() */ virtual void SetBitmapFocus(const wxBitmap& bitmap); #if WXPERL_W_VERSION_GE( 2, 7, 0 ) /** Sets the bitmap to be shown when the mouse is over the button. @since 2.7.0 The hover bitmap is currently only supported in wxMSW. @see GetBitmapHover() */ virtual void SetBitmapHover(const wxBitmap& bitmap); #endif /** Sets the bitmap label for the button. @param bitmap The bitmap label to set. @remarks This is the bitmap used for the unselected state, and for all other states if no other bitmaps are provided. @see GetBitmapLabel() */ virtual void SetBitmapLabel(const wxBitmap& bitmap); /** Sets the bitmap for the selected (depressed) button appearance. @param bitmap The bitmap to set. */ virtual void SetBitmapSelected(const wxBitmap& bitmap); }; Wx-0.9923/interface/wx/button.h000664000000000000 3415312306612235 14571 0ustar00Mark000000000000%module{Wx}; ///////////////////////////////////////////////////////////////////////////// // Name: button.h // Purpose: interface of wxButton // Author: wxWidgets team // RCS-ID: $Id: button.h 3032 2011-03-13 21:48:58Z mbarbon $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include %loadplugin{build::Wx::XSP::Overload}; /** @class wxButton A button is a control that contains a text string, and is one of the most common elements of a GUI. It may be placed on a @ref wxDialog "dialog box" or on a @ref wxPanel panel, or indeed on almost any other window. @beginStyleTable @style{wxBU_LEFT} Left-justifies the label. Windows and GTK+ only. @style{wxBU_TOP} Aligns the label to the top of the button. Windows and GTK+ only. @style{wxBU_RIGHT} Right-justifies the bitmap label. Windows and GTK+ only. @style{wxBU_BOTTOM} Aligns the label to the bottom of the button. Windows and GTK+ only. @style{wxBU_EXACTFIT} Creates the button as small as possible instead of making it of the standard size (which is the default behaviour ). @style{wxBU_NOTEXT} Disables the display of the text label in the button even if it has one or its id is one of the standard stock ids with an associated label: without using this style a button which is only supposed to show a bitmap but uses a standard id would display a label too. @style{wxBORDER_NONE} Creates a button without border. This is currently implemented in MSW, GTK2 and OSX/Carbon ports but in the latter only applies to buttons with bitmaps and using bitmap of one of the standard sizes only, namely 128*128, 48*48, 24*24 or 16*16. In all the other cases wxBORDER_NONE is ignored under OSX. @endStyleTable By default, i.e. if none of the alignment styles are specified, the label is centered both horizontally and vertically. If the button has both a label and a bitmap, the alignment styles above specify the location of the rectangle combining both the label and the bitmap and the bitmap position set with wxButton::SetBitmapPosition() defines the relative position of the bitmap with respect to the label (however currently non-default alignment combinations are not implemented on all platforms). @beginEventEmissionTable{wxCommandEvent} @event{EVT_BUTTON(id, func)} Process a @c wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked. @endEventTable Since version 2.9.1 wxButton supports showing both text and an image (currently only when using wxMSW, wxGTK or wxOSX/Cocoa ports), see SetBitmap() and SetBitmapLabel(), SetBitmapDisabled() &c methods. In the previous wxWidgets versions this functionality was only available in (the now trivial) wxBitmapButton class which was only capable of showing an image without text. A button may have either a single image for all states or different images for the following states (different images are not currently supported under OS X where the normal image is used for all states): @li @b normal: the default state @li @b disabled: bitmap shown when the button is disabled. @li @b pressed: bitmap shown when the button is pushed (e.g. while the user keeps the mouse button pressed on it) @li @b focus: bitmap shown when the button has keyboard focus (but is not pressed as in this case the button is in the pressed state) @li @b current: bitmap shown when the mouse is over the button (but it is not pressed although it may have focus). Notice that if current bitmap is not specified but the current platform UI uses hover images for the buttons (such as Windows XP or GTK+), then the focus bitmap is used for hover state as well. This makes it possible to set focus bitmap only to get reasonably good behaviour on all platforms. All of the bitmaps must be of the same size and the normal bitmap must be set first (to a valid bitmap), before setting any other ones. The position of the image inside the button be configured using SetBitmapPosition(). By default the image is on the left of the text. Please also notice that GTK+ uses a global setting called @c gtk-button-images to determine if the images should be shown in the buttons at all. If it is off (which is the case in e.g. Gnome 2.28 by default), no images will be shown, consistently with the native behaviour. @library{wxcore} @category{ctrl} @appearance{button.png} @see wxBitmapButton */ %name{Wx::Button} class wxButton : public %name{Wx::Control} wxControl { public: /** Default ctor. */ %name{newDefault} wxButton() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Constructor, creating and showing a button. The preferred way to create standard buttons is to use default value of @a label. If no label is supplied and @a id is one of standard IDs from @ref page_stockitems "this list", a standard label will be used. In other words, if you use a predefined @c wxID_XXX constant, just omit the label completely rather than specifying it. In particular, help buttons (the ones with @a id of @c wxID_HELP) under Mac OS X can't display any label at all and while wxButton will detect if the standard "Help" label is used and ignore it, using any other label will prevent the button from correctly appearing as a help button and so should be avoided. In addition to that, the button will be decorated with stock icons under GTK+ 2. @param parent Parent window. Must not be @NULL. @param id Button identifier. A value of wxID_ANY indicates a default value. @param label Text to be displayed on the button. @param pos Button position. @param size Button size. If the default size is specified then the button is sized appropriately for the text. @param style Window style. See wxButton class description. @param validator Window validator. @param name Window name. @see Create(), wxValidator */ %name{newFull} wxButton(wxWindow* parent, wxWindowID id, const wxString& label = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxButtonNameStr) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Button creation function for two-step creation. For more details, see wxButton(). */ bool Create(wxWindow* parent, wxWindowID id, const wxString& label = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxButtonNameStr); #if WXPERL_W_VERSION_GE( 2, 9, 1 ) /** Returns @true if an authentication needed symbol is displayed on the button. @remarks This method always returns @false if the platform is not Windows Vista or newer. @see SetAuthNeeded() @since 2.9.1 */ bool GetAuthNeeded() const; /** Return the bitmap shown by the button. The returned bitmap may be invalid only if the button doesn't show any images. @see SetBitmap() @since 2.9.1 */ wxBitmap GetBitmap() const; /** Returns the bitmap used when the mouse is over the button, which may be invalid. @see SetBitmapCurrent() @since 2.9.1 (available as wxBitmapButton::GetBitmapHover() in previous versions) */ wxBitmap GetBitmapCurrent() const; /** Returns the bitmap for the disabled state, which may be invalid. @see SetBitmapDisabled() @since 2.9.1 (available in wxBitmapButton only in previous versions) */ wxBitmap GetBitmapDisabled() const; /** Returns the bitmap for the focused state, which may be invalid. @see SetBitmapFocus() @since 2.9.1 (available in wxBitmapButton only in previous versions) */ wxBitmap GetBitmapFocus() const; /** Returns the bitmap for the normal state. This is exactly the same as GetBitmap() but uses a name backwards-compatible with wxBitmapButton. @see SetBitmap(), SetBitmapLabel() @since 2.9.1 (available in wxBitmapButton only in previous versions) */ wxBitmap GetBitmapLabel() const; /** Returns the bitmap for the pressed state, which may be invalid. @see SetBitmapPressed() @since 2.9.1 (available as wxBitmapButton::GetBitmapSelected() in previous versions) */ wxBitmap GetBitmapPressed() const; /** Get the margins between the bitmap and the text of the button. @see SetBitmapMargins() @since 2.9.1 */ wxSize GetBitmapMargins(); #endif /** Returns the default size for the buttons. It is advised to make all the dialog buttons of the same size and this function allows to retrieve the (platform and current font dependent size) which should be the best suited for this. */ static wxSize GetDefaultSize(); /** Returns the string label for the button. @see SetLabel() */ wxString GetLabel() const; #if WXPERL_W_VERSION_GE( 2, 9, 1 ) /** Sets whether an authentication needed symbol should be displayed on the button. @remarks This method doesn't do anything if the platform is not Windows Vista or newer. @see GetAuthNeeded() @since 2.9.1 */ void SetAuthNeeded(bool needed = true); /** Sets the bitmap to display in the button. The bitmap is displayed together with the button label. This method sets up a single bitmap which is used in all button states, use SetBitmapDisabled(), SetBitmapPressed(), SetBitmapCurrent() or SetBitmapFocus() to change the individual images used in different states. @param bitmap The bitmap to display in the button. May be invalid to remove any currently displayed bitmap. @param dir The position of the bitmap inside the button. By default it is positioned to the left of the text, near to the left button border. Other possible values include wxRIGHT, wxTOP and wxBOTTOM. @see SetBitmapPosition(), SetBitmapMargins() @since 2.9.1 */ void SetBitmap(const wxBitmap& bitmap, wxDirection dir = wxLEFT); /** Sets the bitmap to be shown when the mouse is over the button. @see GetBitmapCurrent() @since 2.9.1 (available as wxBitmapButton::SetBitmapHover() in previous versions) */ void SetBitmapCurrent(const wxBitmap& bitmap); /** Sets the bitmap for the disabled button appearance. @see GetBitmapDisabled(), SetBitmapLabel(), SetBitmapPressed(), SetBitmapFocus() @since 2.9.1 (available in wxBitmapButton only in previous versions) */ void SetBitmapDisabled(const wxBitmap& bitmap); /** Sets the bitmap for the button appearance when it has the keyboard focus. @see GetBitmapFocus(), SetBitmapLabel(), SetBitmapPressed(), SetBitmapDisabled() @since 2.9.1 (available in wxBitmapButton only in previous versions) */ void SetBitmapFocus(const wxBitmap& bitmap); /** Sets the bitmap label for the button. @remarks This is the bitmap used for the unselected state, and for all other states if no other bitmaps are provided. @see SetBitmap(), GetBitmapLabel() @since 2.9.1 (available in wxBitmapButton only in previous versions) */ void SetBitmapLabel(const wxBitmap& bitmap); /** Sets the bitmap for the selected (depressed) button appearance. @since 2.9.1 (available as wxBitmapButton::SetBitmapSelected() in previous versions) */ void SetBitmapPressed(const wxBitmap& bitmap); /** Set the margins between the bitmap and the text of the button. This method is currently only implemented under MSW. If it is not called, default margin is used around the bitmap. @see SetBitmap(), SetBitmapPosition() @since 2.9.1 */ //@{ void SetBitmapMargins(wxCoord x, wxCoord y); void SetBitmapMargins(const wxSize& sz); //@} /** Set the position at which the bitmap is displayed. This method should only be called if the button does have an associated bitmap. @since 2.9.1 @param dir Direction in which the bitmap should be positioned, one of wxLEFT, wxRIGHT, wxTOP or wxBOTTOM. */ void SetBitmapPosition(wxDirection dir); #endif /** This sets the button to be the default item in its top-level window (e.g. the panel or the dialog box containing it). As normal, pressing return causes the default button to be depressed when the return key is pressed. See also wxWindow::SetFocus() which sets the keyboard focus for windows and text panel items, and wxTopLevelWindow::SetDefaultItem(). @remarks Under Windows, only dialog box buttons respond to this function. @return the old default item (possibly NULL) */ #if WXPERL_W_VERSION_GE( 2, 9, 1 ) virtual wxWindow* SetDefault(); #else virtual void SetDefault(); #endif /** Sets the string label for the button. @param label The label to set. */ void SetLabel(const wxString& label); }; Wx-0.9923/interface/wx/commandlinkbutton.h000664000000000000 401212306612235 16755 0ustar00Mark000000000000%module{Wx}; ///////////////////////////////////////////////////////////////////////////// // Name: wx/commandlinkbutton.h // Purpose: interface of wxCommandLinkButton // Author: wxWidgets team // SVN-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if WXPERL_W_VERSION_GE( 2, 9, 2 ) #include %loadplugin{build::Wx::XSP::Overload}; %name{Wx::CommandLinkButton} class wxCommandLinkButton : public %name{Wx::Button} wxButton { public: %name{newDefault} wxCommandLinkButton() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxCommandLinkButton(wxWindow* parent, wxWindowID id, const wxString& mainLabel = wxEmptyString, const wxString& note = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxButtonNameStr) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow* parent, wxWindowID id, const wxString& mainLabel = wxEmptyString, const wxString& note = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxButtonNameStr); void SetMainLabelAndNote(const wxString& mainLabel, const wxString& note); virtual void SetLabel(const wxString& label); wxString GetLabel() const; void SetMainLabel(const wxString& mainLabel); void SetNote(const wxString& note); wxString GetMainLabel() const; wxString GetNote() const; }; #endif Wx-0.9923/interface/wx/dataview/000775000000000000 012316265011 14600 5ustar00Mark000000000000Wx-0.9923/interface/wx/dataview/dataviewlistctrl.h000664000000000000 2061712306612235 20447 0ustar00Mark000000000000%module{Wx}; ///////////////////////////////////////////////////////////////////////////// // Name: dataview.h // Purpose: interface of wxDataView* classes // Author: wxWidgets team // RCS-ID: $Id: dataview.h 62943 2009-12-19 11:59:55Z VZ $ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #include %loadplugin{build::Wx::XSP::Overload}; %typemap{const wxVector&}{parsed}{%wxVectorVariant%}; %typemap{wxClientData*}{parsed}{%wxPliUserDataCD*%}; %typemap{const wxDataViewListStore *}{simple}; #include "cpp/array_helpers.h" /** @class wxDataViewListCtrl This class is a wxDataViewCtrl which internally uses a wxDataViewListStore and forwards most of its API to that class. The purpose of this class is to offer a simple way to display and edit a small table of data without having to write your own wxDataViewModel. @code wxDataViewListCtrl *listctrl = new wxDataViewListCtrl( parent, wxID_ANY ); listctrl->AppendToggleColumn( "Toggle" ); listctrl->AppendTextColumn( "Text" ); wxVector data; data.push_back( wxVariant(true) ); data.push_back( wxVariant("row 1") ); listctrl->AppendItem( data ); data.clear(); data.push_back( wxVariant(false) ); data.push_back( wxVariant("row 3") ); listctrl->AppendItem( data ); @endcode @beginStyleTable See wxDataViewCtrl for the list of supported styles. @endStyleTable @beginEventEmissionTable See wxDataViewCtrl for the list of events emitted by this class. @endEventTable @library{wxadv} @category{ctrl,dvc} */ %name{Wx::DataViewListCtrl} class wxDataViewListCtrl: public %name{Wx::DataViewCtrl} wxDataViewCtrl { public: /** Default ctor. */ wxDataViewListCtrl(); /** Constructor. Calls Create(). */ wxDataViewListCtrl( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDV_ROW_LINES, const wxValidator& validator = wxDefaultValidatorPtr ); /** Destructor. Deletes the image list if any. */ // wxPerl change: no need for destructor // ~wxDataViewListCtrl(); /** Creates the control and a wxDataViewListStore as its internal model. */ bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDV_ROW_LINES, const wxValidator& validator = wxDefaultValidatorPtr ); //@{ /** Returns the store. */ wxDataViewListStore *GetStore(); //const wxDataViewListStore *GetStore() const; //@} /** @name Column management functions */ //@{ /** Appends a column to the control and additionally appends a column to the store with the type string. */ virtual void AppendColumn( wxDataViewColumn *column ); /** Appends a column to the control and additionally appends a column to the list store with the type @a varianttype. */ void AppendColumn( wxDataViewColumn *column, const wxString &varianttype ); /** Appends a text column to the control and the store. See wxDataViewColumn::wxDataViewColumn for more info about the parameters. */ wxDataViewColumn *AppendTextColumn( const wxString &label, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE ); /** Appends a toggle column to the control and the store. See wxDataViewColumn::wxDataViewColumn for more info about the parameters. */ wxDataViewColumn *AppendToggleColumn( const wxString &label, wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE ); /** Appends a progress column to the control and the store. See wxDataViewColumn::wxDataViewColumn for more info about the parameters. */ wxDataViewColumn *AppendProgressColumn( const wxString &label, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE ); /** Appends an icon-and-text column to the control and the store. See wxDataViewColumn::wxDataViewColumn for more info about the parameters. */ wxDataViewColumn *AppendIconTextColumn( const wxString &label, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE ); /** Inserts a column to the control and additionally inserts a column to the store with the type string. */ virtual void InsertColumn( unsigned int pos, wxDataViewColumn *column ); /** Inserts a column to the control and additionally inserts a column to the list store with the type @a varianttype. */ void InsertColumn( unsigned int pos, wxDataViewColumn *column, const wxString &varianttype ); /** Prepends a column to the control and additionally prepends a column to the store with the type string. */ virtual void PrependColumn( wxDataViewColumn *column ); /** Prepends a column to the control and additionally prepends a column to the list store with the type @a varianttype. */ void PrependColumn( wxDataViewColumn *column, const wxString &varianttype ); //@} /** @name Item management functions */ //@{ #if WXPERL_W_VERSION_GE( 2, 9, 4 ) /** Appends an item (=row) to the control and store. */ void AppendItem( const wxVector &values, Wx_UserDataO *data = NULL ) %code{% THIS->AppendItem( values, wxPtrToUInt( data ) ); %}; /** Prepends an item (=row) to the control and store. */ void PrependItem( const wxVector &values, Wx_UserDataO *data = NULL ) %code{% THIS->AppendItem( values, wxPtrToUInt( data ) ); %}; /** Inserts an item (=row) to the control and store. */ void InsertItem( unsigned int row, const wxVector &values, Wx_UserDataO *data = NULL ) %code{% THIS->AppendItem( values, wxPtrToUInt( data ) ); %}; #else /** Appends an item (=row) to the control and store. */ void AppendItem( const wxVector &values, wxClientData *data = NULL ); /** Prepends an item (=row) to the control and store. */ void PrependItem( const wxVector &values, wxClientData *data = NULL ); /** Inserts an item (=row) to the control and store. */ void InsertItem( unsigned int row, const wxVector &values, wxClientData *data = NULL ); #endif /** Delete the row at position @a row. */ void DeleteItem( unsigned row ); /** Delete all items (= all rows). */ void DeleteAllItems(); /** Sets the value in the store and update the control. */ void SetValue( const wxVariant &value, unsigned int row, unsigned int col ); /** Returns the value from the store. */ void GetValue( wxVariant &value, unsigned int row, unsigned int col ); /** Sets the value in the store and update the control. This method assumes that the a string is stored in respective column. */ void SetTextValue( const wxString &value, unsigned int row, unsigned int col ); /** Returns the value from the store. This method assumes that the a string is stored in respective column. */ wxString GetTextValue( unsigned int row, unsigned int col ) const; /** Sets the value in the store and update the control. This method assumes that the a boolean value is stored in respective column. */ void SetToggleValue( bool value, unsigned int row, unsigned int col ); /** Returns the value from the store. This method assumes that the a boolean value is stored in respective column. */ bool GetToggleValue( unsigned int row, unsigned int col ) const; //@} }; Wx-0.9923/interface/wx/dataview/dataviewliststore.h000664000000000000 1103112306612235 20625 0ustar00Mark000000000000%module{Wx}; ///////////////////////////////////////////////////////////////////////////// // Name: dataview.h // Purpose: interface of wxDataView* classes // Author: wxWidgets team // RCS-ID: $Id: dataview.h 62943 2009-12-19 11:59:55Z VZ $ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #include %loadplugin{build::Wx::XSP::Overload}; %typemap{const wxVector&}{parsed}{%wxVectorVariant%}; %typemap{wxClientData*}{parsed}{%wxPliUserDataCD*%}; /** @class wxDataViewListStore wxDataViewListStore is a specialised wxDataViewModel for storing a simple table of data. Since it derives from wxDataViewIndexListModel its data is be accessed by row (i.e. by index) instead of only by wxDataViewItem. This class actually stores the values (therefore its name) and implements all virtual methods from the base classes so it can be used directly without having to derive any class from it, but it is mostly used from within wxDataViewListCtrl. @library{wxadv} @category{dvc} */ %name{Wx::DataViewListStore} class wxDataViewListStore: public %name{Wx::DataViewIndexListModel} wxDataViewIndexListModel { public: /** Constructor */ wxDataViewListStore(); /** Destructor */ // wxPerl change: no need for destructor // ~wxDataViewListStore(); /** Prepends a data column. @a variantype indicates the type of values store in the column. This does not automatically fill in any (default) values in rows which exist in the store already. */ void PrependColumn( const wxString &varianttype ); /** Inserts a data column before @a pos. @a variantype indicates the type of values store in the column. This does not automatically fill in any (default) values in rows which exist in the store already. */ void InsertColumn( unsigned int pos, const wxString &varianttype ); /** Appends a data column. @a variantype indicates the type of values store in the column. This does not automatically fill in any (default) values in rows which exist in the store already. */ void AppendColumn( const wxString &varianttype ); #if WXPERL_W_VERSION_GE( 2, 9, 4 ) void AppendItem( const wxVector &values, Wx_UserDataO *data = NULL ) %code{% THIS->AppendItem( values, wxPtrToUInt( data ) ); %}; void PrependItem( const wxVector &values, Wx_UserDataO *data = NULL ) %code{% THIS->AppendItem( values, wxPtrToUInt( data ) ); %}; void InsertItem( unsigned int row, const wxVector &values, Wx_UserDataO *data = NULL ) %code{% THIS->AppendItem( values, wxPtrToUInt( data ) ); %}; #else /** Appends an item (=row) and fills it with @a values. The values must match the values specifies in the column in number and type. No (default) values are filled in automatically. */ void AppendItem( const wxVector &values, wxClientData *data = NULL ); /** Prepends an item (=row) and fills it with @a values. The values must match the values specifies in the column in number and type. No (default) values are filled in automatically. */ void PrependItem( const wxVector &values, wxClientData *data = NULL ); /** Inserts an item (=row) and fills it with @a values. The values must match the values specifies in the column in number and type. No (default) values are filled in automatically. */ void InsertItem( unsigned int row, const wxVector &values, wxClientData *data = NULL ); #endif /** Delete the item (=row) at position @a pos. */ void DeleteItem( unsigned pos ); /** Delete all item (=all rows) in the store. */ void DeleteAllItems(); /** Overriden from wxDataViewModel */ virtual unsigned int GetColumnCount() const; /** Overriden from wxDataViewModel */ virtual wxString GetColumnType( unsigned int col ) const; /** Overriden from wxDataViewIndexListModel */ virtual void GetValueByRow( wxVariant &value, unsigned int row, unsigned int col ) const; /** Overriden from wxDataViewIndexListModel */ virtual bool SetValueByRow( const wxVariant &value, unsigned int row, unsigned int col ); }; Wx-0.9923/interface/wx/dataview/dataviewvirtuallistmodel.h000664000000000000 345412306612235 22172 0ustar00Mark000000000000%module{Wx}; ///////////////////////////////////////////////////////////////////////////// // Name: dataview.h // Purpose: interface of wxDataView* classes // Author: wxWidgets team // RCS-ID: $Id: dataviewvirtuallistmodel.h 2927 2010-06-06 08:06:10Z mbarbon $ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// %loadplugin{build::Wx::XSP::Virtual}; #include /** @class wxDataViewVirtualListModel wxDataViewVirtualListModel is a specialized data model which lets you address an item by its position (row) rather than its wxDataViewItem and as such offers the exact same interface as wxDataViewIndexListModel. The important difference is that under platforms other than OS X, using this model will result in a truly virtual control able to handle millions of items as the control doesn't store any item (a feature not supported by the Carbon API under OS X). @see wxDataViewIndexListModel for the API. @library{wxadv} @category{dvc} */ %name{Wx::DataViewVirtualListModel} class wxDataViewVirtualListModel : public %name{Wx::DataViewModel} wxDataViewModel { public: /** Constructor. */ wxDataViewVirtualListModel(unsigned int initial_size = 0); /** Returns the number of virtual items (i.e. rows) in the list. */ unsigned int GetCount() const; // pure virtual methods from base class virtual unsigned int GetColumnCount() const %Virtual{pure}; virtual wxString GetColumnType(unsigned int column) const %Virtual{pure}; virtual void GetValueByRow(wxVariant& value, unsigned int row, unsigned int col) const %Virtual{pure}; virtual bool SetValueByRow(const wxVariant& value, unsigned int row, unsigned int col) %Virtual{pure}; }; Wx-0.9923/interface/wx/generic/000775000000000000 012316265011 14410 5ustar00Mark000000000000Wx-0.9923/interface/wx/generic/spinctrg.h000664000000000000 1001612306612235 16513 0ustar00Mark000000000000%module{Wx}; ///////////////////////////////////////////////////////////////////////////// // Name: spinctrg.h // Purpose: interface of wxSpinCtrlDouble // Author: wxWidgets team // RCS-ID: $Id: spinctrg.h 60266 2009-04-21 11:21:36Z FM $ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #if WXPERL_W_VERSION_GE( 2, 9, 0 ) #include %loadplugin{build::Wx::XSP::Overload}; /** @class wxSpinCtrlDouble wxSpinCtrlDouble combines wxTextCtrl and wxSpinButton in one control and displays a real number. (wxSpinCtrl displays an integer.) @beginStyleTable @style{wxSP_ARROW_KEYS} The user can use arrow keys to change the value. @style{wxSP_WRAP} The value wraps at the minimum and maximum. @endStyleTable @library{wxcore} @category{ctrl} @appearance{spinctrldouble.png} @see wxSpinButton, wxSpinCtrl, wxControl */ %name{Wx::SpinCtrlDouble} class wxSpinCtrlDouble : public %name{Wx::Control} wxControl { public: /** Default constructor. */ wxSpinCtrlDouble() %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Constructor, creating and showing a spin control. @param parent Parent window. Must not be @NULL. @param value Default value (as text). @param id Window identifier. The value wxID_ANY indicates a default value. @param pos Window position. If ::wxDefaultPosition is specified then a default position is chosen. @param size Window size. If ::wxDefaultSize is specified then a default size is chosen. @param style Window style. See wxSpinButton. @param min Minimal value. @param max Maximal value. @param initial Initial value. @param inc Increment value. @param name Window name. @see Create() */ wxSpinCtrlDouble(wxWindow* parent, wxWindowID id = -1, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_ARROW_KEYS, double min = 0, double max = 100, double initial = 0, double inc = 1, const wxString& name = _T("wxSpinCtrlDouble")) %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Creation function called by the spin control constructor. See wxSpinCtrlDouble() for details. */ bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_ARROW_KEYS, double min = 0, double max = 100, double initial = 0, double inc = 1, const wxString& name = "wxSpinCtrlDouble"); /** Gets the number of digits in the display. */ unsigned int GetDigits() const; /** Gets the increment value. */ double GetIncrement() const; /** Gets maximal allowable value. */ double GetMax() const; /** Gets minimal allowable value. */ double GetMin() const; /** Gets the value of the spin control. */ double GetValue() const; /** Sets the number of digits in the display. */ void SetDigits(unsigned int digits); /** Sets the increment value. */ void SetIncrement(double inc); /** Sets range of allowable values. */ void SetRange(double minVal, double maxVal); /** Sets the value of the spin control. Use the variant using double instead. */ virtual void SetValue(const wxString& text); /** Sets the value of the spin control. */ void SetValue(double value); }; #endif Wx-0.9923/interface/wx/grid/000775000000000000 012316265011 13721 5ustar00Mark000000000000Wx-0.9923/interface/wx/grid/gridtablebase.h000664000000000000 3441012306612235 16767 0ustar00Mark000000000000%module{Wx}; ///////////////////////////////////////////////////////////////////////////// // Name: grid.h // Purpose: interface of wxGrid and related classes // Author: wxWidgets team // RCS-ID: $Id: gridtablebase.h 3030 2011-03-13 09:47:45Z mbarbon $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// %loadplugin{build::Wx::XSP::Virtual}; #include %typemap{wxGrid*}; %typemap{wxGridCellAttr*}; %typemap{wxGridCellAttrProvider*}; %typemap{const wxGridCellCoords&}{reference}; %typemap{wxGridCellAttr::wxAttrKind}{simple}; /** @class wxGridTableBase The almost abstract base class for grid tables. A grid table is responsible for storing the grid data and, indirectly, grid cell attributes. The data can be stored in the way most convenient for the application but has to be provided in string form to wxGrid. It is also possible to provide cells values in other formats if appropriate, e.g. as numbers. This base class is not quite abstract as it implements a trivial strategy for storing the attributes by forwarding it to wxGridCellAttrProvider and also provides stubs for some other functions. However it does have a number of pure virtual methods which must be implemented in the derived classes. @see wxGridStringTable @library{wxadv} @category{grid} */ %name{Wx::GridTableBase} class wxGridTableBase : public %name{Wx::Object} wxObject { %NoVirtualBase; %VirtualImplementation{ %Name{wxPlGridTable}; %Declaration{% WXPLI_DECLARE_DYNAMIC_CLASS( wxPlGridTable ); %}; %Implementation{% WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlGridTable, wxGridTableBase ); %}; }; public: /** Default constructor. */ wxGridTableBase(); /** Destructor frees the attribute provider if it was created. */ %name{Destroy} virtual ~wxGridTableBase(); /** Must be overridden to return the number of rows in the table. For backwards compatibility reasons, this method is not const. Use GetRowsCount() instead of it in const methods of derived table classes. */ virtual int GetNumberRows() = 0 %Virtual{pure}; /** Must be overridden to return the number of columns in the table. For backwards compatibility reasons, this method is not const. Use GetColsCount() instead of it in const methods of derived table classes, */ virtual int GetNumberCols() = 0 %Virtual{pure}; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) /** Return the number of rows in the table. This method is not virtual and is only provided as a convenience for the derived classes which can't call GetNumberRows() without a @c const_cast from their const methods. */ int GetRowsCount() const; /** Return the number of columns in the table. This method is not virtual and is only provided as a convenience for the derived classes which can't call GetNumberCols() without a @c const_cast from their const methods. */ int GetColsCount() const; #endif /** @name Table Cell Accessors */ //@{ /** May be overridden to implement testing for empty cells. This method is used by the grid to test if the given cell is not used and so whether a neighbouring cell may overflow into it. By default it only returns true if the value of the given cell, as returned by GetValue(), is empty. */ #if WXPERL_W_VERSION_GE( 2, 9, 0 ) virtual bool IsEmptyCell(int row, int col) %Virtual; #else virtual bool IsEmptyCell(int row, int col) = 0 %Virtual{pure}; #endif /** Same as IsEmptyCell() but taking wxGridCellCoords. Notice that this method is not virtual, only IsEmptyCell() should be overridden. */ #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool IsEmpty(const wxGridCellCoords& coords); #endif /** Must be overridden to implement accessing the table values as text. */ virtual wxString GetValue(int row, int col) = 0 %Virtual{pure}; /** Must be overridden to implement setting the table values as text. */ virtual void SetValue(int row, int col, const wxString& value) = 0 %Virtual{pure}; /** Returns the type of the value in the given cell. By default all cells are strings and this method returns @c wxGRID_VALUE_STRING. */ virtual wxString GetTypeName(int row, int col) %Virtual; /** Returns true if the value of the given cell can be accessed as if it were of the specified type. By default the cells can only be accessed as strings. Note that a cell could be accessible in different ways, e.g. a numeric cell may return @true for @c wxGRID_VALUE_NUMBER but also for @c wxGRID_VALUE_STRING indicating that the value can be coerced to a string form. */ virtual bool CanGetValueAs(int row, int col, const wxString& typeName) %Virtual; /** Returns true if the value of the given cell can be set as if it were of the specified type. @see CanGetValueAs() */ virtual bool CanSetValueAs(int row, int col, const wxString& typeName) %Virtual; /** Returns the value of the given cell as a long. This should only be called if CanGetValueAs() returns @true when called with @c wxGRID_VALUE_NUMBER argument. Default implementation always return 0. */ virtual long GetValueAsLong(int row, int col) %Virtual; /** Returns the value of the given cell as a double. This should only be called if CanGetValueAs() returns @true when called with @c wxGRID_VALUE_FLOAT argument. Default implementation always return 0.0. */ virtual double GetValueAsDouble(int row, int col) %Virtual; /** Returns the value of the given cell as a boolean. This should only be called if CanGetValueAs() returns @true when called with @c wxGRID_VALUE_BOOL argument. Default implementation always return false. */ virtual bool GetValueAsBool(int row, int col) %Virtual; /** Returns the value of the given cell as a user-defined type. This should only be called if CanGetValueAs() returns @true when called with @a typeName. Default implementation always return @NULL. */ // virtual void *GetValueAsCustom(int row, int col, const wxString& typeName); /** Sets the value of the given cell as a long. This should only be called if CanSetValueAs() returns @true when called with @c wxGRID_VALUE_NUMBER argument. Default implementation doesn't do anything. */ virtual void SetValueAsLong(int row, int col, long value) %Virtual; /** Sets the value of the given cell as a double. This should only be called if CanSetValueAs() returns @true when called with @c wxGRID_VALUE_FLOAT argument. Default implementation doesn't do anything. */ virtual void SetValueAsDouble(int row, int col, double value) %Virtual; /** Sets the value of the given cell as a boolean. This should only be called if CanSetValueAs() returns @true when called with @c wxGRID_VALUE_BOOL argument. Default implementation doesn't do anything. */ virtual void SetValueAsBool( int row, int col, bool value ) %Virtual; /** Sets the value of the given cell as a user-defined type. This should only be called if CanSetValueAs() returns @true when called with @a typeName. Default implementation doesn't do anything. */ // virtual void SetValueAsCustom(int row, int col, const wxString& typeName, // void *value); //@} /** Called by the grid when the table is associated with it. The default implementation stores the pointer and returns it from its GetView() and so only makes sense if the table cannot be associated with more than one grid at a time. */ virtual void SetView(wxGrid *grid) %Virtual; /** Returns the last grid passed to SetView(). */ virtual wxGrid *GetView() const %Virtual; /** @name Table Structure Modifiers Notice that none of these functions are pure virtual as they don't have to be implemented if the table structure is never modified after creation, i.e. neither rows nor columns are never added or deleted but that you do need to implement them if they are called, i.e. if your code either calls them directly or uses the matching wxGrid methods, as by default they simply do nothing which is definitely inappropriate. */ //@{ /** Clear the table contents. This method is used by wxGrid::ClearGrid(). */ virtual void Clear() %Virtual; /** Insert additional rows into the table. @param pos The position of the first new row. @param numRows The number of rows to insert. */ virtual bool InsertRows(size_t pos = 0, size_t numRows = 1) %Virtual; /** Append additional rows at the end of the table. This method is provided in addition to InsertRows() as some data models may only support appending rows to them but not inserting them at arbitrary locations. In such case you may implement this method only and leave InsertRows() unimplemented. @param numRows The number of rows to add. */ virtual bool AppendRows(size_t numRows = 1) %Virtual; /** Delete rows from the table. @param pos The first row to delete. @param numRows The number of rows to delete. */ virtual bool DeleteRows(size_t pos = 0, size_t numRows = 1) %Virtual; /** Exactly the same as InsertRows() but for columns. */ virtual bool InsertCols(size_t pos = 0, size_t numCols = 1) %Virtual; /** Exactly the same as AppendRows() but for columns. */ virtual bool AppendCols(size_t numCols = 1) %Virtual; /** Exactly the same as DeleteRows() but for columns. */ virtual bool DeleteCols(size_t pos = 0, size_t numCols = 1) %Virtual; //@} /** @name Table Row and Column Labels By default the numbers are used for labeling rows and Latin letters for labeling columns. If the table has more than 26 columns, the pairs of letters are used starting from the 27-th one and so on, i.e. the sequence of labels is A, B, ..., Z, AA, AB, ..., AZ, BA, ..., ..., ZZ, AAA, ... */ //@{ /** Return the label of the specified row. */ virtual wxString GetRowLabelValue(int row) %Virtual; /** Return the label of the specified column. */ virtual wxString GetColLabelValue(int col) %Virtual; /** Set the given label for the specified row. The default version does nothing, i.e. the label is not stored. You must override this method in your derived class if you wish wxGrid::SetRowLabelValue() to work. */ virtual void SetRowLabelValue(int row, const wxString& label) %Virtual; /** Exactly the same as SetRowLabelValue() but for columns. */ virtual void SetColLabelValue(int col, const wxString& label) %Virtual; //@} /** @name Attributes Management By default the attributes management is delegated to wxGridCellAttrProvider class. You may override the methods in this section to handle the attributes directly if, for example, they can be computed from the cell values. */ //@{ /** Associate this attributes provider with the table. The table takes ownership of @a attrProvider pointer and will delete it when it doesn't need it any more. The pointer can be @NULL, however this won't disable attributes management in the table but will just result in a default attributes being recreated the next time any of the other functions in this section is called. To completely disable the attributes support, should this be needed, you need to override CanHaveAttributes() to return @false. */ void SetAttrProvider(wxGridCellAttrProvider *attrProvider); /** Returns the attribute provider currently being used. This function may return @NULL if the attribute provider hasn't been neither associated with this table by SetAttrProvider() nor created on demand by any other methods. */ wxGridCellAttrProvider *GetAttrProvider() const; /** Return the attribute for the given cell. By default this function is simply forwarded to wxGridCellAttrProvider::GetAttr() but it may be overridden to handle attributes directly in the table. */ virtual wxGridCellAttr *GetAttr(int row, int col, wxGridCellAttr::wxAttrKind kind) %Virtual; /** Set attribute of the specified cell. By default this function is simply forwarded to wxGridCellAttrProvider::SetAttr(). The table takes ownership of @a attr, i.e. will call DecRef() on it. */ virtual void SetAttr(wxGridCellAttr* attr, int row, int col) %Virtual; /** Set attribute of the specified row. By default this function is simply forwarded to wxGridCellAttrProvider::SetRowAttr(). The table takes ownership of @a attr, i.e. will call DecRef() on it. */ virtual void SetRowAttr(wxGridCellAttr *attr, int row) %Virtual; /** Set attribute of the specified column. By default this function is simply forwarded to wxGridCellAttrProvider::SetColAttr(). The table takes ownership of @a attr, i.e. will call DecRef() on it. */ virtual void SetColAttr(wxGridCellAttr *attr, int col) %Virtual; //@} /** Returns true if this table supports attributes or false otherwise. By default, the table automatically creates a wxGridCellAttrProvider when this function is called if it had no attribute provider before and returns @true. */ virtual bool CanHaveAttributes() %Virtual; }; Wx-0.9923/interface/wx/headercol.h000664000000000000 3445612306612235 15212 0ustar00Mark000000000000%module{Wx}; ///////////////////////////////////////////////////////////////////////////// // Name: wx/headercol.h // Purpose: interface of wxHeaderColumn // Author: Vadim Zeitlin // Created: 2008-12-01 // RCS-ID: $Id: headercol.h 3159 2012-02-29 23:43:26Z mdootson $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #if WXPERL_W_VERSION_GE( 2, 9, 1 ) #include #include // wxDVC_DEFAULT_WIDTH %loadplugin{build::Wx::XSP::Overload}; %loadplugin{build::Wx::XSP::Virtual}; %loadplugin{build::Wx::XSP::Enum}; %typemap{wxAlignment}{simple}; /** Special value used for column width meaning unspecified or default. */ enum { /** Special value used for column width meaning unspecified or default. */ wxCOL_WIDTH_DEFAULT = -1, #if WXPERL_W_VERSION_GE( 2, 9, 3 ) /** Size the column automatically to fit all values. @note On OS X, this style is only implemented in the Cocoa build on OS X >= 10.5; it behaves identically to wxCOL_WIDTH_DEFAULT otherwise. */ wxCOL_WIDTH_AUTOSIZE = -2 #endif }; /** Bit flags used as wxHeaderColumn flags. */ enum { /// Column can be resized (included in default flags). wxCOL_RESIZABLE = 1, /// Column can be clicked to toggle the sort order by its contents. wxCOL_SORTABLE = 2, /// Column can be dragged to change its order (included in default). wxCOL_REORDERABLE = 4, /// Column is not shown at all. wxCOL_HIDDEN = 8, /// Default flags for wxHeaderColumn ctor. wxCOL_DEFAULT_FLAGS = wxCOL_RESIZABLE | wxCOL_REORDERABLE }; /** @class wxHeaderColumn Represents a column header in controls displaying tabular data such as wxDataViewCtrl or wxGrid. Notice that this is an abstract base class which is implemented (usually using the information stored in the associated control) by the different controls using wxHeaderCtrl. As the control only needs to retrieve the information about the column, this class defines only the methods for accessing the various column properties but not for changing them as the setters might not be needed at all, e.g. if the column attributes can only be changed via the methods of the main associated control (this is the case for wxGrid for example). If you do want to allow changing them directly using the column itself, you should inherit from wxSettableHeaderColumn instead of this class. Finally, if you don't already store the column information at all anywhere, you should use the concrete wxHeaderColumnSimple class and wxHeaderCtrlSimple. @library{wxcore} @category{ctrl} */ %name{Wx::HeaderColumn} class wxHeaderColumn { public: /** Get the text shown in the column header. */ virtual wxString GetTitle() const = 0 %Virtual{pure}; /** Returns the bitmap in the header of the column, if any. If the column has no associated bitmap, wxNullBitmap should be returned. */ virtual wxBitmap GetBitmap() const = 0 %Virtual{pure}; /** Returns the current width of the column. @return Width of the column in pixels, never wxCOL_WIDTH_DEFAULT. */ virtual int GetWidth() const = 0 %Virtual{pure}; /** Return the minimal column width. @return The minimal width such that the user can't resize the column to lesser size (notice that it is still possible to set the column width to smaller value from the program code). Return 0 from here to allow resizing the column to arbitrarily small size. */ virtual int GetMinWidth() const = 0 %Virtual{pure}; /** Returns the current column alignment. @return One of wxALIGN_CENTRE, wxALIGN_LEFT or wxALIGN_RIGHT. */ virtual wxAlignment GetAlignment() const = 0 %Virtual{pure}; /** Get the column flags. This method retrieves all the flags at once, you can also use HasFlag() to test for any individual flag or IsResizeable(), IsSortable(), IsReorderable() and IsHidden() to test for particular flags. */ virtual int GetFlags() const = 0 %Virtual{pure}; /** Return @true if the specified flag is currently set for this column. */ bool HasFlag(int flag) const; /** Return true if the column can be resized by the user. Equivalent to HasFlag(wxCOL_RESIZABLE). */ virtual bool IsResizeable() const; /** Returns @true if the column can be clicked by user to sort the control contents by the field in this column. This corresponds to wxCOL_SORTABLE flag which is off by default. */ virtual bool IsSortable() const; /** Returns @true if the column can be dragged by user to change its order. This corresponds to wxCOL_REORDERABLE flag which is on by default. */ virtual bool IsReorderable() const; /** Returns @true if the column is currently hidden. This corresponds to wxCOL_HIDDEN flag which is off by default. */ virtual bool IsHidden() const; /** Returns @true if the column is currently shown. This corresponds to the absence of wxCOL_HIDDEN flag. */ bool IsShown() const; /** Returns @true if the column is currently used for sorting. */ virtual bool IsSortKey() const = 0 %Virtual{pure}; /** Returns @true, if the sort order is ascending. Notice that it only makes sense to call this function if the column is used for sorting at all, i.e. if IsSortKey() returns @true. */ virtual bool IsSortOrderAscending() const = 0 %Virtual{pure}; }; /** @class wxSettableHeaderColumn Adds methods to set the column attributes to wxHeaderColumn. This class adds setters for the column attributes defined by wxHeaderColumn. It is still an abstract base class and needs to be implemented before using it with wxHeaderCtrl. @library{wxcore} @category{ctrl} */ %name{Wx::SettableHeaderColumn} class wxSettableHeaderColumn : public %name{Wx::HeaderColumn} wxHeaderColumn { public: /** Set the text to display in the column header. */ virtual void SetTitle(const wxString& title) = 0 %Virtual{pure}; /** Set the bitmap to be displayed in the column header. Notice that the bitmaps displayed in different columns of the same control must all be of the same size. */ virtual void SetBitmap(const wxBitmap& bitmap) = 0 %Virtual{pure}; /** Set the column width. @param width The column width in pixels or the special wxCOL_WIDTH_DEFAULT value meaning to use default width. */ virtual void SetWidth(int width) = 0 %Virtual{pure}; /** Set the minimal column width. This method can be used with resizeable columns (i.e. those for which wxCOL_RESIZABLE flag is set in GetFlags() or, alternatively, IsResizeable() returns @true) to prevent the user from making them narrower than the given width. @param minWidth The minimal column width in pixels, may be 0 to remove any previously set restrictions. */ virtual void SetMinWidth(int minWidth) = 0 %Virtual{pure}; /** Set the alignment of the column header. @param align The text alignment in horizontal direction only or wxALIGN_NOT to use the default alignment, The possible values here are wxALIGN_CENTRE, wxALIGN_LEFT or wxALIGN_RIGHT with wxALIGN_CENTRE_HORIZONTAL being also supported as synonym for wxALIGN_CENTRE for consistency (but notice that GetAlignment() never returns it). */ virtual void SetAlignment(wxAlignment align) = 0 %Virtual{pure}; /** Set the column flags. This method allows to set all flags at once, see also generic ChangeFlag(), SetFlag(), ClearFlag() and ToggleFlag() methods below as well as specific SetResizeable(), SetSortable(), SetReorderable() and SetHidden() ones. @param flags Combination of wxCOL_RESIZABLE, wxCOL_SORTABLE, wxCOL_REORDERABLE and wxCOL_HIDDEN bit flags. */ virtual void SetFlags(int flags) = 0 %Virtual{pure} %Virtual{pure}; /** Set or clear the given flag. @param flag The flag to set or clear. @param set If @true, set the flag, i.e. equivalent to calling SetFlag(), otherwise clear it, as ClearFlag(). @see SetFlags() */ void ChangeFlag(int flag, bool set); /** Set the specified flag for the column. @see SetFlags() */ void SetFlag(int flag); /** Clear the specified flag for the column. @see SetFlags() */ void ClearFlag(int flag); /** Toggle the specified flag for the column. If the flag is currently set, equivalent to ClearFlag(), otherwise -- to SetFlag(). @see SetFlags() */ void ToggleFlag(int flag); /** Call this to enable or disable interactive resizing of the column by the user. By default, the columns are resizeable. Equivalent to ChangeFlag(wxCOL_RESIZABLE, resizeable). */ virtual void SetResizeable(bool resizeable); /** Allow clicking the column to sort the control contents by the field in this column. By default, the columns are not sortable so you need to explicitly call this function to allow sorting by the field corresponding to this column. Equivalent to ChangeFlag(wxCOL_SORTABLE, sortable). */ virtual void SetSortable(bool sortable); /** Allow changing the column order by dragging it. Equivalent to ChangeFlag(wxCOL_REORDERABLE, reorderable). */ virtual void SetReorderable(bool reorderable); /** Hide or show the column. By default all columns are shown but some of them can be completely hidden from view by calling this function. Equivalent to ChangeFlag(wxCOL_HIDDEN, hidden). */ virtual void SetHidden(bool hidden); /** Sets this column as the sort key for the associated control. Calling this function with @true argument means that this column is currently used for sorting the control contents and so should typically display an arrow indicating it (the direction of the arrow depends on IsSortOrderAscending() return value). Don't confuse this function with SetSortable() which should be used to indicate that the column @em may be used for sorting while this one is used to indicate that it currently @em is used for sorting. Of course, SetAsSortKey() can be only called for sortable columns. @param sort Sort (default) or don't sort the control contents by this column. */ #if WXPERL_W_VERSION_LE( 2, 9, 2 ) virtual void SetAsSortKey(bool sort = true) = 0 %Virtual{pure}; #endif /** Don't use this column for sorting. This is equivalent to calling SetAsSortKey() with @false argument. */ void UnsetAsSortKey(); /** Sets the sort order for this column. This only makes sense for sortable columns which are currently used as sort key, i.e. for which IsSortKey() returns @true and is only taken into account by the control in which this column is inserted, this function just stores the sort order in the wxHeaderColumn object. @param ascending If @true, sort in ascending order, otherwise in descending order. */ virtual void SetSortOrder(bool ascending) = 0 %Virtual{pure}; /** Inverses the sort order. This function is typically called when the user clicks on a column used for sorting to change sort order from ascending to descending or vice versa. @see SetSortOrder(), IsSortOrderAscending() */ void ToggleSortOrder(); }; /** @class wxHeaderColumnSimple Simple container for the information about the column. This is a concrete class implementing all wxSettableHeaderColumn class methods in a trivial way, i.e. by just storing the information in the object itself. It is used by and with wxHeaderCtrlSimple, e.g. @code wxHeaderCtrlSimple * header = new wxHeaderCtrlSimple(...); wxHeaderColumnSimple col("Title"); col.SetWidth(100); col.SetSortable(100); header->AppendColumn(col); @endcode @library{wxcore} @category{ctrl} */ %name{Wx::HeaderColumnSimple} class wxHeaderColumnSimple : public %name{Wx::HeaderColumn} wxHeaderColumn { public: //@{ /** Constructor for a column header. The first constructor creates a header showing the given text @a title while the second one creates one showing the specified @a bitmap image. */ wxHeaderColumnSimple(const wxString& title, int width = wxCOL_WIDTH_DEFAULT, wxAlignment align = wxALIGN_NOT, int flags = wxCOL_DEFAULT_FLAGS); wxHeaderColumnSimple(const wxBitmap &bitmap, int width = wxDVC_DEFAULT_WIDTH, wxAlignment align = wxALIGN_CENTER, int flags = wxCOL_DEFAULT_FLAGS); //@} //@{ /// Trivial implementations of the base class pure virtual functions. virtual void SetTitle(const wxString& title); virtual wxString GetTitle() const; virtual void SetBitmap(const wxBitmap& bitmap); virtual wxBitmap GetBitmap() const; virtual void SetWidth(int width); virtual int GetWidth() const; virtual void SetMinWidth(int minWidth); virtual int GetMinWidth() const; virtual void SetAlignment(wxAlignment align); virtual wxAlignment GetAlignment() const; virtual void SetFlags(int flags); virtual int GetFlags() const; #if WXPERL_W_VERSION_LE( 2, 9, 2 ) virtual void SetAsSortKey(bool sort = true); #endif virtual bool IsSortKey() const; virtual void SetSortOrder(bool ascending); virtual bool IsSortOrderAscending() const; //@} }; #endif Wx-0.9923/interface/wx/headerctrl.h000664000000000000 6745412306612235 15405 0ustar00Mark000000000000%module{Wx}; ///////////////////////////////////////////////////////////////////////////// // Name: wx/headerctrl.h // Purpose: interface of wxHeaderCtrl // Author: Vadim Zeitlin // Created: 2008-12-01 // RCS-ID: $Id: headerctrl.h 2927 2010-06-06 08:06:10Z mbarbon $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #if WXPERL_W_VERSION_GE( 2, 9, 1 ) #include %typemap{wxMenu&}{reference}; %typemap{const wxHeaderColumn&}{reference}; %typemap{const wxHeaderColumnSimple&}{reference}; %loadplugin{build::Wx::XSP::Overload}; %loadplugin{build::Wx::XSP::Virtual}; %loadplugin{build::Wx::XSP::Enum}; %loadplugin{build::Wx::XSP::Event}; enum { // allow column drag and drop wxHD_ALLOW_REORDER = 0x0001, // allow hiding (and showing back) the columns using the menu shown by // right clicking the header wxHD_ALLOW_HIDE = 0x0002, // style used by default when creating the control wxHD_DEFAULT_STYLE = wxHD_ALLOW_REORDER }; %Event{%EVT_HEADER_CLICK(id, func)%} {wxEVT_COMMAND_HEADER_CLICK}; %Event{%EVT_HEADER_RIGHT_CLICK(id, func)%} {wxEVT_COMMAND_HEADER_RIGHT_CLICK}; %Event{%EVT_HEADER_MIDDLE_CLICK(id, func)%} {wxEVT_COMMAND_HEADER_MIDDLE_CLICK}; %Event{%EVT_HEADER_DCLICK(id, func)%} {wxEVT_COMMAND_HEADER_DCLICK}; %Event{%EVT_HEADER_RIGHT_DCLICK(id, func)%} {wxEVT_COMMAND_HEADER_MIDDLE_DCLICK}; %Event{%EVT_HEADER_MIDDLE_DCLICK(id, func)%} {wxEVT_COMMAND_HEADER_MIDDLE_DCLICK}; %Event{%EVT_HEADER_SEPARATOR_DCLICK(id, func)%} {wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK}; %Event{%EVT_HEADER_BEGIN_RESIZE(id, func)%} {wxEVT_COMMAND_HEADER_BEGIN_RESIZE}; %Event{%EVT_HEADER_RESIZING(id, func)%} {wxEVT_COMMAND_HEADER_RESIZING}; %Event{%EVT_HEADER_END_RESIZE(id, func)%} {wxEVT_COMMAND_HEADER_END_RESIZE}; %Event{%EVT_HEADER_BEGIN_REORDER(id, func)%} {wxEVT_COMMAND_HEADER_BEGIN_REORDER}; %Event{%EVT_HEADER_END_REORDER(id, func)%} {wxEVT_COMMAND_HEADER_END_REORDER}; %Event{%EVT_HEADER_DRAGGING_CANCELLED(id, func)%} {wxEVT_COMMAND_HEADER_DRAGGING_CANCELLED}; /** @class wxHeaderCtrl wxHeaderCtrl is the control containing the column headings which is usually used for display of tabular data. It is used as part of wxGrid, in generic version wxDataViewCtrl and report view of wxListCtrl but can be also used independently. In general this class is meant to be used as part of another control which already stores the column information somewhere as it can't be used directly: instead you need to inherit from it and implement the GetColumn() method to provide column information. See wxHeaderCtrlSimple for a concrete control class which can be used directly. In addition to labeling the columns, the control has the following features: - Column reordering support, either by explicitly configuring the columns order and calling SetColumnsOrder() or by dragging the columns interactively (if enabled). - Display of the icons in the header: this is often used to display a sort or reverse sort indicator when the column header is clicked. Notice that this control itself doesn't do anything other than displaying the column headers. In particular column reordering and sorting must still be supported by the associated control displaying the real data under the header. Also remember to call ScrollWindow() method of the control if the associated data display window has a horizontal scrollbar, otherwise the headers wouldn't align with the data when the window is scrolled. This control is implemented using the native header control under MSW systems and a generic implementation elsewhere. @section headerctrl_improvements Future Improvements Some features are supported by the native MSW control and so could be easily implemented in this version of wxHeaderCtrl but need to be implemented in the generic version as well to be really useful. Please let us know if you need or, better, plan to work on implementing, any of them: - Displaying bitmaps instead of or together with the text - Custom drawn headers - Filters associated with a column. @beginStyleTable @style{wxHD_ALLOW_REORDER} If this style is specified (it is by default), the user can reorder the control columns by dragging them. @style{wxHD_ALLOW_HIDE} If this style is specified, the control shows a popup menu allowing the user to change the columns visibility on right mouse click. Notice that the program can always hide or show the columns, this style only affects the users capability to do it. @style{wxHD_DEFAULT_STYLE} Symbolic name for the default control style, currently equal to @c wxHD_ALLOW_REORDER. @endStyleTable @beginEventEmissionTable{wxHeaderCtrlEvent} @event{EVT_HEADER_CLICK(id, func)} A column heading was clicked. @event{EVT_HEADER_RIGHT_CLICK(id, func)} A column heading was right clicked. @event{EVT_HEADER_MIDDLE_CLICK(id, func)} A column heading was clicked with the middle mouse button. @event{EVT_HEADER_DCLICK(id, func)} A column heading was double clicked. @event{EVT_HEADER_RIGHT_DCLICK(id, func)} A column heading was right double clicked. @event{EVT_HEADER_MIDDLE_DCLICK(id, func)} A column heading was double clicked with the middle mouse button. @event{EVT_HEADER_SEPARATOR_DCLICK(id, func)} Separator to the right of the specified column was double clicked (this action is commonly used to resize the column to fit its contents width and the control provides UpdateColumnWidthToFit() method to make implementing this easier). @event{EVT_HEADER_BEGIN_RESIZE(id, func)} The user started to drag the separator to the right of the column with the specified index (this can only happen for the columns for which wxHeaderColumn::IsResizeable() returns true). The event can be vetoed to prevent the column from being resized. If it isn't, the resizing and end resize (or dragging cancelled) events will be generated later. @event{EVT_HEADER_RESIZING(id, func)} The user is dragging the column with the specified index resizing it and its current width is wxHeaderCtrlEvent::GetWidth(). The event can be vetoed to stop the dragging operation completely at any time. @event{EVT_HEADER_END_RESIZE(id, func)} The user stopped dragging the column by releasing the mouse. The column should normally be resized to the value of wxHeaderCtrlEvent::GetWidth(). @event{EVT_HEADER_BEGIN_REORDER(id, func)} The user started to drag the column with the specified index (this can only happen for the controls with wxHD_ALLOW_REORDER style). This event can be vetoed to prevent the column from being reordered, otherwise the end reorder message will be generated later. @event{EVT_HEADER_END_REORDER(id, func)} The user dropped the column in its new location. The event can be vetoed to prevent the column from being placed at the new position or handled to update the display of the data in the associated control to match the new column location (available from wxHeaderCtrlEvent::GetNewOrder()). @event{EVT_HEADER_DRAGGING_CANCELLED(id, func)} The resizing or reordering operation currently in progress was cancelled. This can happen if the user pressed Esc key while dragging the mouse or the mouse capture was lost for some other reason. You only need to handle this event if your application entered into some modal mode when resizing or reordering began, in which case it should handle this event in addition to the matching end resizing or reordering ones. @endEventTable @library{wxcore} @category{ctrl} @see wxGrid, wxListCtrl, wxDataViewCtrl */ ## TODO plugin to add %postcall for constructors %name{Wx::HeaderCtrl} class wxHeaderCtrl : public %name{Wx::Control} wxControl { %NoVirtualBase; public: /** Default constructor not creating the underlying window. You must use Create() after creating the object using this constructor. */ wxHeaderCtrl() %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Constructor creating the window. Please see Create() for the parameters documentation. */ wxHeaderCtrl(wxWindow *parent, wxWindowID winid = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHD_DEFAULT_STYLE, const wxString& name = wxHeaderCtrlNameStr) %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Create the header control window. @param parent The parent window. The header control should be typically positioned along the top edge of this window. @param winid Id of the control or @c wxID_ANY if you don't care. @param pos The initial position of the control. @param size The initial size of the control (usually not very useful as this control will typically be resized to have the same width as the associated data display control). @param style The control style, @c wxHD_DEFAULT_STYLE by default. Notice that the default style allows the user to reorder the columns by dragging them and you need to explicitly turn this feature off by using @code wxHD_DEFAULT_STYLE & ~wxHD_ALLOW_REORDER @endcode if this is undesirable. @param name The name of the control. */ bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHD_DEFAULT_STYLE, const wxString& name = wxHeaderCtrlNameStr); /** Set the number of columns in the control. The control will use GetColumn() to get information about all the new columns and refresh itself, i.e. this method also has the same effect as calling UpdateColumn() for all columns but it should only be used if the number of columns really changed. */ void SetColumnCount(unsigned int count); /** Return the number of columns in the control. @return Number of columns as previously set by SetColumnCount(). @see IsEmpty() */ unsigned int GetColumnCount() const; /** Return whether the control has any columns. @see GetColumnCount() */ bool IsEmpty() const; /** Update the column with the given index. When the value returned by GetColumn() changes, this method must be called to notify the control about the change and update the visual display to match the new column data. @param idx The column index, must be less than GetColumnCount(). */ void UpdateColumn(unsigned int idx); /** Change the columns display order. The display order defines the order in which the columns appear on the screen and does @em not affect the interpretation of indices by all the other class methods. The @a order array specifies the column indices corresponding to the display positions. @param order A permutation of all column indices, i.e. an array of size GetColumnsOrder() containing all column indices exactly once. The n-th element of this array defines the index of the column shown at the n-th position from left (for the default left-to-right writing direction). @see wxListCtrl::SetColumnsOrder() */ void SetColumnsOrder(const wxArrayInt& order); /** Return the array describing the columns display order. For the controls without wxHD_ALLOW_REORDER style the returned array will be the same as was passed to SetColumnsOrder() previously or define the default order (with n-th element being n) if it hadn't been called. But for the controls with wxHD_ALLOW_REORDER style, the columns can be also reordered by user. */ wxArrayInt GetColumnsOrder() const; /** Return the index of the column displayed at the given position. @param pos The display position, e.g. 0 for the left-most column, 1 for the next one and so on until GetColumnCount() - 1. @see GetColumnPos() */ unsigned int GetColumnAt(unsigned int pos) const; /** Get the position at which this column is currently displayed. Notice that a valid position is returned even for the hidden columns currently. @param idx The column index, must be less than GetColumnCount(). @see GetColumnAt() */ unsigned int GetColumnPos(unsigned int idx) const; /** Reset the columns order to the natural one. After calling this function, the column with index @c idx appears at position @c idx in the control. */ void ResetColumnsOrder(); /** Helper function to manipulate the array of column indices. This function reshuffles the array of column indices indexed by positions (i.e. using the same convention as for SetColumnsOrder()) so that the column with the given index is found at the specified position. @param order Array containing the indices of columns in order of their positions. @param idx The index of the column to move. @param pos The new position for the column @a idx. */ static void MoveColumnInOrderArray(wxArrayInt& order, unsigned int idx, unsigned int pos); /** Show the popup menu allowing the user to show or hide the columns. This functions shows the popup menu containing all columns with check marks for the ones which are currently shown and allows the user to check or uncheck them to toggle their visibility. It is called from the default EVT_HEADER_RIGHT_CLICK handler for the controls which have wxHD_ALLOW_HIDE style. And if the column has wxHD_ALLOW_REORDER style as well, the menu also contains an item to customize the columns shown using which results in ShowCustomizeDialog() being called, please see its description for more details. If a column was toggled, UpdateColumnVisibility() virtual function is called so it must be implemented for the controls with wxHD_ALLOW_HIDE style or if you call this function explicitly. @param pt The position of the menu, in the header window coordinates. @param title The title for the menu if not empty. @return @true if a column was shown or hidden or @false if nothing was done, e.g. because the menu was cancelled. */ bool ShowColumnsMenu(const wxPoint& pt, const wxString& title = wxString()); /** Helper function appending the checkable items corresponding to all the columns to the given menu. This function is used by ShowColumnsMenu() but can also be used if you show your own custom columns menu and still want all the columns shown in it. It appends menu items with column labels as their text and consecutive ids starting from @a idColumnsBase to the menu and checks the items corresponding to the currently visible columns. Example of use: @code wxMenu menu; menu.Append(100, "Some custom command"); menu.AppendSeparator(); AddColumnsItems(menu, 200); const int rc = GetPopupMenuSelectionFromUser(menu, pt); if ( rc >= 200 ) ... toggle visibility of the column rc-200 ... @endcode @param menu The menu to append the items to. It may be currently empty or not. @param idColumnsBase The id for the menu item corresponding to the first column, the other ones are consecutive starting from it. It should be positive. */ void AddColumnsItems(wxMenu& menu, int idColumnsBase = 0); /** Show the column customization dialog. This function displays a modal dialog containing the list of all columns which the user can use to reorder them as well as show or hide individual columns. If the user accepts the changes done in the dialog, the virtual methods UpdateColumnVisibility() and UpdateColumnsOrder() will be called so they must be overridden in the derived class if this method is ever called. Please notice that the user will be able to invoke it interactively from the header popup menu if the control has both wxHD_ALLOW_HIDE and wxHD_ALLOW_REORDER styles. @see wxRearrangeDialog */ bool ShowCustomizeDialog(); protected: /** Method to be implemented by the derived classes to return the information for the given column. @param idx The column index, between 0 and the value last passed to SetColumnCount(). */ virtual const wxHeaderColumn& GetColumn(unsigned int idx) const = 0 %Virtual{pure}; /** Method called when the column visibility is changed by the user. This method is called from ShowColumnsMenu() or ShowCustomizeDialog() when the user interactively hides or shows a column. A typical implementation will simply update the internally stored column state. Notice that there is no need to call UpdateColumn() from this method as it is already done by wxHeaderCtrl itself. The base class version doesn't do anything and must be overridden if this method is called. @param idx The index of the column whose visibility was toggled. @param show The new visibility value, @true if the column is now shown or @false if it is not hidden. */ virtual void UpdateColumnVisibility(unsigned int idx, bool show); /** Method called when the columns order is changed in the customization dialog. This method is only called from ShowCustomizeDialog() when the user changes the order of columns. In particular it is @em not called if a single column changes place because the user dragged it to the new location, the EVT_HEADER_END_REORDER event handler should be used to react to this. A typical implementation in a derived class will update the display order of the columns in the associated control, if any. Notice that there is no need to call SetColumnsOrder() from it as wxHeaderCtrl does it itself. The base class version doesn't do anything and must be overridden if this method is called. @param order The new column order. This array uses the same convention as SetColumnsOrder(). */ virtual void UpdateColumnsOrder(const wxArrayInt& order); /** Method which may be implemented by the derived classes to allow double clicking the column separator to resize the column to fit its contents. When a separator is double clicked, the default handler of EVT_HEADER_SEPARATOR_DCLICK event calls this function and refreshes the column if it returns @true so to implement the resizing of the column to fit its width on header double click you need to implement this method using logic similar to this example: @code class MyHeaderColumn : public wxHeaderColumn { public: ... void SetWidth(int width) { m_width = width; } virtual int GetWidth() const { return m_width; } private: int m_width; }; class MyHeaderCtrl : public wxHeaderCtrl { public: protected: virtual wxHeaderColumn& GetColumn(unsigned int idx) const { return m_cols[idx]; } virtual bool UpdateColumnWidthToFit(unsigned int idx, int widthTitle) { int widthContents = ... compute minimal width for column idx ... m_cols[idx].SetWidth(wxMax(widthContents, widthTitle)); return true; } wxVector m_cols; }; @endcode Base class version simply returns @false. @param idx The zero-based index of the column to update. @param widthTitle Contains minimal width needed to display the column header itself and will usually be used as a starting point for the fitting width calculation. @return @true to indicate that the column was resized, i.e. GetColumn() now returns the new width value, and so must be refreshed or @false meaning that the control didn't reach to the separator double click. */ virtual bool UpdateColumnWidthToFit(unsigned int idx, int widthTitle); /** Can be overridden in the derived class to update internal data structures when the number of the columns in the control changes. This method is called by SetColumnCount() before effectively changing the number of columns. The base class version does nothing but it is good practice to still call it from the overridden version in the derived class. */ virtual void OnColumnCountChanging(unsigned int count); }; /** @class wxHeaderCtrlSimple wxHeaderCtrlSimple is a concrete header control which can be used directly, without inheriting from it as you need to do when using wxHeaderCtrl itself. When using it, you need to use simple AppendColumn(), InsertColumn() and DeleteColumn() methods instead of setting the number of columns with SetColumnCount() and returning the information about them from the overridden GetColumn(). @library{wxcore} @category{ctrl} @see wxHeaderCtrl */ %name{Wx::HeaderCtrlSimple} class wxHeaderCtrlSimple : public %name{Wx::HeaderCtrl} wxHeaderCtrl { public: /** Default constructor not creating the underlying window. You must use Create() after creating the object using this constructor. */ wxHeaderCtrlSimple() %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Constructor creating the window. Please see the base class wxHeaderCtrl::Create() method for the parameters description. */ wxHeaderCtrlSimple(wxWindow *parent, wxWindowID winid = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHD_DEFAULT_STYLE, const wxString& name = wxHeaderCtrlNameStr) %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Insert the column at the given position. @param col The column to insert. Notice that because of the existence of implicit conversion from wxString to wxHeaderColumn a string can be passed directly here. @param idx The position of the new column, from 0 to GetColumnCount(). Using GetColumnCount() means to append the column to the end. @see AppendColumn() */ void InsertColumn(const wxHeaderColumnSimple& col, unsigned int idx); /** Append the column to the end of the control. @see InsertColumn() */ void AppendColumn(const wxHeaderColumnSimple& col); /** Delete the column at the given position. @see InsertColumn(), AppendColumn() */ void DeleteColumn(unsigned int idx); /** Show or hide the column. Initially the column is shown by default or hidden if it was added with wxCOL_HIDDEN flag set. When a column is hidden, it doesn't appear at all on the screen but its index is still taken into account when working with other columns. E.g. if there are three columns 0, 1 and 2 and the column 1 is hidden you still need to use index 2 to refer to the last visible column. @param idx The index of the column to show or hide, from 0 to GetColumnCount(). @param show Indicates whether the column should be shown (default) or hidden. */ void ShowColumn(unsigned int idx, bool show = true); /** Hide the column with the given index. This is the same as calling @code ShowColumn(idx, false) @endcode. @param idx The index of the column to show or hide, from 0 to GetColumnCount(). */ void HideColumn(unsigned int idx); /** Update the column sort indicator. The sort indicator, if shown, is typically an arrow pointing upwards or downwards depending on whether the control contents is sorted in ascending or descending order. @param idx The column to set the sort indicator for. If @c -1 is given, then the currently shown sort indicator will be removed. @param sortOrder If @true or @false show the sort indicator corresponding to ascending or descending sort order respectively. */ void ShowSortIndicator(unsigned int idx, bool sortOrder = true); /** Remove the sort indicator from the column being used as sort key. @see ShowSortIndicator */ void RemoveSortIndicator(); protected: /** This function can be overridden in the classes deriving from this control instead of overriding UpdateColumnWidthToFit(). To implement automatic column resizing to fit its contents width when the column divider is double clicked, you need to simply return the fitting width for the given column @a idx from this method, the control will automatically use the biggest value between the one returned from here and the one needed for the display of the column title itself. The base class version returns -1 indicating that this function is not implemented. */ virtual int GetBestFittingWidth(unsigned int idx) const %Virtual; }; /** @class wxHeaderCtrlEvent Event class representing the events generated by wxHeaderCtrl. @library{wxcore} @category{events} @see wxHeaderCtrl */ %name{Wx::HeaderCtrlEvent} class wxHeaderCtrlEvent : public %name{Wx::NotifyEvent} wxNotifyEvent { public: /** Return the index of the column affected by this event. This method can be called for all header control events. */ int GetColumn() const; /** Return the current width of the column. This method can only be called for the dragging events. */ int GetWidth() const; /** Return the new order of the column. This method can only be called for end reorder event for which it indicates the tentative new position for the column GetColumn() selected by the user. If the event is not vetoed, this will become the new column position in wxHeaderCtrl::GetColumnsOrder(). */ unsigned int GetNewOrder() const; }; #endif Wx-0.9923/interface/wx/infobar.h000664000000000000 2317412306612235 14677 0ustar00Mark000000000000%module{Wx}; ///////////////////////////////////////////////////////////////////////////// // Name: wx/infobar.h // Purpose: interface of wxInfoBar // Author: Vadim Zeitlin // RCS-ID: $Id: infobar.h 62302 2009-10-05 22:57:45Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #if WXPERL_W_VERSION_GE( 2, 9, 1 ) #include %loadplugin{build::Wx::XSP::Overload}; %typemap{wxShowEffect}{simple}; /** An info bar is a transient window shown at top or bottom of its parent window to display non-critical information to the user. This class provides another way to show messages to the user, intermediate between message boxes and status bar messages. The message boxes are modal and thus interrupt the users work flow and should be used sparingly for this reason. However status bar messages are often too easy not to notice at all. An info bar provides a way to present the messages which has a much higher chance to be noticed by the user but without being annoying. Info bar may show an icon (on the left), text message and, optionally, buttons allowing the user to react to the information presented. It always has a close button at the right allowing the user to dismiss it so it isn't necessary to provide a button just to close it. wxInfoBar calls its parent wxWindow::Layout() method and assumes that it will change the parent layout appropriately depending on whether the info bar itself is shown or hidden. Usually this is achieved by simply using a sizer for the parent window layout and adding wxInfoBar to this sizer as one of the items. Considering the usual placement of the info bars, normally this sizer should be a vertical wxBoxSizer and the bar its first or last element so the simplest possible example of using this class would be: @code class MyFrame : public wxFrame { ... wxInfoBar *m_infoBar; }; MyFrame::MyFrame() { ... m_infoBar = new wxInfoBar(this); wxSizer *sizer = new wxBoxSizer(wxVERTICAL); sizer->Add(m_infoBar, wxSizerFlags().Expand()); ... add other frame controls to the sizer ... SetSizer(sizer); } void MyFrame::SomeMethod() { m_infoBar->ShowMessage("Something happend", wxICON_INFORMATION); } @endcode See the dialogs sample for more sophisticated examples. Currently this class is implemented generically (i.e. in the same platform-independent way for all ports) and also natively in wxGTK but the native implementation requires a recent -- as of this writing -- GTK+ 2.18 version. @library{wxadv} @category{miscwnd} @see wxStatusBar, wxMessageDialog @since 2.9.1 */ %name{Wx::InfoBar} class wxInfoBar : public %name{Wx::Control} wxControl { public: /** Default constructor. Use Create() for the objects created using this constructor. */ wxInfoBar() %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Constructor creating the info bar window. @see Create() */ wxInfoBar(wxWindow *parent, wxWindowID winid = wxID_ANY) %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Create the info bar window. Notice that unlike most of the other wxWindow-derived classes, wxInfoBar is created hidden and is only shown when ShowMessage() is called. This is more convenient as usually the info bar is created to be shown at some later time and not immediately and so creating it hidden avoids the need to call Hide() explicitly from the code using it. This should be only called if the object was created using its default constructor. @param parent A valid parent window pointer. @param winid The id of the info bar window, usually unused as currently no events are generated by this class. */ bool Create(wxWindow *parent, wxWindowID winid = wxID_ANY); /** Add a button to be shown in the info bar. The button added by this method will be shown to the right of the text (in LTR layout), with each successive button being added to the right of the previous one. If any buttons are added to the info bar using this method, the default "Close" button is not shown as it is assumed that the extra buttons already allow the user to close it. Clicking the button will generate a normal EVT_COMMAND_BUTTON_CLICKED event which can be handled as usual. The default handler in wxInfoBar itself closes the window whenever a button in it is clicked so if you wish the info bar to be hidden when the button is clicked, simply call @c event.Skip() in the button handler to let the base class handler do it (calling Dismiss() explicitly works too, of course). On the other hand, if you don't skip the event, the info bar will remain opened so make sure to do it for at least some buttons to allow the user to close it. Notice that the generic wxInfoBar implementation handles the button events itself and so they are not propagated to the info bar parent and you need to either inherit from wxInfoBar and handle them in your derived class or use wxEvtHandler::Connect(), as is done in the dialogs sample, to handle the button events in the parent frame. @param btnid Id of the button. It will be used in the button message clicking this button will generate. @param label The label of the button. It may only be empty if @a btnid is one of the stock ids in which case the corresponding stock label (see wxGetStockLabel()) will be used. */ void AddButton(wxWindowID btnid, const wxString& label = wxString()); /** Hide the info bar window. This method hides the window and lays out the parent window to account for its disappearance (unlike a simple Hide()). */ void Dismiss(); /** Remove a button previously added by AddButton(). @param btnid Id of the button to remove. If more than one button with the same id is used in the info bar (which is in any case not recommended), the last, i.e. most recently added, button with this id is removed. */ void RemoveButton(wxWindowID btnid); /** Show a message in the bar. If the bar is currently hidden, it will be shown. Otherwise its message will be updated in place. @param msg The text of the message. @param flags One of wxICON_NONE, wxICON_INFORMATION (default), wxICON_QUESTION, wxICON_WARNING or wxICON_ERROR values. These flags have the same meaning as in wxMessageDialog for the generic version, i.e. show (or not, in case of wxICON_NONE) the corresponding icon in the bar but can be interpreted by the native versions. For example, the GTK+ native implementation doesn't show icons at all but uses this parameter to select the appropriate background colour for the notification. */ void ShowMessage(const wxString& msg, int flags = wxICON_NONE); /** @name Generic version customization methods. All these methods exist in the generic version of the class only. The generic version uses wxWindow::ShowWithEffect() function to progressively show it on the platforms which support it (currently only wxMSW). The methods here allow to change the default effect used (or disable it entirely) and change its duration. */ //@{ /** Set the effects to use when showing and hiding the bar. Either or both of the parameters can be set to wxSHOW_EFFECT_NONE to disable using effects entirely. By default, the info bar uses wxSHOW_EFFECT_SLIDE_TO_BOTTOM effect for showing itself and wxSHOW_EFFECT_SLIDE_TO_TOP for hiding if it is the first element of the containing sizer and reverse effects if it's the last one. If it is neither the first nor the last element, no effect is used to avoid the use of an inappropriate one and this function must be called if an effect is desired. @param showEffect The effect to use when showing the bar. @param hideEffect The effect to use when hiding the bar. */ void SetShowHideEffects(wxShowEffect showEffect, wxShowEffect hideEffect); /// Return the effect currently used for showing the bar. wxShowEffect GetShowEffect() const; /// Return the effect currently used for hiding the bar. wxShowEffect GetHideEffect() const; /** Set the duration of the animation used when showing or hiding the bar. By default, 500ms duration is used. @param duration Duration of the animation, in milliseconds. */ void SetEffectDuration(int duration); /// Return the effect animation duration currently used. int GetEffectDuration() const; /** Overridden base class methods changes the font of the text message. wxInfoBar overrides this method to use the font passed to it for its text message part. By default a larger and bold version of the standard font is used. This method is generic-only. */ virtual bool SetFont(const wxFont& font); //@} }; #endif Wx-0.9923/interface/wx/rearrangectrl.h000664000000000000 3217412306612235 16112 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: wx/rearrangectrl.h // Purpose: interface of wxRearrangeList // Author: Vadim Zeitlin // Created: 2008-12-15 // RCS-ID: $Id$ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// %module{Wx}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) #include /** @class wxRearrangeList A listbox-like control allowing the user to rearrange the items and to enable or disable them. This class allows to change the order of the items shown in it as well as to check or uncheck them individually. The data structure used to allow this is the order array which contains the items indices indexed by their position with an added twist that the unchecked items are represented by the bitwise complement of the corresponding index (for any architecture using two's complement for negative numbers representation (i.e. just about any at all) this means that a checked item N is represented by -N-1 in unchecked state). In practice this means that you must apply the C bitwise complement operator when constructing the order array, e.g. @code wxArrayInt order; order.push_back(0); // checked item #0 order.push_back(~1); // unchecked item #1 @endcode So, for example, the array order [1 -3 0] used in conjunction with the items array ["first", "second", "third"] means that the items order is "second", "third", "first" and the "third" item is unchecked while the other two are checked. This convention is used both for the order argument of the control ctor or Create() and for the array returned from GetCurrentOrder(). Usually this control will be used together with other controls allowing to move the items around in it interactively. The simplest possible solution is to use wxRearrangeCtrl which combines it with two standard buttons to move the current item up or down. @since 2.9.0 @library{wxcore} @category{ctrl} */ %loadplugin{build::Wx::XSP::Overload}; %name{Wx::RearrangeList} class wxRearrangeList : public %name{Wx::CheckListBox} wxCheckListBox { public: /** Default constructor. Create() must be called later to effectively create the control. */ %name{newDefault} wxRearrangeList() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Constructor really creating the control. Please see Create() for the parameters description. */ %name{newFull} wxRearrangeList(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayInt& order, const wxArrayString& strings, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxRearrangeListNameStr) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Effectively creates the window for an object created using the default constructor. This function is very similar to wxCheckListBox::Create() except that it has an additional parameter specifying the initial order of the items. Please see the class documentation for the explanation of the conventions used by the @a order argument. @param parent The parent window, must be non-@NULL. @param id The window identifier. @param pos The initial window position. @param size The initial window size. @param order Array specifying the initial order of the items in @a items array. @param items The items to display in the list. @param style The control style, there are no special styles for this class but the base class styles can be used here. @param validator Optional window validator. @param name Optional window name. */ bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayInt& order, const wxArrayString& strings, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxRearrangeListNameStr); /** Return the current order of the items. The order may be different from the one passed to the constructor if MoveCurrentUp() or MoveCurrentDown() were called. */ const wxArrayInt& GetCurrentOrder() const; /** Return @true if the currently selected item can be moved up. This function is useful for EVT_UPDATE_UI handler for the standard "Up" button often used together with this control and wxRearrangeCtrl uses it in this way. @return @true if the currently selected item can be moved up in the listbox, @false if there is no selection or the current item is the first one. @see CanMoveCurrentDown() */ bool CanMoveCurrentUp() const; /** Return @true if the currently selected item can be moved down. @see CanMoveCurrentUp() */ bool CanMoveCurrentDown() const; /** Move the currently selected item one position above. This method is useful to implement the standard "Up" button behaviour and wxRearrangeCtrl uses it for this. @return @true if the item was moved or @false if this couldn't be done. @see MoveCurrentDown() */ bool MoveCurrentUp(); /** Move the currently selected item one position below. @see MoveCurrentUp() */ bool MoveCurrentDown(); }; /** @class wxRearrangeCtrl A composite control containing a wxRearrangeList and the buttons allowing to move the items in it. This control is in fact a panel containing the wxRearrangeList control and the "Up" and "Down" buttons to move the currently selected item up or down. It is used as the main part of a wxRearrangeDialog. @since 2.9.0 @library{wxcore} @category{ctrl} */ %name{Wx::RearrangeCtrl} class wxRearrangeCtrl : public %name{Wx::Panel} wxPanel { public: /** Default constructor. Create() must be called later to effectively create the control. */ %name{newDefault} wxRearrangeCtrl() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Constructor really creating the control. Please see Create() for the parameters description. */ %name{newFull} wxRearrangeCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayInt& order, const wxArrayString& strings, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxRearrangeListNameStr) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; /** Effectively creates the window for an object created using the default constructor. The parameters of this method are the same as for wxRearrangeList::Create(). */ bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayInt& order, const wxArrayString& strings, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxRearrangeListNameStr); /** Return the listbox which is the main part of this control. */ wxRearrangeList *GetList() const; }; /** @class wxRearrangeDialog A dialog allowing the user to rearrange the specified items. This dialog can be used to allow the user to modify the order of the items and to enable or disable them individually. For example: @code wxArrayString items; items.push_back("meat"); items.push_back("fish"); items.push_back("fruits"); items.push_back("beer"); wxArrayInt order; order.push_back(3); order.push_back(0); order.push_back(1); order.push_back(2); wxRearrangeDialog dlg(NULL, "You can also uncheck the items you don't like " "at all.", "Sort the items in order of preference", order, items); if ( dlg.ShowModal() == wxID_OK ) { order = dlg.GetOrder(); for ( size_t n = 0; n < order.size(); n++ ) { if ( order[n] >= 0 ) { wxLogMessage("Your most preferred item is \"%s\"", items[order[n]]); break; } } } @endcode @since 2.9.0 @library{wxcore} @category{cmndlg} */ %name{Wx::RearrangeDialog} class wxRearrangeDialog : public %name{Wx::Dialog} wxDialog { public: /** Default constructor. Create() must be called later to effectively create the control. */ %name{newDefault} wxRearrangeDialog() %Overload; /** Constructor creating the dialog. Please see Create() for the parameters description. */ %name{newFull} wxRearrangeDialog(wxWindow *parent, const wxString& message, const wxString& title, const wxArrayInt& order, const wxArrayString& strings, const wxPoint& pos = wxDefaultPosition, const wxString& name = wxRearrangeDialogNameStr) %Overload; /** Effectively creates the dialog for an object created using the default constructor. @param parent The dialog parent, possibly @NULL. @param message The message shown inside the dialog itself, above the items list. @param title The title of the dialog. @param order The initial order of the items in the convention used by wxRearrangeList. @param items The items to show in the dialog. @param pos Optional dialog position. @param name Optional dialog name. @return @true if the dialog was successfully created or @false if creation failed. */ bool Create(wxWindow *parent, const wxString& message, const wxString& title, const wxArrayInt& order, const wxArrayString& strings, const wxPoint& pos = wxDefaultPosition, const wxString& name = wxRearrangeDialogNameStr); /** Customize the dialog by adding extra controls to it. This function adds the given @a win to the dialog, putting it just below the part occupied by wxRearrangeCtrl. It must be called after creating the dialog and you will typically need to process the events generated by the extra controls for them to do something useful. For example: @code class MyRearrangeDialog : public wxRearrangeDialog { public: MyRearrangeDialog(wxWindow *parent, ...) : wxRearrangeDialog(parent, ...) { wxPanel *panel = new wxPanel(this); wxSizer *sizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add(new wxStaticText(panel, wxID_ANY, "Column width in pixels:")); sizer->Add(new wxTextCtrl(panel, wxID_ANY, "")); panel->SetSizer(sizer); AddExtraControls(panel); } ... code to update the text control with the currently selected item width and to react to its changes omitted ... }; @endcode See also the complete example of a custom rearrange dialog in the dialogs sample. @param win The window containing the extra controls. It must have this dialog as its parent. */ void AddExtraControls(wxWindow *win); /** Return the list control used by the dialog. @see wxRearrangeCtrl::GetList() */ wxRearrangeList *GetList() const; /** Return the array describing the order of items after it was modified by the user. Please notice that the array will contain negative items if any items were unchecked. See wxRearrangeList for more information about the convention used for this array. */ wxArrayInt GetOrder() const; }; #endif Wx-0.9923/interface/wx/richtooltip.h000664000000000000 2014212306612235 15607 0ustar00Mark000000000000%module{Wx}; /////////////////////////////////////////////////////////////////////////////// // Name: interface/wx/richtooltip.h // Purpose: wxRichToolTip class documentation // Author: Vadim Zeitlin // Created: 2011-10-18 // RCS-ID: $Id$ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// /** Support tip kinds for wxRichToolTip. This enum describes the kind of the tip shown which combines both the tip position and appearance because the two are related (when the tip is positioned asymmetrically, a right handed triangle is used but an equilateral one when it's in the middle of a side). Automatic selects the tip appearance best suited for the current platform and the position best suited for the window the tooltip is shown for, i.e. chosen in such a way that the tooltip is always fully on screen. Other values describe the position of the tooltip itself, not the window it relates to. E.g. wxTipKind_Top places the tip on the top of the tooltip and so the tooltip itself is located beneath its associated window. */ #if WXPERL_W_VERSION_GE( 2, 9, 3 ) #include %loadplugin{build::Wx::XSP::Enum}; %loadplugin{build::Wx::XSP::Overload}; %typemap{wxTipKind}{simple}; %typemap{wxRichToolTip*}{simple}; enum wxTipKind { /// Don't show any tip, the tooltip will be (roughly) rectangular. wxTipKind_None, /// Show a right triangle tip in the top left corner of the tooltip. wxTipKind_TopLeft, /// Show an equilateral triangle tip in the middle of the tooltip top side. wxTipKind_Top, /// Show a right triangle tip in the top right corner of the tooltip. wxTipKind_TopRight, /// Show a right triangle tip in the bottom left corner of the tooltip. wxTipKind_BottomLeft, /// Show an equilateral triangle tip in the middle of the tooltip bottom side. wxTipKind_Bottom, /// Show a right triangle tip in the bottom right corner of the tooltip. wxTipKind_BottomRight, /** Choose the appropriate tip shape and position automatically. This is the default and shouldn't normally need to be changed. Notice that currently wxTipKind_Top or wxTipKind_Bottom are used under Mac while one of the other four values is selected for the other platforms. */ wxTipKind_Auto }; /** Allows to show a tool tip with more customizations than wxToolTip. Using this class is very simple, to give a standard warning for a password text control if the password was entered correctly you could simply do: @code wxTextCtrl* password = new wxTextCtrl(..., wxTE_PASSWORD); ... wxRichToolTip tip("Caps Lock is on", "You might have made an error in your password\n" "entry because Caps Lock is turned on.\n" "\n" "Press Caps Lock key to turn it off."); tip.SetIcon(wxICON_WARNING); tip.ShowFor(password); @endcode Currently this class has generic implementation that can be used with any window and implements all the functionality but doesn't exactly match the appearance of the native tooltips (even though it makes some efforts to use the style most appropriate for the current platform) and a native MSW version which can be only used with text controls and doesn't provide as much in the way of customization. Because of this, it's inadvisable to customize the tooltips unnecessarily as doing this turns off auto-detection of the native style in the generic version and may prevent the native MSW version from being used at all. Notice that this class is not derived from wxWindow and hence doesn't represent a window, even if its ShowFor() method does create one internally to show the tooltip. The images below show some examples of rich tooltips on different platforms, with various customizations applied. @library{wxadv} @category{miscwnd} @appearance{richtooltip.png} @since 2.9.3 */ %name{Wx::RichToolTip} class wxRichToolTip { %{ static void wxRichToolTip::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: /** Constructor must specify the tooltip title and main message. The main message can contain embedded new lines. Both the title and message must be non-empty. Additional attributes can be set later. */ wxRichToolTip(const wxString& title, const wxString& message); /** Set the background colour. If two colours are specified, the background is drawn using a gradient from top to bottom, otherwise a single solid colour is used. By default the colour or colours most appropriate for the current platform are used. If a colour is explicitly set, native MSW version won't be used as it doesn't support setting the colour. */ void SetBackgroundColour(const wxColour& col, const wxColour& colEnd = wxNullColourPtr ); /** Set the small icon to show. The icon can be either one of the standard information/warning/error ones, i.e. wxICON_INFORMATION, wxICON_WARNING or wxICON_ERROR respectively (the question icon doesn't make sense for a tooltip so wxICON_QUESTION can't be used here) or a custom icon. The latter is unsupported by the native MSW implementation of this class so the use of a standard icon is preferred. */ //@{ %name{SetIconId} void SetIcon(int icon = wxICON_INFORMATION) %Overload; %name{SetIconIcon} void SetIcon(const wxIcon& icon) %Overload; //@} /** Set timeout after which the tooltip should disappear, in milliseconds. By default the tooltip is hidden after system-dependent interval of time elapses but this method can be used to change this or also disable hiding the tooltip automatically entirely by passing 0 in this parameter (but doing this will prevent the native MSW version from being used). Notice that the tooltip will always be hidden if the user presses a key or clicks a mouse button. */ void SetTimeout(unsigned milliseconds); /** Choose the tip kind, possibly none. See wxTipKind documentation for the possible choices here. By default the tip is positioned automatically, as if wxTipKind_Auto was used. Native MSW implementation doesn't support setting the tip kind explicitly and won't be used if this method is called with any value other than wxTipKind_Auto. Notice that using non automatic tooltip kind may result in the tooltip being positioned partially off screen and it's the callers responsibility to ensure that this doesn't happen in this case. */ void SetTipKind(wxTipKind tipKind); /** Set the title text font. By default it's emphasized using the font style or colour appropriate for the current platform. Calling this method prevents the native MSW implementation from being used as it doesn't support changing the font. */ /* void SetTitleFont(const wxFont& font); ## not present */ /** Show the tooltip for the given window. The tooltip tip points to the (middle of the) specified window which must be non-@NULL. Currently the native MSW implementation is used only if @a win is a wxTextCtrl. This limitation may be removed in the future. */ void ShowFor(wxWindow* win); /** Destructor. Notice that destroying this object does not hide the tooltip if it's currently shown, it will be hidden and destroyed when the user dismisses it or the timeout expires. The destructor is non-virtual as this class is not supposed to be derived from. */ ~wxRichToolTip() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::RichToolTip", THIS, ST(0) ); delete THIS; %}; }; #endif Wx-0.9923/interface/wx/treelist.h000664000000000000 2066112306612235 15110 0ustar00Mark000000000000%module{Wx}; /////////////////////////////////////////////////////////////////////////////// // Name: interface/wx/treelist.h // Purpose: wxTreeListCtrl class documentation // Author: Vadim Zeitlin // Created: 2011-08-17 // SVN-ID: $Id$ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #if WXPERL_W_VERSION_GE( 2, 9, 3 ) #include %typemap{wxTreeListItem}{reference}; %typemap{wxTreeListCtrl*}{simple}; %typemap{wxCheckBoxState}{simple}; %typemap{wxAlignment}{simple}; %typemap{wxClientData*}{parsed}{%wxPliUserDataCD*%}; %loadplugin{build::Wx::XSP::Overload}; %loadplugin{build::Wx::XSP::Virtual}; %loadplugin{build::Wx::XSP::Enum}; %loadplugin{build::Wx::XSP::Event}; %VirtualTypeMap{ %Name{%wxTreeListCtrl*%}; %ConvertReturn{%(wxTreeListCtrl*)wxPli_sv_2_object( aTHX_ ret, "Wx::TreeListCtrl" )%}; %TypeChar{%O%}; %Arguments{%%s%}; }; %VirtualTypeMap{ %Name{%wxTreeListItem%}; %ConvertReturn{%*(wxTreeListItem*)wxPli_sv_2_object( aTHX_ ret, "Wx::TreeListItem" )%}; %TypeChar{%o%}; %Arguments{%&%s, "Wx::TreeListItem"%}; }; %name{Wx::TreeListItem} class wxTreeListItem { public: %{ static void wxTreeListItem::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} /* wxTreeListItem(); no constructor = no objects are deleteable */ ~wxTreeListItem() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::TreeListItem", THIS, ST(0) ); %}; bool IsOk() const; }; %name{Wx::TreeListItemComparator} class wxTreeListItemComparator { public: wxTreeListItemComparator(); virtual int Compare(wxTreeListCtrl* treelist, unsigned column, wxTreeListItem first, wxTreeListItem second) = 0 %Virtual{pure}; }; enum { wxTL_SINGLE = 0x0000, // This is the default anyhow. wxTL_MULTIPLE = 0x0001, // Allow multiple selection. wxTL_CHECKBOX = 0x0002, // Show checkboxes in the first column. wxTL_3STATE = 0x0004, // Allow 3rd state in checkboxes. wxTL_USER_3STATE = 0x0008, // Allow user to set 3rd state. wxTL_STYLE_MASK = 0x000F, wxTL_DEFAULT_STYLE = wxTL_SINGLE }; %Event{%EVT_TREELIST_SELECTION_CHANGED(id, func)%} {wxEVT_COMMAND_TREELIST_SELECTION_CHANGED}; %Event{%EVT_TREELIST_ITEM_EXPANDING(id, func)%} {wxEVT_COMMAND_TREELIST_ITEM_EXPANDING}; %Event{%EVT_TREELIST_ITEM_EXPANDED(id, func)%} {wxEVT_COMMAND_TREELIST_ITEM_EXPANDED}; %Event{%EVT_TREELIST_ITEM_CHECKED(id, func)%} {wxEVT_COMMAND_TREELIST_ITEM_CHECKED}; %Event{%EVT_TREELIST_ITEM_ACTIVATED(id, func)%} {wxEVT_COMMAND_TREELIST_ITEM_ACTIVATED}; %Event{%EVT_TREELIST_ITEM_CONTEXT_MENU(id, func)%} {wxEVT_COMMAND_TREELIST_ITEM_CONTEXT_MENU}; %Event{%EVT_TREELIST_COLUMN_SORTED(id, func)%} {wxEVT_COMMAND_TREELIST_COLUMN_SORTED}; %name{Wx::TreeListCtrl} class wxTreeListCtrl : public %name{Wx::Window} wxWindow { public: %name{newDefault} wxTreeListCtrl() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxTreeListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTL_DEFAULT_STYLE, const wxString& name = wxTreeListCtrlNameStr) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTL_DEFAULT_STYLE, const wxString& name = wxTreeListCtrlNameStr); %{ void wxTreeListCtrl::AssignImageList( imagelist ) wxImageList* imagelist CODE: wxPli_object_set_deleteable( aTHX_ ST(1), false ); THIS->AssignImageList( imagelist ); wxImageList* wxTreeListCtrl::GetImageList() OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); %} void SetImageList(wxImageList* imageList); int AppendColumn(const wxString& title, int width = wxCOL_WIDTH_AUTOSIZE, wxAlignment align = wxALIGN_LEFT, int flags = wxCOL_RESIZABLE); unsigned GetColumnCount() const; bool DeleteColumn(unsigned col); void ClearColumns(); void SetColumnWidth(unsigned col, int width); int GetColumnWidth(unsigned col) const; int WidthFor(const wxString& text) const; wxTreeListItem AppendItem(wxTreeListItem parent, const wxString& text, int imageClosed = -1, int imageOpened = -1, wxPliUserDataCD *data = NULL); wxTreeListItem InsertItem(wxTreeListItem parent, wxTreeListItem previous, const wxString& text, int imageClosed = -1, int imageOpened = -1, wxPliUserDataCD *data = NULL); wxTreeListItem PrependItem(wxTreeListItem parent, const wxString& text, int imageClosed = -1, int imageOpened = -1, wxPliUserDataCD *data = NULL); void DeleteItem(wxTreeListItem item); void DeleteAllItems(); wxTreeListItem GetRootItem() const; wxTreeListItem GetItemParent(wxTreeListItem item) const; wxTreeListItem GetFirstChild(wxTreeListItem item) const; wxTreeListItem GetNextSibling(wxTreeListItem item) const; wxTreeListItem GetFirstItem() const; wxTreeListItem GetNextItem(wxTreeListItem item) const; const wxString& GetItemText(wxTreeListItem item, unsigned col = 0) const; void SetItemText(wxTreeListItem item, unsigned col, const wxString& text); void SetItemText(wxTreeListItem item, const wxString& text); void SetItemImage(wxTreeListItem item, int closed, int opened = -1); wxPliUserDataCD *GetItemData( wxTreeListItem item ) const %code{% RETVAL = (wxPliUserDataCD*) THIS->GetItemData( *item ); %}; void SetItemData(wxTreeListItem item, wxPliUserDataCD *data); void Expand(wxTreeListItem item); void Collapse(wxTreeListItem item); bool IsExpanded(wxTreeListItem item) const; wxTreeListItem GetSelection() const; %{ void wxTreeListCtrl::GetSelections() PREINIT: wxTreeListItems selections; PPCODE: size_t num = THIS->GetSelections( selections ); EXTEND( SP, (IV)num ); for( size_t i = 0; i < num; ++i ) { PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTreeListItem( selections[i] ), "Wx::TreeListItem" ) ); } %} void Select(wxTreeListItem item); void Unselect(wxTreeListItem item); bool IsSelected(wxTreeListItem item) const; void SelectAll(); void UnselectAll(); void CheckItem(wxTreeListItem item, wxCheckBoxState state = wxCHK_CHECKED); void CheckItemRecursively(wxTreeListItem item, wxCheckBoxState state = wxCHK_CHECKED); void UncheckItem(wxTreeListItem item); void UpdateItemParentStateRecursively(wxTreeListItem item); wxCheckBoxState GetCheckedState(wxTreeListItem item) const; bool AreAllChildrenInState(wxTreeListItem item, wxCheckBoxState state) const; void SetSortColumn(unsigned col, bool ascendingOrder = true); %{ void wxTreeListCtrl::GetSortColumn() PREINIT: unsigned col; bool ascendingOrder; bool issorted; PPCODE: issorted = THIS->GetSortColumn( &col, &ascendingOrder ); EXTEND( SP, 2 ); if( issorted ) { PUSHs( sv_2mortal( newSVuv( col ) ) ); PUSHs( sv_2mortal( newSViv( ascendingOrder ) ) ); } else { PUSHs( sv_newmortal() ); PUSHs( sv_newmortal() ); } %} void SetItemComparator(wxTreeListItemComparator* comparator); wxWindow* GetView() const; }; %name{Wx::TreeListEvent} class wxTreeListEvent : public %name{Wx::NotifyEvent} wxNotifyEvent { public: wxTreeListItem GetItem() const; wxCheckBoxState GetOldCheckedState() const; unsigned GetColumn() const; }; #endif Wx-0.9923/interface/wx/uiaction.h000664000000000000 274512306612235 15053 0ustar00Mark000000000000%module{Wx}; ///////////////////////////////////////////////////////////////////////////// // Name: uiaction.h // Purpose: interface of wxUIActionSimulator // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if WXPERL_W_VERSION_GE( 2, 9, 2 ) #include %loadplugin{build::Wx::XSP::Overload}; %name{Wx::UIActionSimulator} class wxUIActionSimulator { %{ static void wxUIActionSimulator::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: wxUIActionSimulator(); ~wxUIActionSimulator() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::UIActionSimulator", THIS, ST(0) ); delete THIS; %}; %name{MouseMoveCoords} bool MouseMove(long x, long y) %Overload; %name{MouseMovePoint} bool MouseMove(const wxPoint& point) %Overload; bool MouseDown(int button = wxMOUSE_BTN_LEFT); bool MouseUp(int button = wxMOUSE_BTN_LEFT); bool MouseClick(int button = wxMOUSE_BTN_LEFT); bool MouseDblClick(int button = wxMOUSE_BTN_LEFT); bool MouseDragDrop(long x1, long y1, long x2, long y2, int button = wxMOUSE_BTN_LEFT); bool KeyDown(int keycode, int modifiers = wxMOD_NONE); bool KeyUp(int keycode, int modifiers = wxMOD_NONE); bool Char(int keycode, int modifiers = wxMOD_NONE); bool Text(const wxString& text); }; #endif Wx-0.9923/lib/000775000000000000 012316265010 11143 5ustar00Mark000000000000Wx-0.9923/lib/Wx/000775000000000000 012316265011 11542 5ustar00Mark000000000000Wx-0.9923/lib/Wx/Api.pod000664000000000000 702312306612266 13050 0ustar00Mark000000000000=head1 NAME API - wxPerl extension API documentation =head1 DESCRIPTION =head2 WXPL_API_VERSION An integer value used to differentiate wxPerl versions, it is guaranteed to be non-decreasing. wxPerl 0.15 value is 0150; wxPerl 1.00 value will be 1000, wxPerl 2.12 value will be 2120. I =head2 wxPli_create_evthandler SV* wxPli_create_evthandler( pTHX_ wxEvtHandler* object, const char* classname ); Creates a new hash reference, blessed into C, and bindsC to it. I =head2 wxPli_evthandler_2_sv SV* wxPli_evthandler_2_sv( pTHX_ SV* var, wxEvtHandler* evth ); Same as L, but works with C-derived classes, which includes all C-derived classes. I =head2 wxPli_get_class const char* wxPli_get_class( pTHX_ SV* ref ); The C++ equivalent of C<$class = ref( $obj ) || $obj>; the pointer returned by the function is potentially temporary. =head2 wxPli_non_object_2_sv SV* wxPli_non_object_2_sv( pTHX_ SV* var, void* data, const char* package ); Binds a generic pointer to an C, and returns it; the new binding is blessed into the given C. I =head2 wxPli_object_2_sv SV* wxPli_object_2_sv( pTHX_ SV* var, wxObject* object ); Binds a C pointer to an C, and returns it. If the object is already bound to an C, returns a reference to the existing C, otherwise, it creates a new binding; in the latter case, the new C is blessed into a package obtained through the wxWidgets RTTI system. I =head2 wxPli_push_arguments void wxPli_push_arguments( pTHX_ SV*** stack, const char* argtypes, ... ); // example wxPli_push_arguments( aTHX_ SP, "iP", 12, "foo" ); Pushes a variable number of arguments on the perl stack, it is useful for passing parameters to a Perl function. The C string describes the types of subsequent arguments, each character of the string specifying the type of a single argument. Possible values are: =over 4 =item b a C value =item i an C value =item l a C value =item L an C value =item d a C value =item p a C value =item w a C value =item P a C value =item S a C, a B of the SV is pushed on the stack =item s a C, the pointer itself is pushed on the stack =item O a C, the function will internally call C and push the result on the stack. =item o this is the only type that uses 2 parameters: the first is a C, the second a C; the function will internally call C and push the result on the stack. =back I =head2 wxPli_sv_2_object void* wxPli_sv_2_object( pTHX_ SV* scalar, const char* classname ); Extracts a bound pointer from a perl reference, checking that the reference belongs to the correct class (die()s on failure), and returns it. If C is C, the check is not done. I =head2 wxPli_wxChar_2_sv SV* wxPli_wxChar_2_sv( pTHX_ const wxChar* str, SV* out ); Stores a string into a C, and returns the C. I =head2 wxPli_wxString_2_sv SV* wxPli_wxString_2_sv( pTHX_ const wxString& str, SV* out ); Stores a string into a C, and returns the C. I =head1 AUTHOR Mattia Barbon =cut Wx-0.9923/lib/Wx/App.pm000664000000000000 252112306612266 12707 0ustar00Mark000000000000############################################################################# ## Name: lib/Wx/App.pm ## Purpose: Wx::App class ## Author: Mattia Barbon ## Modified by: ## Created: 25/11/2000 ## RCS-ID: $Id: App.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2003, 2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::App; @ISA = qw(Wx::_App); use strict; # this allows multiple ->new calls and it is an horrible kludge to allow # Wx::Perl::SplashFast to work "better"; see also App.xs:Start sub new { my $this; my $class = ref( $_[0] ) || $_[0]; if( ref( $Wx::wxTheApp ) ) { bless $Wx::wxTheApp, $class; $this = $Wx::wxTheApp; } else { $this = $_[0]->SUPER::new(); bless $this, $class; $Wx::wxTheApp = $this; } $this->SetAppName( $_[0] ); # reasonable default for Wx::ConfigBase::Get my $ret = Wx::_App::Start( $this, $_[1] || $this->can( 'OnInit' ) ); Wx::_croak( 'OnInit must return a true return value' ) unless $ret; $this; } sub OnInit { 0 } package Wx::SimpleApp; @Wx::SimpleApp::ISA = qw(Wx::App); sub OnInit { 1 } 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/lib/Wx/ArtProvider.pm000664000000000000 432212306612266 14431 0ustar00Mark000000000000############################################################################# ## Name: lib/Wx/ArtProvider.pm ## Purpose: Wx::ArtProvider ## Author: Matthew "Cheetah" Gabeler-Lee ## Modified by: ## Created: 11/01/2005 ## RCS-ID: $Id: ArtProvider.pm 2443 2008-08-13 21:08:46Z mbarbon $ ## Copyright: (c) 2005, 2008 Matthew Gabeler-Lee ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::ArtProvider; use strict; use base 'Exporter'; our %EXPORT_TAGS = ( 'artid' => [qw/wxART_ADD_BOOKMARK wxART_DEL_BOOKMARK wxART_HELP_SIDE_PANEL wxART_HELP_SETTINGS wxART_HELP_BOOK wxART_HELP_FOLDER wxART_HELP_PAGE wxART_GO_BACK wxART_GO_FORWARD wxART_GO_UP wxART_GO_DOWN wxART_GO_TO_PARENT wxART_GO_HOME wxART_FILE_OPEN wxART_PRINT wxART_HELP wxART_TIP wxART_REPORT_VIEW wxART_LIST_VIEW wxART_NEW_DIR wxART_FOLDER wxART_GO_DIR_UP wxART_EXECUTABLE_FILE wxART_NORMAL_FILE wxART_TICK_MARK wxART_CROSS_MARK wxART_ERROR wxART_QUESTION wxART_WARNING wxART_INFORMATION wxART_MISSING_IMAGE wxART_CDROM wxART_COPY wxART_CUT wxART_DELETE wxART_FILE_SAVE wxART_FILE_SAVE_AS wxART_FIND wxART_FIND_AND_REPLACE wxART_FLOPPY wxART_FOLDER_OPEN wxART_HARDDISK wxART_NEW wxART_PASTE wxART_QUIT wxART_REDO wxART_REMOVABLE wxART_UNDO/], 'clientid' => [qw/wxART_TOOLBAR wxART_MENU wxART_FRAME_ICON wxART_CMN_DIALOG wxART_HELP_BROWSER wxART_MESSAGE_BOX wxART_BUTTON wxART_LIST wxART_OTHER/], ); our @EXPORT_OK = (qw(MAKE_CLIENT_ID MAKE_ART_ID), @{$EXPORT_TAGS{artid}}, @{$EXPORT_TAGS{clientid}}); sub MAKE_CLIENT_ID($) { return $_[0] . "_C"; } sub MAKE_ART_ID($) { return $_[0]; } # generate artid and clientid subs based on export tags for my $artid (@{$EXPORT_TAGS{artid}}) { eval "sub $artid { return MAKE_ART_ID(\"$artid\") }"; die "ERROR compiling artid $artid: $@" if $@; } for my $clientid (@{$EXPORT_TAGS{clientid}}) { eval "sub $clientid { return MAKE_CLIENT_ID(\"$clientid\") }"; die "ERROR compiling clientid $clientid: $@" if $@; } no strict; package Wx::PlArtProvider; @ISA = qw(Wx::ArtProvider); 1; Wx-0.9923/lib/Wx/Event.pm000664000000000000 5121312306612266 13272 0ustar00Mark000000000000############################################################################# ## Name: lib/Wx/Event.pm ## Purpose: Wx::*Event classes and EVT_* macros ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Event.pm 2785 2010-02-06 21:31:04Z mdootson $ ## Copyright: (c) 2000-2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::Event; use strict; use vars qw(@ISA @EXPORT_OK); use Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(); # !parser: sub { $_[0] =~ m/sub (EVT_\w+)/ } # !package: Wx::Event # # ActivateEvent # sub EVT_ACTIVATE($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_ACTIVATE, $_[1] ) } sub EVT_ACTIVATE_APP($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_ACTIVATE_APP, $_[1] ) } # # CommandEvent # sub EVT_COMMAND_RANGE($$$$$) { $_[0]->Connect( $_[1], $_[2], $_[3], $_[4] ) } sub EVT_BUTTON($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_BUTTON_CLICKED, $_[2] ) } sub EVT_CHECKBOX($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_CHECKBOX_CLICKED, $_[2] ) } sub EVT_CHOICE($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_CHOICE_SELECTED, $_[2] ) } sub EVT_LISTBOX($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LISTBOX_SELECTED, $_[2] ) } sub EVT_LISTBOX_DCLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, $_[2] ) } sub EVT_TEXT($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TEXT_UPDATED, $_[2] ) } sub EVT_TEXT_ENTER($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TEXT_ENTER, $_[2] ) } sub EVT_TEXT_MAXLEN($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TEXT_MAXLEN, $_[2] ) } sub EVT_TEXT_URL($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TEXT_URL, $_[2] ) } sub EVT_MENU($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_MENU_SELECTED, $_[2] ) } sub EVT_MENU_RANGE($$$$) { $_[0]->Connect( $_[1], $_[2], &Wx::wxEVT_COMMAND_MENU_SELECTED, $_[3] ) } sub EVT_SLIDER($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_SLIDER_UPDATED, $_[2] ) } sub EVT_RADIOBOX($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_RADIOBOX_SELECTED, $_[2] ) } sub EVT_RADIOBUTTON($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_RADIOBUTTON_SELECTED, $_[2] ) } sub EVT_SCROLLBAR($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_SCROLLBAR_UPDATED, $_[2] ) } sub EVT_COMBOBOX($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_COMBOBOX_SELECTED, $_[2] ) } sub EVT_TOOL($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TOOL_CLICKED, $_[2] ) } sub EVT_TOOL_RANGE($$$$) { $_[0]->Connect( $_[1], $_[2], &Wx::wxEVT_COMMAND_TOOL_CLICKED, $_[3] ) } sub EVT_TOOL_RCLICKED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TOOL_RCLICKED, $_[2] ) } sub EVT_TOOL_RCLICKED_RANGE($$$$) { $_[0]->Connect( $_[1], $_[2], &Wx::wxEVT_COMMAND_TOOL_RCLICKED, $_[3] ) } sub EVT_TOOL_ENTER($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TOOL_ENTER, $_[2] ) } sub EVT_COMMAND_LEFT_CLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LEFT_CLICK, $_[2] ) } sub EVT_COMMAND_LEFT_DCLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LEFT_DCLICK, $_[2] ) } sub EVT_COMMAND_RIGHT_CLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_RIGHT_CLICK, $_[2] ) } sub EVT_COMMAND_SET_FOCUS($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_SET_FOCUS, $_[2] ) } sub EVT_COMMAND_KILL_FOCUS($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_KILL_FOCUS, $_[2] ) } sub EVT_COMMAND_ENTER($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_ENTER, $_[2] ) } sub EVT_TOGGLEBUTTON($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, $_[2] ) } sub EVT_CHECKLISTBOX($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, $_[2] ) } sub EVT_TEXT_CUT($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TEXT_CUT, $_[2] ) } sub EVT_TEXT_COPY($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TEXT_COPY, $_[2] ) } sub EVT_TEXT_PASTE($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TEXT_PASTE, $_[2] ) } # # CloseEvent # sub EVT_CLOSE($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_CLOSE_WINDOW, $_[1] ) } sub EVT_END_SESSION($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_END_SESSION, $_[1] ) } sub EVT_QUERY_END_SESSION($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_QUERY_END_SESSION, $_[1] ) } # # DropFilesEvent # sub EVT_DROP_FILES($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_DROP_FILES, $_[1] ) } # # EraseEvent # sub EVT_ERASE_BACKGROUND($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_ERASE_BACKGROUND, $_[1] ) } # # FindDialogEvent # sub EVT_FIND($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_FIND, $_[2] ) } sub EVT_FIND_NEXT($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_FIND_NEXT, $_[2] ) } sub EVT_FIND_REPLACE($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_FIND_REPLACE, $_[2] ) } sub EVT_FIND_REPLACE_ALL($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_FIND_REPLACE_ALL, $_[2] ) } sub EVT_FIND_CLOSE($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_FIND_CLOSE, $_[2] ) } # # FocusEvent # sub EVT_SET_FOCUS($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SET_FOCUS, $_[1] ) } sub EVT_KILL_FOCUS($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_KILL_FOCUS, $_[1] ) } # # KeyEvent # sub EVT_CHAR($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_CHAR, $_[1] ) } sub EVT_CHAR_HOOK($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_CHAR_HOOK, $_[1] ) } sub EVT_KEY_DOWN($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_KEY_DOWN, $_[1] ) } sub EVT_KEY_UP($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_KEY_UP, $_[1] ) } # # HelpEvent # sub EVT_HELP($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_HELP, $_[2] ) } sub EVT_HELP_RANGE($$$$) { $_[0]->Connect( $_[1], $_[2], &Wx::wxEVT_HELP, $_[3] ) } sub EVT_DETAILED_HELP($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_DETAILED_HELP, $_[2] ) } sub EVT_DETAILED_HELP_RANGE($$$$) { $_[0]->Connect( $_[1], $_[2], &Wx::wxEVT_DETAILED_HELP, $_[3] ) } # # IdleEvent # sub EVT_IDLE($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_IDLE, $_[1] ) } # # InitDialogEvent # sub EVT_INIT_DIALOG($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_INIT_DIALOG, $_[1] ) } # # JoystickEvent # sub EVT_JOY_BUTTON_DOWN($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_JOY_BUTTON_DOWN, $_[1] ) } sub EVT_JOY_BUTTON_UP($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_JOY_BUTTON_UP, $_[1] ) } sub EVT_JOY_MOVE($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_JOY_MOVE, $_[1] ) } sub EVT_JOY_ZMOVE($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_JOY_ZMOVE, $_[1] ) } # # ListbookEvent # sub EVT_LISTBOOK_PAGE_CHANGING($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, $_[2] ) } sub EVT_LISTBOOK_PAGE_CHANGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, $_[2] ) } # # ChoicebookEvent # sub EVT_CHOICEBOOK_PAGE_CHANGING($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, $_[2] ) } sub EVT_CHOICEBOOK_PAGE_CHANGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, $_[2] ) } # # ToolbookEvent # sub EVT_TOOLBOOK_PAGE_CHANGING($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING, $_[2] ) } sub EVT_TOOLBOOK_PAGE_CHANGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED, $_[2] ) } # # TreebookEvent # sub EVT_TREEBOOK_PAGE_CHANGING($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING, $_[2] ) } sub EVT_TREEBOOK_PAGE_CHANGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED, $_[2] ) } sub EVT_TREEBOOK_NODE_COLLAPSED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED, $_[2] ) } sub EVT_TREEBOOK_NODE_EXPANDED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED, $_[2] ) } # # ListEvent # sub EVT_LIST_BEGIN_DRAG($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_BEGIN_DRAG, $_[2] ) } sub EVT_LIST_BEGIN_RDRAG($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_BEGIN_RDRAG, $_[2] ) } sub EVT_LIST_BEGIN_LABEL_EDIT($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, $_[2] ) } sub EVT_LIST_CACHE_HINT($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_CACHE_HINT, $_[2] ) } sub EVT_LIST_END_LABEL_EDIT($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_END_LABEL_EDIT, $_[2] ) } sub EVT_LIST_DELETE_ITEM($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_DELETE_ITEM, $_[2] ) } sub EVT_LIST_DELETE_ALL_ITEMS($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, $_[2] ) } sub EVT_LIST_GET_INFO($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_GET_INFO, $_[2] ) } sub EVT_LIST_SET_INFO($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_SET_INFO, $_[2] ) } sub EVT_LIST_ITEM_SELECTED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_ITEM_SELECTED, $_[2] ) } sub EVT_LIST_ITEM_DESELECTED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_ITEM_DESELECTED, $_[2] ) } sub EVT_LIST_KEY_DOWN($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_KEY_DOWN, $_[2] ) } sub EVT_LIST_INSERT_ITEM($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_INSERT_ITEM, $_[2] ) } sub EVT_LIST_COL_CLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_COL_CLICK, $_[2] ) } sub EVT_LIST_RIGHT_CLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_RIGHT_CLICK, $_[2] ) } sub EVT_LIST_MIDDLE_CLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_MIDDLE_CLICK, $_[2] ) } sub EVT_LIST_ITEM_ACTIVATED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_ITEM_ACTIVATED, $_[2] ) } sub EVT_LIST_COL_RIGHT_CLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_COL_RIGHT_CLICK, $_[2] ) } sub EVT_LIST_COL_BEGIN_DRAG($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, $_[2] ) } sub EVT_LIST_COL_DRAGGING($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_COL_DRAGGING, $_[2] ) } sub EVT_LIST_COL_END_DRAG($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_COL_END_DRAG, $_[2] ) } sub EVT_LIST_ITEM_FOCUSED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_ITEM_FOCUSED, $_[2] ) } sub EVT_LIST_ITEM_RIGHT_CLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, $_[2] ) } # # MenuEvent # sub EVT_MENU_CHAR($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_MENU_CHAR, $_[1] ) } sub EVT_MENU_INIT($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_MENU_INIT, $_[1] ) } sub EVT_MENU_HIGHLIGHT($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_MENU_HIGHLIGHT, $_[2] ) } sub EVT_POPUP_MENU($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_POPUP_MENU, $_[1] ) } sub EVT_CONTEXT_MENU($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_CONTEXT_MENU, $_[1] ) } sub EVT_MENU_OPEN($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_MENU_OPEN, $_[1] ) } sub EVT_MENU_CLOSE($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_MENU_CLOSE, $_[1] ) } # # MouseEvent # sub EVT_MOTION($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_MOTION, $_[1] ) } sub EVT_ENTER_WINDOW($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_ENTER_WINDOW, $_[1] ) } sub EVT_LEAVE_WINDOW($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_LEAVE_WINDOW, $_[1] ) } sub EVT_MOUSEWHEEL($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_MOUSEWHEEL, $_[1] ) } sub EVT_MOUSE_EVENTS($$) { my( $x, $y ) = @_; EVT_LEFT_DOWN( $x, $y ); EVT_LEFT_UP( $x, $y ); EVT_LEFT_DCLICK( $x, $y ); EVT_MIDDLE_DOWN( $x, $y ); EVT_MIDDLE_UP( $x, $y ); EVT_MIDDLE_DCLICK( $x, $y ); EVT_RIGHT_DOWN( $x, $y ); EVT_RIGHT_UP( $x, $y ); EVT_RIGHT_DCLICK( $x, $y ); EVT_AUX1_DOWN( $x, $y ); EVT_AUX1_UP( $x, $y ); EVT_AUX1_DCLICK( $x, $y ); EVT_AUX2_DOWN( $x, $y ); EVT_AUX2_UP( $x, $y ); EVT_AUX2_DCLICK( $x, $y ); EVT_MOTION( $x, $y ); EVT_ENTER_WINDOW( $x, $y ); EVT_LEAVE_WINDOW( $x, $y ); EVT_MOUSEWHEEL( $x, $y ); } # # MoveEvent # sub EVT_MOVE($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_MOVE, $_[1] ) } sub EVT_MOVING($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_MOVING, $_[1] ) } # # NotebookEvent # sub EVT_NOTEBOOK_PAGE_CHANGING($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, $_[2] ) } sub EVT_NOTEBOOK_PAGE_CHANGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, $_[2] ) } # # PaintEvent # sub EVT_PAINT($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_PAINT, $_[1] ) } # # ProcessEvent # sub EVT_END_PROCESS($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_END_PROCESS, $_[2] ) } # # SashEvent # sub EVT_SASH_DRAGGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_SASH_DRAGGED, $_[2] ) } sub EVT_SASH_DRAGGED_RANGE($$$$) { $_[0]->Connect( $_[1], $_[2], &Wx::wxEVT_SASH_DRAGGED, $_[3] ) } # # SizeEvent # sub EVT_SIZE($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SIZE, $_[1] ) } sub EVT_SIZING($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SIZING, $_[1] ) } # # ScrollEvent # sub EVT_SCROLL_TOP($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLL_TOP, $_[1] ) } sub EVT_SCROLL_BOTTOM($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLL_BOTTOM, $_[1] ) } sub EVT_SCROLL_LINEUP($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLL_LINEUP, $_[1] ) } sub EVT_SCROLL_LINEDOWN($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLL_LINEDOWN, $_[1] ) } sub EVT_SCROLL_PAGEUP($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLL_PAGEUP, $_[1] ) } sub EVT_SCROLL_PAGEDOWN($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLL_PAGEDOWN, $_[1] ) } sub EVT_SCROLL_THUMBTRACK($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLL_THUMBTRACK, $_[1] ) } sub EVT_SCROLL_THUMBRELEASE($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLL_THUMBRELEASE, $_[1] ) } sub EVT_SCROLL($$) { my( $x, $y ) = @_; EVT_SCROLL_TOP( $x, $y ); EVT_SCROLL_BOTTOM( $x, $y ); EVT_SCROLL_LINEUP( $x, $y ); EVT_SCROLL_LINEDOWN( $x, $y ); EVT_SCROLL_PAGEUP( $x, $y ); EVT_SCROLL_PAGEDOWN( $x, $y ); EVT_SCROLL_THUMBTRACK( $x, $y ); EVT_SCROLL_THUMBRELEASE( $x, $y ); } sub EVT_COMMAND_SCROLL_TOP($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_SCROLL_TOP, $_[2] ) } sub EVT_COMMAND_SCROLL_BOTTOM($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_SCROLL_BOTTOM, $_[2] ) } sub EVT_COMMAND_SCROLL_LINEUP($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_SCROLL_LINEUP, $_[2] ) } sub EVT_COMMAND_SCROLL_LINEDOWN($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_SCROLL_LINEDOWN, $_[2] ) } sub EVT_COMMAND_SCROLL_PAGEUP($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_SCROLL_PAGEUP, $_[2] ) } sub EVT_COMMAND_SCROLL_PAGEDOWN($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_SCROLL_PAGEDOWN, $_[2] ) } sub EVT_COMMAND_SCROLL_THUMBTRACK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_SCROLL_THUMBTRACK, $_[2] ) } sub EVT_COMMAND_SCROLL_THUMBRELEASE($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_SCROLL_THUMBRELEASE, $_[2] ) } sub EVT_COMMAND_SCROLL($$$) { my( $x, $y, $z ) = @_; EVT_COMMAND_SCROLL_TOP( $x, $y, $z ); EVT_COMMAND_SCROLL_BOTTOM( $x, $y, $z ); EVT_COMMAND_SCROLL_LINEUP( $x, $y, $z ); EVT_COMMAND_SCROLL_LINEDOWN( $x, $y, $z ); EVT_COMMAND_SCROLL_PAGEUP( $x, $y, $z ); EVT_COMMAND_SCROLL_PAGEDOWN( $x, $y, $z ); EVT_COMMAND_SCROLL_THUMBTRACK( $x, $y, $z ); EVT_COMMAND_SCROLL_THUMBRELEASE( $x, $y, $z ); } # # ScrollWinEvent # sub EVT_SCROLLWIN_TOP($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLLWIN_TOP, $_[1] ) } sub EVT_SCROLLWIN_BOTTOM($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLLWIN_BOTTOM, $_[1] ) } sub EVT_SCROLLWIN_LINEUP($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLLWIN_LINEUP, $_[1] ) } sub EVT_SCROLLWIN_LINEDOWN($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLLWIN_LINEDOWN, $_[1] ) } sub EVT_SCROLLWIN_PAGEUP($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLLWIN_PAGEUP, $_[1] ) } sub EVT_SCROLLWIN_PAGEDOWN($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLLWIN_PAGEDOWN, $_[1] ) } sub EVT_SCROLLWIN_THUMBTRACK($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLLWIN_THUMBTRACK, $_[1] ) } sub EVT_SCROLLWIN_THUMBRELEASE($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SCROLLWIN_THUMBRELEASE, $_[1] ) } sub EVT_SCROLLWIN { my( $x, $y ) = @_; EVT_SCROLLWIN_TOP( $x, $y ); EVT_SCROLLWIN_BOTTOM( $x, $y ); EVT_SCROLLWIN_LINEUP( $x, $y ); EVT_SCROLLWIN_LINEDOWN( $x, $y ); EVT_SCROLLWIN_PAGEUP( $x, $y ); EVT_SCROLLWIN_PAGEDOWN( $x, $y ); EVT_SCROLLWIN_THUMBTRACK( $x, $y ); EVT_SCROLLWIN_THUMBRELEASE( $x, $y ); } # # SpinEvent # sub EVT_SPIN_UP($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_SCROLL_LINEUP, $_[2] ) } sub EVT_SPIN_DOWN($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_SCROLL_LINEDOWN, $_[2] ) } sub EVT_SPIN($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_SCROLL_THUMBTRACK, $_[2] ) } sub EVT_SPINCTRL($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_SPINCTRL_UPDATED, $_[2] ) } # # SplitterEvent # sub EVT_SPLITTER_SASH_POS_CHANGING($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, $_[2] ) } sub EVT_SPLITTER_SASH_POS_CHANGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, $_[2] ) } sub EVT_SPLITTER_UNSPLIT($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_SPLITTER_UNSPLIT, $_[2] ) } sub EVT_SPLITTER_DOUBLECLICKED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, $_[2] ) } sub EVT_SPLITTER_DCLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, $_[2] ) } # # SysColourChangedEvent # sub EVT_SYS_COLOUR_CHANGED($$) { $_[0]->Connect( -1, -1, &Wx::wxEVT_SYS_COLOUR_CHANGED, $_[1] ) } # # TreeEvent # sub EVT_TREE_BEGIN_DRAG($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_BEGIN_DRAG, $_[2] ) } sub EVT_TREE_BEGIN_RDRAG($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_BEGIN_RDRAG, $_[2] ) } sub EVT_TREE_END_DRAG($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_END_DRAG, $_[2] ) } sub EVT_TREE_BEGIN_LABEL_EDIT($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, $_[2] ) } sub EVT_TREE_END_LABEL_EDIT($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_END_LABEL_EDIT, $_[2] ) } sub EVT_TREE_GET_INFO($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_GET_INFO, $_[2] ) } sub EVT_TREE_SET_INFO($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_SET_INFO, $_[2] ) } sub EVT_TREE_ITEM_EXPANDED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_ITEM_EXPANDED, $_[2] ) } sub EVT_TREE_ITEM_EXPANDING($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_ITEM_EXPANDING, $_[2] ) } sub EVT_TREE_ITEM_COLLAPSED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_ITEM_COLLAPSED, $_[2] ) } sub EVT_TREE_ITEM_COLLAPSING($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_ITEM_COLLAPSING, $_[2] ) } sub EVT_TREE_SEL_CHANGED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_SEL_CHANGED, $_[2] ) } sub EVT_TREE_SEL_CHANGING($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_SEL_CHANGING, $_[2] ) } sub EVT_TREE_KEY_DOWN($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_KEY_DOWN, $_[2] ) } sub EVT_TREE_DELETE_ITEM($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_DELETE_ITEM, $_[2] ) } sub EVT_TREE_ITEM_ACTIVATED($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_ITEM_ACTIVATED, $_[2] ) } sub EVT_TREE_ITEM_RIGHT_CLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, $_[2] ) } sub EVT_TREE_ITEM_MIDDLE_CLICK($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, $_[2] ) } sub EVT_TREE_ITEM_MENU($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_COMMAND_TREE_ITEM_MENU, $_[2] ) } # # UpdateUIEvent # sub EVT_UPDATE_UI($$$) { $_[0]->Connect( $_[1], -1, &Wx::wxEVT_UPDATE_UI, $_[2] ) } sub EVT_UPDATE_UI_RANGE($$$$) { $_[0]->Connect( $_[1], $_[2], &Wx::wxEVT_UPDATE_UI, $_[3] ) } # # Socket # sub EVT_SOCKET($$$) { goto &Wx::Socket::Event::EVT_SOCKET } sub EVT_SOCKET_ALL($$$) { goto &Wx::Socket::Event::EVT_SOCKET_ALL } sub EVT_SOCKET_INPUT($$$) { goto &Wx::Socket::Event::EVT_SOCKET_INPUT } sub EVT_SOCKET_OUTPUT($$$) { goto &Wx::Socket::Event::EVT_SOCKET_OUTPUT } sub EVT_SOCKET_CONNECTION($$$) { goto &Wx::Socket::Event::EVT_SOCKET_CONNECTION } sub EVT_SOCKET_LOST($$$) { goto &Wx::Socket::Event::EVT_SOCKET_LOST } # # Prototypes # sub EVT_CALENDAR($$$); sub EVT_CALENDAR_SEL_CHANGED($$$); sub EVT_CALENDAR_DAY($$$); sub EVT_CALENDAR_MONTH($$$); sub EVT_CALENDAR_YEAR($$$); sub EVT_CALENDAR_WEEKDAY_CLICKED($$$); sub EVT_STC_CHANGE($$$); sub EVT_STC_STYLENEEDED($$$); sub EVT_STC_CHARADDED($$$); sub EVT_STC_SAVEPOINTREACHED($$$); sub EVT_STC_SAVEPOINTLEFT($$$); sub EVT_STC_ROMODIFYATTEMPT($$$); sub EVT_STC_KEY($$$); sub EVT_STC_DOUBLECLICK($$$); sub EVT_STC_UPDATEUI($$$); sub EVT_STC_MODIFIED($$$); sub EVT_STC_MACRORECORD($$$); sub EVT_STC_MARGINCLICK($$$); sub EVT_STC_NEEDSHOWN($$$); sub EVT_STC_POSCHANGED($$$); sub EVT_STC_PAINTED($$$); sub EVT_STC_USERLISTSELECTION($$$); sub EVT_STC_URIDROPPED($$$); sub EVT_STC_DWELLSTART($$$); sub EVT_STC_DWELLEND($$$); sub EVT_STC_START_DRAG($$$); sub EVT_STC_DRAG_OVER($$$); sub EVT_STC_DO_DROP($$$); sub EVT_STC_ZOOM($$$); sub EVT_STC_HOTSPOT_CLICK($$$); sub EVT_STC_HOTSPOT_DCLICK($$$); sub EVT_STC_CALLTIP_CLICK($$$); 1; __END__ # local variables: # mode: cperl # end: Wx-0.9923/lib/Wx/Loader.pod000664000000000000 2250112306612266 13563 0ustar00Mark000000000000=head1 NAME Wx::Loader - using custom dll loaders with Wx =head1 SYNOPSIS #--------------------------------------- # For Packagers #--------------------------------------- # the order of these use()s is important use MyCustomWxLoader; use Wx; or ..... use threads; use threads::shared; use MyCustomLoader; use Wx; or - Wx::Perl::Splashfast special case use MyCustomWxLoader; use Wx::Perl::SplashFast ("./logo.jpg",5000); use Wx; ............. meanwhile in MyCustomWxLoader.pm package MyCustomWxLoader; require Wx::Mini; our @ISA = qw( Wx::Loader::Standard ); $Wx::wx_binary_loader = __PACKAGE__; ...... or $Wx::wx_binary_loader = __PACKAGE__->new; #----------------------------------------- # For binary distributions #----------------------------------------- # Provide a custom Wx::Loader::Custom # to be loaded by Wx::Mini package Wx::Loader::Custom our @ISA = qw( Wx::Loader::Standard ); # be polite if another loader is already in place $Wx::wx_binary_loader = __PACKAGE__ if !$Wx::wx_binary_loader; ...... or $Wx::wx_binary_loader = __PACKAGE__->new() if !$Wx::wx_binary_loader; =head1 DESCRIPTION If you are providing binary distributions of Wx or packaging Wx applications to run on machines without Perl (PAR, PerlApp),you may need to override dll loading methods. Providing a custom wx_binary_loader package allows you to do this. =head1 Binary Distributions A binary distribution my provide alternative sources and loading methods for the wxWidgets dlls. It achieves this by providing a Wx::Loader::Custom module in the distribution package Wx::Loader::Custom our @ISA = qw( Wx::Loader::Standard ); # be polite if another loader is already in place $Wx::wx_binary_loader = __PACKAGE__ if !$Wx::wx_binary_loader; ...... or $Wx::wx_binary_loader = __PACKAGE__->new() if !$Wx::wx_binary_loader; # remember that Wx.pm has not necessarily been loaded so only # Wx::Mini is available =head1 Perl Application Packagers Applications that package perl scripts to run on machines without Perl (PAR, PerlApp etc) can override dll loading methods if necessary by loading a custom package before wx package MyCustomWxLoader; require Wx::Mini; our @ISA = qw( Wx::Loader::Standard ); $Wx::wx_binary_loader = __PACKAGE__; ...... or $Wx::wx_binary_loader = __PACKAGE__->new; # remember that Wx.pm has not necessarily been loaded so only # Wx::Mini is available =head1 METHODS The following methods may be provided by custom loaders to override the default behaviour =head2 loader_info should return an information string about the loader and MUST be provided. The default loader has sub loader_info { 'Standard Distribution'; } so any custom loader should return something different e.g. sub loader_info { "Mark's Broken Distribution - it's all my fault"; } =head2 set_binary_path allows setting a custom path for the wxWidgets libraries. sub set_binary_path { my $class_or_object = shift; ... work out binary path return $newbinarypath; # method MUST return a path } =head2 load_dll Is called to load wxWidgets plugin dlls using a key for the $Wx::dlls hash ( see Wx::Mini ) sub load_dll { my ($class_or_object, $dllkey) = @_; ..... load dll - or maybe not } the default loader does nothing - dependencies are loaded automatically and determined by the standard methods of the os: an example of pre loading a known dependency sub load_dll { return if $^O !~ /^(mswin|linux)/i; local $ENV{PATH} = $Wx::wx_path . ';' . $ENV{PATH} if $Wx::wx_path; return unless exists $Wx::dlls->{$_[1]} && $Wx::dlls->{$_[1]}; my $dll = $Wx::dlls->{$_[1]}; $dll = $Wx::wx_path . '/' . $dll if $Wx::wx_path; Wx::_load_plugin( $dll ); } =head2 unload_dll Is called ONCE from within an END block A custom loader may choose, for example to unload any dlls it has loaded sub unload_dll { my $class_or_object = shift; ... carry out END actions } The default unload_dll is a noop ( sub unload_dll {} ) =head2 external_set_load A deprecated method of replacing the load function for plugins A custom loader may override this to prevent a legacy loader replacing the loading methods. =head2 external_set_unload A deprecated method of replacing the unload function for plugins A custom loader may override this to prevent a legacy loader replacing the unloading methods. =head2 boot_overload For binary distributions and packaged applications, normal shared library loading semantics may not work. A custom loader may provide this method to use in place of, or to supplement the standard XS load of Wx.dll (Wx.so). The method MUST return true or false, depending on whether it has loaded Wx.dll (Wx.so). For example, to load the core wxWidgets dlls before Wx is loaded sub boot_overload { shift; require DynaLoader; for my $dll ( qw( base core adv ) ) { next unless exists $Wx::dlls->{$dll} && $Wx::dlls->{$dll}; my $file = ( $Wx::wx_path ) ? $Wx::wx_path . '/' . $Wx::dlls->{$dll} : $Wx::dlls->{$dll}; my $libref = DynaLoader::dl_load_file($file, 0); push(@DynaLoader::dl_librefs,$libref) if $libref; # Dynaloader should take care of unloading } #------------ IMPORTANT ---------- return 0; # we have not loaded Wx #--------------------------------- } Some packagers extract dlls at runtime, and then may attempt to remove them at application close. This may fail for Wx. For example, on MSWin the directory cleanup fails whilst on Linux the application will seg-fault on exit. Packagers may avoid this by loading Wx.dll( Wx.so) from a non standard location ( perhaps a separate binary distribution of wx dlls ) that is not removed at application exit. For example sub boot_overload { my $class = shift require DynaLoader; for my $dll ( qw( base core adv ) ) { next unless exists $Wx::dlls->{$dll} && $Wx::dlls->{$dll}; my $file = ( $Wx::wx_path ) ? $Wx::wx_path . '/' . $Wx::dlls->{$dll} : $Wx::dlls->{$dll}; my $libref = DynaLoader::dl_load_file($file, 0); push(@DynaLoader::dl_librefs,$libref) if $libref; # Dynaloader should take care of unloading } package DynaLoader; my $file = $class->get_the_location_to_wx_xs_module; #------------------------------------------ # From XSLoader #------------------------------------------ my $module = 'Wx'; my $boots = "$module\::bootstrap"; my $bootname = "boot_$module"; $bootname =~ s/\W/_/g; @DynaLoader::dl_require_symbols = ($bootname); my $boot_symbol_ref; my $libref = dl_load_file($file, 0) or do { require Carp; Carp::croak("Can't load '$file' for module $module: " . dl_error()); }; push(@DynaLoader::dl_librefs,$libref); # record loaded object my @unresolved = dl_undef_symbols(); if (@unresolved) { require Carp; Carp::carp("Undefined symbols present after loading $file: @unresolved\n"); } $boot_symbol_ref = dl_find_symbol($libref, $bootname) or do { require Carp; Carp::croak("Can't find '$bootname' symbol in $file\n"); }; push(@DynaLoader::dl_modules, $module); # record loaded module my $xs = dl_install_xsub($boots, $boot_symbol_ref, $file); push(@DynaLoader::dl_shared_objects, $file); # record files loaded #------------ IMPORTANT ---------- return 1; # we have loaded Wx #--------------------------------- } =head1 Full Custom Loader Example ################################################ # Custom loader for Wx distribution from # http://www.wxperl.co.uk/repository # ################################################ package Wx::Loader::Custom; use strict; use warnings; our @ISA = qw( Wx::Loader::Standard ); $Wx::wx_binary_loader = __PACKAGE__ if !$Wx::wx_binary_loader; sub loader_info { 'Linux PPM Distribution from http://www.wxperl.co.uk/repository'; } sub boot_overload { shift; require DynaLoader; for my $dll ( qw( base core adv ) ) { next unless exists $Wx::dlls->{$dll} && $Wx::dlls->{$dll}; my $file = ( $Wx::wx_path ) ? $Wx::wx_path . '/' . $Wx::dlls->{$dll} : $Wx::dlls->{$dll}; my $libref = DynaLoader::dl_load_file($file, 0); push(@DynaLoader::dl_librefs,$libref) if $libref; # Dynaloader should take care of unloading } return 0; } # Allow legacy packaging call to override our load method my( $load_fun ) = ( \&_load_dll ); sub _load_dll { return unless exists $Wx::dlls->{$_[0]} && $Wx::dlls->{$_[0]}; my $dll = $Wx::dlls->{$_[0]}; $dll = $Wx::wx_path . '/' . $dll if $Wx::wx_path; return Wx::_load_plugin( $dll ); } sub external_set_load { $load_fun = $_[1] } sub load_dll { shift; goto &$load_fun; } =cut Wx-0.9923/lib/Wx/Locale.pm000664000000000000 272712306612266 13376 0ustar00Mark000000000000############################################################################# ## Name: lib/Wx/Locale.pm ## Purpose: Wx::Locale ## Author: Mattia Barbon ## Modified by: ## Created: 02/02/2001 ## RCS-ID: $Id: Locale.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2002 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::Locale; use strict; *Wx::gettext = \&Wx::GetTranslation; *Wx::gettext_noop = sub { $_[0] }; @Wx::Locale::T::ISA = qw(Exporter); sub import { my $temp = shift; require Exporter; package Wx::Locale::T; no strict; my( $from, $to, @export ); if( @_ == 1 && $_[0] eq ':default' ) { @_ = ( 'gettext', 'gettext', 'gettext_noop', 'gettext_noop' ) } while( @_ ) { $from = shift; $to = shift; *{"Wx::Locale::T::$to"} = *{"Wx::$from"}; push @export, $to; } push @Wx::Locale::T::EXPORT_OK, @export; Wx::Locale::T->export_to_level( 1, $temp, @export ); } sub new { shift; # this should be conditionally defined, but it does no harm to leave # like it is Wx::_match( @_, $Wx::_n_n, 1, 1 ) && return Wx::Locale::newShort( @_ ); Wx::_match( @_, $Wx::_s_s_s_b_b, 1, 1 ) && return Wx::Locale::newLong( @_ ); Wx::_croak Wx::_ovl_error; } 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/lib/Wx/Menu.pm000664000000000000 437312306612266 13102 0ustar00Mark000000000000############################################################################# ## Name: lib/Wx/Menu.pm ## Purpose: Wx::Menu class ## Author: Mattia Barbon ## Modified by: ## Created: 25/11/2000 ## RCS-ID: $Id: Menu.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2003, 2005-2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::Menu; use strict; sub Append { my( $this ) = shift; Wx::_match( @_, $Wx::_n_s_wmen, 3, 1 ) && ( return $this->AppendSubMenu_( @_ ) ); Wx::_match( @_, $Wx::_n_s, 2, 1 ) && ( return $this->AppendString( @_ ) ); Wx::_match( @_, $Wx::_wmit, 1 ) && ( return $this->AppendItem( @_ ) ); Wx::_croak Wx::_ovl_error; } sub Delete { my( $this ) = shift; Wx::_match( @_, $Wx::_wmit, 1 ) && ( $this->DeleteItem( @_ ), return ); Wx::_match( @_, $Wx::_n, 1 ) && ( $this->DeleteId( @_ ), return ); Wx::_croak Wx::_ovl_error; } sub Destroy { my( $this ) = shift; @_ == 0 && ( $this->DestroyMenu(), return ); Wx::_match( @_, $Wx::_wmit, 1 ) && ( $this->DestroyItem( @_ ), return ); Wx::_match( @_, $Wx::_n, 1 ) && ( $this->DestroyId( @_ ), return ); Wx::_croak Wx::_ovl_error; } sub Remove { my( $this ) = shift; Wx::_match( @_, $Wx::_wmit, 1 ) && return $this->RemoveItem( @_ ); Wx::_match( @_, $Wx::_n, 1 ) && return $this->RemoveId( @_ ); Wx::_croak Wx::_ovl_error; } sub Prepend { my( $this ) = shift; Wx::_match( @_, $Wx::_n_s_wmen, 3, 1 ) && ( $this->PrependSubMenu( @_ ), return ); Wx::_match( @_, $Wx::_n_s, 2, 1 ) && ( $this->PrependString( @_ ), return ); Wx::_match( @_, $Wx::_wmit, 1 ) && ( $this->PrependItem( @_ ), return ); Wx::_croak Wx::_ovl_error; } sub Insert { my( $this ) = shift; Wx::_match( @_, $Wx::_n_n_s_wmen, 4, 1 ) && ( $this->InsertSubMenu( @_ ), return ); Wx::_match( @_, $Wx::_n_n_s, 3, 1 ) && ( $this->InsertString( @_ ), return ); Wx::_match( @_, $Wx::_n_wmit, 2 ) && ( $this->InsertItem( @_ ), return ); Wx::_croak Wx::_ovl_error; } 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/lib/Wx/Mini.pm000664000000000000 755512306612266 13077 0ustar00Mark000000000000package Wx::Mini; # for RPM package Wx; use strict; our( $VERSION, $XS_VERSION ); our $alien_key = 'XXXALIENXXX'; { my $VAR1; $Wx::dlls = XXXDLLSXXX; } $VERSION = '0.9923'; # bootstrap will catch wrong versions $XS_VERSION = $VERSION; $VERSION = eval $VERSION; # # Set Front Process on Mac # # Mac will be set to front process unless we are in test harness or # and enivronment var is set # e.g. In a syntax checking editor, set environment variable # WXPERL_OPTIONS to include the string NO_MAC_SETFRONTPROCESS sub MacSetFrontProcess { return if( ( !defined( &Wx::_MacSetFrontProcess ) ) #||( exists($ENV{HARNESS_ACTIVE}) && $ENV{HARNESS_ACTIVE} ) ||( exists($ENV{WXPERL_OPTIONS}) && $ENV{WXPERL_OPTIONS} =~ /NO_MAC_SETFRONTPROCESS/) ); Wx::_MacSetFrontProcess(); } # # XSLoader/DynaLoader wrapper # our( $wx_path ); our( $wx_binary_loader ); # see the comment in Wx.xs:_load_plugin for why this is necessary sub wxPL_STATIC(); sub wx_boot($$) { local $ENV{PATH} = $wx_path . ';' . $ENV{PATH} if $wx_path; if( $_[0] eq 'Wx' || !wxPL_STATIC ) { no warnings 'redefine'; if( $] < 5.006 ) { require DynaLoader; local *DynaLoader::dl_load_file = \&Wx::_load_plugin if $_[0] ne 'Wx'; no strict 'refs'; push @{"$_[0]::ISA"}, 'DynaLoader'; $_[0]->bootstrap( $_[1] ); } else { require XSLoader; local *DynaLoader::dl_load_file = \&Wx::_load_plugin if $_[0] ne 'Wx'; XSLoader::load( $_[0], $_[1] ); } } else { no strict 'refs'; my $t = $_[0]; $t =~ tr/:/_/; &{"_boot_$t"}( $_[0], $_[1] ); } } sub _alien_path { return if defined $wx_path; return unless length 'XXXALIENDXXX'; foreach ( @INC ) { if( -d "$_/Alien/wxWidgets/XXXALIENDXXX" ) { $wx_path = "$_/Alien/wxWidgets/XXXALIENDXXX/lib"; last; } } } _alien_path(); sub _init_binary_loader { return if $wx_binary_loader; # load the Loader # a custom loader may exist as Wx::Loader::Custom # or a packager may have installed a loader already eval{ require Wx::Loader::Custom }; $wx_binary_loader = 'Wx::Loader::Standard' if !$wx_binary_loader; } sub _start { &_init_binary_loader; $wx_path = $wx_binary_loader->set_binary_path; wx_boot( 'Wx', $XS_VERSION ) if!$wx_binary_loader->boot_overload; _boot_Constant( 'Wx', $XS_VERSION ); _boot_GDI( 'Wx', $XS_VERSION ); if( ( exists($ENV{WXPERL_OPTIONS}) && $ENV{WXPERL_OPTIONS} =~ /ENABLE_DEFAULT_ASSERT_HANDLER/) ) { Wx::EnableDefaultAssertHandler(); } else { Wx::DisableAssertHandler(); } Load( 1 ); Wx::MacSetFrontProcess(); } # legacy load functions sub set_load_function { &_init_binary_loader; $wx_binary_loader->external_set_load( $_[0] ) } sub set_end_function { &_init_binary_loader; $wx_binary_loader->external_set_unload( $_[0] ) } # standard loader package - it gets # used if nothing overrides it # See Wx/Loader.pod package Wx::Loader::Standard; our @ISA = qw( Exporter ); sub loader_info { 'Standard Distribution'; } sub set_binary_path { $Wx::wx_path } sub boot_overload { } # back compat overloading # by default load_dll and unload_dll are no-ops (dependencies # and the Wx lib are loaded via wx_boot above). # But custom loaders may override this # we need this to support deprecated # set_load_function / set_end_function fo a while. # As it is undocumented, should not need to maintain # this for long. # once support for set_load_function / set_end_function is # removed, the rest of this package is # # sub load_dll {} # sub unload_dll {} my( $load_fun, $unload_fun ) = ( \&_load_dll, \&_unload_dll ); sub external_set_load { $load_fun = $_[1] } sub external_set_unload { $unload_fun = $_[1] } sub _load_dll {}; sub _unload_dll {}; sub load_dll { shift; goto &$load_fun; } sub unload_dll { shift; goto &$unload_fun; } 1; Wx-0.9923/lib/Wx/NewClass.pod000664000000000000 1125512306612266 14100 0ustar00Mark000000000000=head1 NAME NewClass - adding a new class to wxPerl =head1 CHECKLIST =over 4 =item * Are there constants or events that need to be wrapped? see L and L. =item * Is the class is derived from wxObject, from wxEvtHandler or from another class? see L. =item * Are class instances destroyed by wxWidgets or should they be garbage collected like normal Perl objects? see L. =item * Does the class have overloaded methods? see L. =item * Does the class have virtual methods that should be overridable from Perl? see L. =back =head1 SKELETON Add a new file F and update the F. Choose a relevant F<.xs> file in the top level directory (eg. F) and add this line: INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/NewClass.xsp A skeleton for F: %module{Wx}; #include // use the relevant wxWidgets header(s) %name{Wx::NewClass} class wxNewClass : public wxSomeBaseClass { # constructors see the CONSTRUCTORS section wxNewClass( wxWindow* some_window, const wxString& str ); # destructors ~wxNewClass(); # methods wxString GetString() const; void SetString( const wxString& str ); }; Add the typemap definition to F. See L. If adding a class related to one of the wxPerl submodules (C, C, ...) add the F<.xsp> file to the relevant subdirectory and modify the F<.xs> and F files in that subdirectory. =head1 CHOOSING A TYPEMAP There are five typemaps that should work for most wxWidgets objects: =over 4 =item * C for all classes that do not derive from C AND do not need to be garbage collected. =item * C for all classes that do not derive from C AND need to be garbage collected (see L). =item * C for all classes that derive from C AND do not need to be garbage collected. =item * C for all classes derived from C AND need to be garbage collected (see L). =item * C for all classes that derive from C. See also L. =back =head1 CONSTRUCTORS For C typemaps, there is some additional code that needs to be added to the constructor: wxNewClass( wxWindow* some_window, const wxString& str ) %code{% RETVAL = new wxNewClass( some_window, str ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; =head1 DESTRUCTORS AND THREADS For many classes not derived from C you need to add a destructor to free the C++ object when the Perl object is garbage collected. At the XS++ level this means adding ~wxNewClass(); to the class definition, but there is a catch: the Perl threading model. Without going into details, this is needed for Perl threads compatibility: =over 4 =item * Use the correct typemap choose either C or C. =item * Implement a C method add this code inside the class declaration: %{ static void wxNewClass::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} =item * Fix the destructor. modify the destructor like this: ~wxNewClass() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::NewClass", THIS, ST(0) ); delete THIS; %}; =back =head1 VIRTUAL METHODS The wrapping of virtual functions whose arguments are simple C++ types (integrals, bool, floating point) and common wxWidgets types (wxString) should be automatic: at the top of the file, load the plugin that handles virtual methods %loadplugin{build::Wx::XSP::Virtual}; and decorate virtual/pure virtual methods using the C<%Virtual> directive // pure virtual virtual wxString GetTitle() const = 0 %Virtual{pure}; // virtual, not pure virtual int GetBestFittingWidth(unsigned int idx) const %Virtual; If the class contains pure virtual methods, it will be marked as abstract, and it will have no constructors. For abstract classes, XS++ will create an additional Perl-level class, called C<< Wx::Pl >>; in order to override the virtual methods, you must derive from this class, and not from C<< Wx:: >>. TODO allow changing the default behaviour for abstract/concrete classes TODO allow overriding the class name TODO allow specifying custom code TODO handle multiple return values TODO customized type mapping =cut Wx-0.9923/lib/Wx/RadioBox.pm000664000000000000 272712306612266 13706 0ustar00Mark000000000000############################################################################# ## Name: lib/Wx/RadioBox.pm ## Purpose: Wx::RadioBox class ## Author: Mattia Barbon ## Modified by: ## Created: 28/10/2000 ## RCS-ID: $Id: RadioBox.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2002 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::RadioBox; use strict; sub Enable { my( $this ) = shift; Wx::_match( @_, $Wx::_b, 1 ) && ( $this->SUPER::Enable( @_ ), return ); Wx::_match( @_, $Wx::_n_b, 2 ) && ( $this->EnableItem( @_ ), return ); Wx::_croak Wx::_ovl_error; } sub GetLabel { my( $this ) = shift; @_ == 0 && return $this->SUPER::GetLabel(); Wx::_match( @_, $Wx::_n, 1 ) && return $this->GetItemLabel( @_ ); Wx::_croak Wx::_ovl_error; } sub SetLabel { my( $this ) = shift; Wx::_match( @_, $Wx::_s, 1 ) && ( $this->SUPER::SetLabel( @_ ), return ); Wx::_match( @_, $Wx::_n_s, 2 ) && ( $this->SetItemLabel( @_ ), return ); Wx::_croak Wx::_ovl_error; } sub Show { my( $this ) = shift; Wx::_match( @_, $Wx::_n, 1 ) && ( $this->SUPER::Show( @_ ), return ); Wx::_match( @_, $Wx::_n_n, 2 ) && ( $this->ShowItem( @_ ), return ); Wx::_croak Wx::_ovl_error; } 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/lib/Wx/Thread.pod000664000000000000 536412306612266 13554 0ustar00Mark000000000000=head1 NAME Thread - using wxPerl with threads =head1 SYNOPSIS # the order of these use()s is important use threads; use threads::shared; use Wx; my $DONE_EVENT : shared = Wx::NewEventType; my $worker = threads->create( \&work ); # create frames, etc my $frame = Wx::Frame->new( ... ); EVT_COMMAND( $frame, -1, $DONE_EVENT, \&done ); $app->MainLoop; sub done { my( $frame, $event ) = @_; print $event->GetData; } sub work { # ... do stuff, create a shared $result value my $threvent = new Wx::PlThreadEvent( -1, $DONE_EVENT, $result ); Wx::PostEvent( $frame, $threvent ); } # event handler sub OnCreateThread { # @_ = () is necessary to avoid "Scalars leaked" my( $self, $event ) = @_; @_ = (); threads->create( ... ); } =head1 DESCRIPTION Threaded GUI application are somewhat different from non-GUI threaded applications in that the main thread (which runs the GUI) must never block. Also, in wxWidgets, no thread other than the main thread can manipulate GUI objects. This leads to a hybrid model where worker threads must send events to the main thread in order to change the GUI state or signal their termination. =head2 Order of module loading It's necessary for C to happen after . =head2 Sending events from worker threads C can be used to communicate between worker and GUI threads. The event can carry a I value between threads. my $DONE_EVENT : shared = Wx::NewEventType; sub work { # ... do some stuff my $progress = new Wx::PlThreadEvent( -1, $DONE_EVENT, $progress ); Wx::PostEvent( $frame, $progress ); # ... do stuff, create a shared $result value my $end = new Wx::PlThreadEvent( -1, $DONE_EVENT, $result ); Wx::PostEvent( $frame, $end ); } The target of the event can be any C =head2 Receiving events from worker threads C is a command event and can be handled as such. The C<< ->GetData >> method can be used to retrieve the I data contained inside the event. my $DONE_EVENT : shared = Wx::NewEventType; EVT_COMMAND( $frame, -1, $DONE_EVENT, \&done ); sub done { my( $frame, $event ) = @_; print $event->GetData; } =head2 Creating new threads Creating new threads from event handlers works without problems except from a little snag. In order not to trigger a bug in the Perl interpreter, all event handler that directly or indirectly cause a thread creation must clean C<@_> before starting the thread. For example: sub OnCreateThread { my( $self, $event ) = @_; @_ = (); threads->create( ... ); } failure to do that will cause "scalars leaked" warnings from the Perl interpreter. =cut Wx-0.9923/lib/Wx/Timer.pm000664000000000000 235512306612266 13254 0ustar00Mark000000000000############################################################################# ## Name: lib/Wx/Timer.pm ## Purpose: Wx::Timer and Wx::TimerRunner ## Author: Mattia Barbon ## Modified by: ## Created: 14/02/2001 ## RCS-ID: $Id: Timer.pm 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2002 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx::Timer; use strict; sub new { my $class = shift; @_ == 0 && return Wx::Timer::newDefault( $class, ); Wx::_match( @_, $Wx::_wehd_n, 1, 1 ) && return Wx::Timer::newEH( $class, @_ ); Wx::_croak Wx::_ovl_error; } package Wx::TimerRunner; use strict; sub new { my $class = shift; my $this = { TIMER => shift }; if( @_ > 0 ) { $this->{TIMER}->Start( @_ ) } bless $this, $class; $this; } sub DESTROY { my $this = shift; $this->{TIMER}->Stop if $this->{TIMER}->IsRunning; } sub Start { my( $this, $milliseconds, $oneshot ) = @_; $this->{TIMER}->Start( $milliseconds, $oneshot ); } 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/Makefile.PL000775000000000000 763012306612226 12444 0ustar00Mark000000000000#!/usr/bin/perl -w ############################################################################ ## Name: Makefile.PL ## Purpose: Makefile.PL ## Author: Mattia Barbon ## Modified by: ## Created: 01/10/2000 ## RCS-ID: $Id: Makefile.PL 3462 2013-04-11 12:28:19Z mdootson $ ## Copyright: (c) 2000-2012 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package core; use 5.006001; use strict; use FindBin; use lib "${FindBin::RealBin}/build"; use Wx::build::MakeMaker::Core; ( my $mmv = ExtUtils::MakeMaker->VERSION ) =~ s/_//g; my $moduleauthor = ( $mmv >= 6.5702 ) ? [ 'Mattia Barbon ' ] : 'Mattia Barbon '; # $ExtUtils::MakeMaker::Verbose = 2; # $wxConfig::Verbose = 10; # Make setting optional MakeMaker parameters more readable # lifted from DBD::SQLite distribution sub OPTIONAL { return () unless $ExtUtils::MakeMaker::VERSION ge shift; return @_; } wxWriteMakefile( NAME => 'Wx', ABSTRACT_FROM => 'Wx.pm', VERSION_FROM => 'Wx.pm', AUTHOR => $moduleauthor, PREREQ_PM => { 'Alien::wxWidgets' => 0.25, 'ExtUtils::XSpp' => 0.1602, 'ExtUtils::MakeMaker' => 6.46, 'ExtUtils::ParseXS' => 3.15, 'File::Spec::Functions' => 0.82, 'Test::More' => 0.45, 'Test::Harness' => 2.26, 'if' => 0.03, }, LICENSE => 'perl', OPTIONAL( '6.48', MIN_PERL_VERSION => '5.006001', ), META_ADD => { dynamic_config => 1, configure_requires => { 'Alien::wxWidgets' => 0.25, }, build_requires => { 'Alien::wxWidgets' => 0.25, 'ExtUtils::MakeMaker' => 6.48, 'ExtUtils::XSpp' => 0.1602, 'Test::More' => 0.42, 'ExtUtils::ParseXS' => 3.15, 'File::Spec::Functions' => 0.82, 'Test::More' => 0.45, 'Test::Harness' => 2.26, 'if' => 0.03, }, requires => { 'Alien::wxWidgets' => 0.25, }, resources => { 'license' => 'http://dev.perl.org/licenses/', 'homepage' => 'http://www.wxperl.it/', 'bugtracker' => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Wx', 'repository' => 'http://svn.code.sf.net/p/wxperl/code/wxPerl', 'MailingList' => 'http://lists.perl.org/list/wxperl-users.html', }, no_index => { directory => [ qw(samples script) ], package => [ qw(MY Parse::Yapp::Driver) ], }, }, PMLIBDIRS => [ 'lib', 'build' ], EXE_FILES => [ qw(script/wxperl_overload) ], WX_CORE_LIB_MAYBE => $^O eq 'darwin' ? 'media html' : '', WX_CORE_LIB => 'adv core base', WX_OVERLOAD => { header => 'cpp/ovl_const.h', source => 'cpp/ovl_const.cpp', }, WX_TOP => 'Wx.pm', ); END { print <" ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.120630", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Wx", "no_index" : { "directory" : [ "samples", "script" ], "package" : [ "MY", "Parse::Yapp::Driver" ] }, "prereqs" : { "build" : { "requires" : { "Alien::wxWidgets" : "0.25", "ExtUtils::MakeMaker" : "6.48", "ExtUtils::ParseXS" : "3.15", "ExtUtils::XSpp" : "0.1602", "File::Spec::Functions" : "0.82", "Test::Harness" : "2.26", "Test::More" : "0.45", "if" : "0.03" } }, "configure" : { "requires" : { "Alien::wxWidgets" : "0.25" } }, "runtime" : { "requires" : { "Alien::wxWidgets" : "0.25" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=Wx" }, "homepage" : "http://www.wxperl.it/", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "url" : "http://svn.code.sf.net/p/wxperl/code/wxPerl" }, "x_MailingList" : "http://lists.perl.org/list/wxperl-users.html" }, "version" : "0.9923" } Wx-0.9923/META.yml000664000000000000 201212316265013 11724 0ustar00Mark000000000000--- abstract: 'interface to the wxWidgets cross-platform GUI toolkit' author: - 'Mattia Barbon ' build_requires: Alien::wxWidgets: 0.25 ExtUtils::MakeMaker: 6.48 ExtUtils::ParseXS: 3.15 ExtUtils::XSpp: 0.1602 File::Spec::Functions: 0.82 Test::Harness: 2.26 Test::More: 0.45 if: 0.03 configure_requires: Alien::wxWidgets: 0.25 dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.120630' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Wx no_index: directory: - samples - script package: - MY - Parse::Yapp::Driver requires: Alien::wxWidgets: 0.25 resources: bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=Wx homepage: http://www.wxperl.it/ license: http://dev.perl.org/licenses/ repository: http://svn.code.sf.net/p/wxperl/code/wxPerl x_MailingList: http://lists.perl.org/list/wxperl-users.html version: 0.9923 Wx-0.9923/README.txt000664000000000000 605712306612266 12173 0ustar00Mark000000000000wxPerl is a wrapper for the wxWidgets (formerly known as wxWindows) GUI toolkit Copyright (c) 2000-2010 Mattia Barbon. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself. You need wxWidgets in order to build wxPerl (see http://www.wxwidgets.org/). You can use GTK, Win32, Mac OS X and Motif as windowing toolkits for wxPerl. Please read the DEPRECATIONS section at the bottom! INSTALLATION: Build and install wxWidgets, version 2.5.3 or above perl Makefile.PL make make test make install for more detailed instructions see the docs/install.pod file; in case of problems please consult the FAQ section therein. TESTED PLATFORMS: Perl | OS | wxWidgets | Compiler ----------------+---------------+----------------+------------------- ActivePerl 8xx | Windows 2000 | wxMSW 2.8.x | MSVC 6 Strawberry Perl | Windows XP | | MSVC 7 5.10.x | Windows Vista | | MinGW GCC 3.4 | | | MinGW GCC 4.x ----------------+---------------+----------------+------------------- 5.8.x | Fedora 9 | wxGTK 2.8.x | GCC 3.x 5.6.1 | Debian 4.0 | wxGTK 2.9.x | GCC 4.x | FreeBSD | | | Gentoo | | ----------------+---------------+----------------+------------------- 5.8.x | Mac OS X 10.4 | wxMac 2.5.3 | GCC 3.3 5.10.0 | Mac OS X 10.5 | wxMac 2.8.x | GCC 4.x | Mac OS X 10.6 | wxMac 2.9.x | ----------------+---------------+----------------+------------------- wxPerl has also been reported to work on FreeBSD and IRIX. DEPRECATIONS The following features have been deprecated and may disappear in the future 1 - class->new always returning an hash reference until now calling ->new( ... ) returned an hash reference for most classes derived from Wx::Window, hence the following code worked: my $button = Wx::Button->new( ... ); $button->{attribute} = 'value'; At some point in the future this will be changed so that only _user-defined_ classes derived from Wx::Window (or from any class derived from Wx::Window) will yield an hash reference, hence the following code will not work anymore: my $button = Wx::Button->new( ... ); $button->{attribute} = 'value'; while the following code will work as it did before: package MyButton; use base qw(Wx::Button); sub new { my $class = shift; my $self = $class->SUPER::new; # always returns hash $self->{attribure} = 'value; return $self; } 2 - Use of $Wx::_foo wxPerl used to provide some constants named $Wx::_something (for example, $Wx::_msw, $Wx::_platform, $Wx::_wx_version). These constants are now deprecated, and will be removed in some future version; this information is available via functions in the Wx package (i.e. Wx::wxMSW()) toolkit: wxMSW, wxGTK, wxMOTIF, wxX11, wxMAC, wxUNIVERSAL misc: wxUNICODE, wxVERSION Wx-0.9923/samples/000775000000000000 012316265011 12042 5ustar00Mark000000000000Wx-0.9923/samples/dialog/000775000000000000 012316265010 13300 5ustar00Mark000000000000Wx-0.9923/samples/dialog/dialog.pl000775000000000000 402312306612265 15165 0ustar00Mark000000000000#!/usr/bin/perl -w ############################################################################# ## Name: samples/dialog/dialog.pl ## Purpose: Dialog wxPerl sample ## Author: Mattia Barbon ## Modified by: ## Created: 12/11/2000 ## RCS-ID: $Id: dialog.pl 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000, 2004, 2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use Wx; package MyDialog; use strict; use base qw(Wx::Dialog); use Wx::Event qw(EVT_CLOSE EVT_BUTTON); use Wx qw(wxDefaultSize wxDefaultValidator); sub new { my( $class, $label ) = @_; my $this = $class->SUPER::new( undef, -1, $label, [-1, -1], [250, 110] ); $this->SetIcon( Wx::GetWxPerlIcon() ); # absolute positioning is bad my $ct = $this->{celsius} = Wx::TextCtrl->new( $this, -1, '0', [20, 20], [100, -1] ); my $cb = Wx::Button->new( $this, -1, 'To Fahrenheit', [130, 20] ); my $ft = $this->{fahrenheit} = Wx::TextCtrl->new( $this, -1, '32', [20, 50], [100, -1] ); my $fb = Wx::Button->new( $this, -1, 'To Celsius', [130, 50] ); EVT_BUTTON( $this, $cb, \&CelsiusToFahrenheit ); EVT_BUTTON( $this, $fb, \&FahrenheitToCelsius ); EVT_CLOSE( $this, \&OnClose ); return $this; } sub CelsiusToFahrenheit { my( $this, $event ) = @_; $this->fahrenheit->SetValue( ( $this->celsius->GetValue / 100.0 ) * 180 + 32 ); } sub FahrenheitToCelsius { my( $this, $event ) = @_; $this->celsius->SetValue( ( ( $this->fahrenheit->GetValue - 32 ) / 180.0 ) * 100 ); } sub OnClose { my( $this, $event ) = @_; $this->Destroy; } sub fahrenheit { $_[0]->{fahrenheit} } sub celsius { $_[0]->{celsius} } package main; my $app = Wx::SimpleApp->new; my $dialog = MyDialog->new( "wxPerl dialog sample" ); $dialog->Show; $app->MainLoop; Wx-0.9923/samples/hello/000775000000000000 012316265010 13144 5ustar00Mark000000000000Wx-0.9923/samples/hello/hello.pl000775000000000000 345212306612265 14702 0ustar00Mark000000000000#!/usr/bin/perl -w ############################################################################# ## Name: samples/hello/hello.pl ## Purpose: Hello wxPerl sample ## Author: Mattia Barbon ## Modified by: ## Created: 02/11/2000 ## RCS-ID: $Id: hello.pl 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000, 2004, 2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use Wx; package MyFrame; use strict; use base qw(Wx::Frame); use Wx::Event qw(EVT_PAINT); # this imports some constants use Wx qw(wxDECORATIVE wxNORMAL wxBOLD); use Wx qw(wxDefaultPosition); use Wx qw(wxWHITE); sub new { my( $class ) = @_; # new frame with no parent, id -1, title 'Hello, world!' # default position and size 350, 100 my $this = $class->SUPER::new( undef, -1, 'Hello, world!', wxDefaultPosition , [350, 100] ); # create a new font object and store it $this->{font} = Wx::Font->new( 40, wxDECORATIVE, wxNORMAL, wxBOLD, 0 ); # set background colour $this->SetBackgroundColour( wxWHITE ); $this->SetIcon( Wx::GetWxPerlIcon() ); # declare that all paint events will be handled with the OnPaint method EVT_PAINT( $this, \&OnPaint ); return $this; } sub OnPaint { my( $this, $event ) = @_; # create a device context (DC) used for drawing my $dc = Wx::PaintDC->new( $this ); # select the font $dc->SetFont( $this->font ); # draw a friendly message $dc->DrawText( 'Hello, world!', 10, 10 ); } sub font { $_[0]->{font} } package main; my $app = Wx::SimpleApp->new; my $frame = MyFrame->new; $frame->Show; $app->MainLoop; Wx-0.9923/samples/minimal/000775000000000000 012316265011 13470 5ustar00Mark000000000000Wx-0.9923/samples/minimal/minimal.pl000775000000000000 431112306612265 15543 0ustar00Mark000000000000#!/usr/bin/perl -w ############################################################################# ## Name: samples/minimal/minimal.pl ## Purpose: Minimal wxPerl sample ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: minimal.pl 2455 2008-08-31 11:16:05Z mbarbon $ ## Copyright: (c) 2000, 2004-2006, 2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use Wx; package MyFrame; use strict; use base qw(Wx::Frame); use Wx::Event qw(EVT_MENU); # Parameters: title, position, size sub new { my( $class, $label ) = @_; my $this = $class->SUPER::new( undef, -1, $label ); # load an icon and set it as frame icon $this->SetIcon( Wx::GetWxPerlIcon() ); # create the menus my $mfile = Wx::Menu->new; my $mhelp = Wx::Menu->new; my( $ID_ABOUT, $ID_EXIT ) = ( 1, 2 ); $mhelp->Append( $ID_ABOUT, "&About...\tCtrl-A", "Show about dialog" ); $mfile->Append( $ID_EXIT, "E&xit\tAlt-X", "Quit this program" ); my $mbar = Wx::MenuBar->new; $mbar->Append( $mfile, "&File" ); $mbar->Append( $mhelp, "&Help" ); $this->SetMenuBar( $mbar ); # declare that events coming from menu items with the given # id will be handled by these routines EVT_MENU( $this, $ID_EXIT, 'OnQuit' ); EVT_MENU( $this, $ID_ABOUT, 'OnAbout' ); $this; } # called when the user selects the 'Exit' menu item sub OnQuit { my( $this, $event ) = @_; # closes the frame $this->Close( 1 ); } use Wx qw(wxOK wxICON_INFORMATION wxVERSION_STRING); # called when the user selects the 'About' menu item sub OnAbout { my( $this, $event ) = @_; # display a simple about box my $message = sprintf <new; my $frame = MyFrame->new( "Minimal wxPerl app" ); $frame->Show; $app->MainLoop; Wx-0.9923/samples/README.txt000664000000000000 25312306612266 13607 0ustar00Mark000000000000The examples in this directoy are very simple applications. Wx::Demo (available on CPAN) shows a more complex application demonstrating most wxPerl controls and features. Wx-0.9923/samples/socket/000775000000000000 012316265011 13332 5ustar00Mark000000000000Wx-0.9923/samples/socket/wxSocketClient.pl000664000000000000 565412306612265 16735 0ustar00Mark000000000000############################################################################# ## Name: samples/socket/wxSocketClient.pl ## Purpose: wxSocketClient minimal demo ## Author: Graciliano M. P. ## Created: 06/02/2003 ## RCS-ID: $Id: wxSocketClient.pl 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2003-2004 Graciliano M. P. ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# BEGIN { eval { require blib; 'blib'->import; } } use Wx; use Wx::Socket ; package MyApp; use vars qw(@ISA); @ISA=qw(Wx::App); sub OnInit { my( $this ) = @_; my( $frame ) = MyFrame->new( "wxSocket Minimal demo", Wx::Point->new( 50, 50 ), Wx::Size->new( 450, 350 ) ); $this->SetTopWindow( $frame ); $frame->Show( 1 ); 1; } package MyFrame; use vars qw(@ISA); @ISA=qw(Wx::Frame); use Wx qw(:sizer wxTE_MULTILINE ); use Wx::Event qw(EVT_BUTTON) ; use Wx qw(wxDefaultPosition wxDefaultSize wxDEFAULT wxNORMAL); sub new { my( $class ) = shift; my( $this ) = $class->SUPER::new( undef, -1, $_[0], $_[1], $_[2] ); my $top_s = Wx::BoxSizer->new( wxVERTICAL ); my $text = Wx::TextCtrl->new( $this , -1, '' , wxDefaultPosition, [200,-1] , wxTE_MULTILINE ); my $button = Wx::Button->new( $this, -1, 'Connect' ); $this->{TEXT} = $text ; $top_s->Add( $text , 1, wxGROW|wxALL, 5 ); $top_s->Add( $button , 0, wxGROW|wxALL, 0); $this->SetSizer( $top_s ); $this->SetAutoLayout( 1 ); EVT_BUTTON( $this, $button, \&OnConnect ); return( $this ) ; $this; } ############# # ONCONNECT # ############# sub OnConnect { my $this = shift ; use Wx qw(:socket) ; use Wx::Event qw(EVT_SOCKET_INPUT EVT_SOCKET_LOST) ; my $sock = Wx::SocketClient->new(wxSOCKET_WAITALL); EVT_SOCKET_INPUT($this , $sock , \&onInput ) ; EVT_SOCKET_LOST($this , $sock , \&onClose ) ; my $stat = $sock->Connect('localhost',5050) ; my $stat = $sock->IsConnected ; $this->{TEXT}->AppendText("IsConnected: <$stat>\n") ; if (! $stat) { return ;} my @lcaddr = $sock->GetLocal ; my @praddr = $sock->GetPeer ; $this->{TEXT}->AppendText("Local: <@lcaddr>\n") ; $this->{TEXT}->AppendText("Peer: <@praddr>\n") ; $this->{TEXT}->AppendText("-------------------------\n") ; } sub onInput { my ( $sock , $this , $evt ) = @_ ; my $buf = '#BEGIN#' ; while( $sock->Read($buf , 1 , length($buf) ) ) { if ($buf =~ /\n$/s) { last ;} } $this->{TEXT}->AppendText($buf."#END#") ; } sub onClose { my ( $sock , $this , $evt ) = @_ ; $this->{TEXT}->AppendText("\n-------------------------(closed)\n") ; $sock->Destroy ; } package main; my( $app ) = MyApp->new(); $app->MainLoop(); exit ; # Local variables: # # mode: cperl # # End: # Wx-0.9923/samples/socket/wxSocketClientDatagram.pl000664000000000000 515612306612265 20373 0ustar00Mark000000000000############################################################################# ## Name: samples/socket/wxSocketClientDatagram.pl ## Purpose: wxDatagramSocket minimal demo ## Author: Graciliano M. P., Mattia Barbon ## Created: 07/02/2003 ## RCS-ID: $Id: wxSocketClientDatagram.pl 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2004 Graciliano M. P., Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use Wx; use Wx::Socket ; package MyApp; use vars qw(@ISA); @ISA=qw(Wx::App); sub OnInit { my( $this ) = @_; my( $frame ) = MyFrame->new( "wxSocket Minimal demo", Wx::Point->new( 50, 50 ), Wx::Size->new( 450, 350 ) ); $this->SetTopWindow( $frame ); $frame->Show( 1 ); 1; } package MyFrame; use vars qw(@ISA); @ISA=qw(Wx::Frame); use Wx qw(:sizer wxTE_MULTILINE ); use Wx::Event qw(EVT_BUTTON) ; use Wx qw(wxDefaultPosition wxDefaultSize wxDEFAULT wxNORMAL); sub new { my( $class ) = shift; my( $this ) = $class->SUPER::new( undef, -1, $_[0], $_[1], $_[2] ); my $top_s = Wx::BoxSizer->new( wxVERTICAL ); my $text = Wx::TextCtrl->new( $this , -1, '' , wxDefaultPosition, [200,-1] , wxTE_MULTILINE ); my $button = Wx::Button->new( $this, -1, 'Connect' ); $this->{TEXT} = $text ; $top_s->Add( $text , 1, wxGROW|wxALL, 5 ); $top_s->Add( $button , 0, wxGROW|wxALL, 0); $this->SetSizer( $top_s ); $this->SetAutoLayout( 1 ); EVT_BUTTON( $this, $button, \&OnConnect ); return( $this ) ; $this; } ############# # ONCONNECT # ############# sub OnConnect { my $this = shift ; use Wx qw(:socket) ; use Wx::Event qw(EVT_SOCKET_INPUT EVT_SOCKET_LOST) ; my $addr = Wx::IPV4address->new; $addr->SetHostname( 'localhost' ); $addr->SetService( 5555 ); my $sock = Wx::DatagramSocket->new( $addr ); EVT_SOCKET_INPUT($this , $sock , \&onInput ) ; my $addr2 = Wx::IPV4address->new; $addr->SetHostname( 'localhost' ); $addr->SetService( 4444 ); $sock->SendTo( $addr, "123456\n", 7 ); $this->{TEXT}->AppendText("-------------------------\n") ; } sub onInput { my ( $sock , $this , $evt ) = @_ ; my $buf = '#BEGIN#' ; my $addr = Wx::IPV4address->new; while( $sock->RecvFrom( $addr, $buf , 1000 ) ) { if ($buf =~ /\n$/s) { last ;} } $this->{TEXT}->AppendText($buf."#END#") ; $sock->Destroy; } package main; my( $app ) = MyApp->new(); $app->MainLoop(); exit ; # Local variables: # # mode: cperl # # End: # Wx-0.9923/samples/socket/wxSocketServer.pl000664000000000000 534312306612266 16761 0ustar00Mark000000000000############################################################################# ## Name: samples/socket/wxSocketServer.pl ## Purpose: wxSocketServer minimal demo ## Author: Graciliano M. P. ## Created: 06/02/2003 ## RCS-ID: $Id: wxSocketServer.pl 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2003-2004 Graciliano M. P. ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# BEGIN { eval { require blib; 'blib'->import; } } use Wx; use Wx::Socket ; package MyApp; use vars qw(@ISA); @ISA=qw(Wx::App); sub OnInit { my( $this ) = @_; my( $frame ) = MyFrame->new( "wxSocket Minimal demo", Wx::Point->new( 50, 50 ), Wx::Size->new( 450, 350 ) ); $this->SetTopWindow( $frame ); $frame->Show( 1 ); 1; } package MyFrame; use vars qw(@ISA); @ISA=qw(Wx::Frame); use Wx qw(:sizer wxTE_MULTILINE ); use Wx::Event qw(EVT_BUTTON) ; use Wx qw(wxDefaultPosition wxDefaultSize wxDEFAULT wxNORMAL); sub new { my( $class ) = shift; my( $this ) = $class->SUPER::new( undef, -1, $_[0], $_[1], $_[2] ); my $top_s = Wx::BoxSizer->new( wxVERTICAL ); my $text = Wx::TextCtrl->new( $this , -1, '' , wxDefaultPosition, [200,-1] , wxTE_MULTILINE ); my $button = Wx::Button->new( $this, -1, 'Start' ); $this->{TEXT} = $text ; $top_s->Add( $text , 1, wxGROW|wxALL, 5 ); $top_s->Add( $button , 0, wxGROW|wxALL, 0); $this->SetSizer( $top_s ); $this->SetAutoLayout( 1 ); EVT_BUTTON( $this, $button, \&OnConnect ); return( $this ) ; $this; } ############# # ONCONNECT # ############# sub OnConnect { my $this = shift ; use Wx qw(:socket) ; use Wx::Event qw(EVT_SOCKET_CONNECTION) ; my $sock = Wx::SocketServer->new('localhost',5050,wxSOCKET_WAITALL); EVT_SOCKET_CONNECTION($this , $sock , \&onConnect ) ; my $stat = $sock->Ok ; $this->{TEXT}->AppendText("Ok: <$stat>\n") ; if (! $stat) { return ;} } sub onConnect { my ( $sock , $this , $evt ) = @_ ; my $client = $sock->Accept(0) ; my @lcaddr = $client->GetLocal ; my @praddr = $client->GetPeer ; $this->{TEXT}->AppendText("-------------------------\n") ; $this->{TEXT}->AppendText("New Client\n") ; $this->{TEXT}->AppendText(" Local: <@lcaddr>\n") ; $this->{TEXT}->AppendText(" Peer: <@praddr>\n") ; $client->Write("This is a data test!\n") ; $client->Close ; $client->Destroy ; $this->{TEXT}->AppendText("\n-------------------------(closed)\n") ; } package main; my( $app ) = MyApp->new(); $app->MainLoop(); exit ; # Local variables: # # mode: cperl # # End: # Wx-0.9923/samples/socket/wxSocketServerDatagram.pl000664000000000000 533312306612266 20421 0ustar00Mark000000000000############################################################################# ## Name: samples/socket/wxSocketServerDatagram.pl ## Purpose: wxDatagramSocket demo ## Author: Graciliano M. P., Mattia Barbon ## Created: 07/02/2004 ## RCS-ID: $Id: wxSocketServerDatagram.pl 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2004 Graciliano M. P., Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use Wx; use Wx::Socket ; package MyApp; use vars qw(@ISA); @ISA=qw(Wx::App); sub OnInit { my( $this ) = @_; my( $frame ) = MyFrame->new( "wxSocket Minimal demo", Wx::Point->new( 50, 50 ), Wx::Size->new( 450, 350 ) ); $this->SetTopWindow( $frame ); $frame->Show( 1 ); 1; } package MyFrame; use vars qw(@ISA); @ISA=qw(Wx::Frame); use Wx qw(:sizer wxTE_MULTILINE ); use Wx::Event qw(EVT_BUTTON) ; use Wx qw(wxDefaultPosition wxDefaultSize wxDEFAULT wxNORMAL); sub new { my( $class ) = shift; my( $this ) = $class->SUPER::new( undef, -1, $_[0], $_[1], $_[2] ); my $top_s = Wx::BoxSizer->new( wxVERTICAL ); my $text = Wx::TextCtrl->new( $this , -1, '' , wxDefaultPosition, [200,-1] , wxTE_MULTILINE|wxTE_RICH2 ); my $button = Wx::Button->new( $this, -1, 'Start' ); $this->{TEXT} = $text ; $top_s->Add( $text , 1, wxGROW|wxALL, 5 ); $top_s->Add( $button , 0, wxGROW|wxALL, 0); $this->SetSizer( $top_s ); $this->SetAutoLayout( 1 ); EVT_BUTTON( $this, $button, \&OnConnect ); return( $this ) ; $this; } ############# # ONCONNECT # ############# sub OnConnect { my $this = shift ; use Wx qw(:socket) ; use Wx::Event qw(EVT_SOCKET_INPUT) ; my $addr = Wx::IPV4address->new; $addr->SetAnyAddress; $addr->SetService( 4444 ); my $sock = Wx::DatagramSocket->new( $addr ); EVT_SOCKET_INPUT($this , $sock , \&onConnect ) ; my $stat = $sock->Ok ; $this->{TEXT}->AppendText("Ok: <$stat>\n") ; if (! $stat) { return ;} } sub onConnect { my ( $sock , $this , $evt ) = @_ ; my $addr = Wx::IPV4address->new; my $buf = ''; $sock->RecvFrom($addr, $buf, 1000) ; my $addr_str = $addr->GetHostname . ' ' . $addr->GetService; $this->{TEXT}->AppendText("-------------------------\n") ; $this->{TEXT}->AppendText("New Client\n") ; $this->{TEXT}->AppendText(" Peer: <$addr_str>\n") ; $sock->SendTo($addr, "This is a data test!\n", 21) ; $this->{TEXT}->AppendText("\n-------------------------(closed)\n") ; } package main; my( $app ) = MyApp->new(); $app->MainLoop(); exit ; # Local variables: # # mode: cperl # # End: # Wx-0.9923/samples/trivial/000775000000000000 012316265010 13513 5ustar00Mark000000000000Wx-0.9923/samples/trivial/trivial.pl000775000000000000 131612306612266 15616 0ustar00Mark000000000000#!/usr/bin/perl -w ############################################################################# ## Name: samples/trivial/trivial.pl ## Purpose: Trivial wxPerl sample ## Author: Mattia Barbon ## Modified by: ## Created: 24/09/2006 ## RCS-ID: $Id: trivial.pl 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use Wx; my $app = Wx::SimpleApp->new; my $frame = Wx::Frame->new( undef, -1, "Trivial Sample" ); $frame->Show; $app->MainLoop; Wx-0.9923/script/000775000000000000 012316265011 11702 5ustar00Mark000000000000Wx-0.9923/script/copy_files.pl000775000000000000 165712306612266 14476 0ustar00Mark000000000000#!/usr/bin/perl -w ############################################################################# ## Name: script/copy_files.pl ## Purpose: Simple wrapper around ExtUtils::Install ## Author: Mattia Barbon ## Modified by: ## Created: 16/12/2002 ## RCS-ID: $Id: copy_files.pl 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2002 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use ExtUtils::Install 'pm_to_blib'; my $file = shift; die "File '$file' does not exist" unless -f $file; my $files = do $file; die "Error loading options: $@" unless $files; #die %$files; pm_to_blib( $files, 'blib', # dummy argument, but required '' ); # idem exit 0; # local variables: # mode: cperl # end: Wx-0.9923/script/fix_alien_path.pl000775000000000000 334112306612266 15304 0ustar00Mark000000000000#!/usr/bin/perl -w ############################################################################# ## Name: script/fix_alien_path.pl ## Purpose: Substitute Alien::wxWidgets path in modules ## Author: Mattia Barbon ## Modified by: ## Created: 15/08/2005 ## RCS-ID: $Id: fix_alien_path.pl 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2005-2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use blib; # to pick the correct 'Wx::build::Options' use Alien::wxWidgets 0.04 (); use Wx::build::Options; use Fatal qw(open close unlink); use Config; use Data::Dumper; use File::Spec::Functions qw(splitpath splitdir); # we do not care about the options, just that Alien::wxWidgets # is initialized with the correct key Wx::build::Options->get_makemaker_options( 'saved' ); $Alien::wxWidgets::dont_remap = 1; my( $from, $to ) = @ARGV; my $key = Alien::wxWidgets->key; my $version = Alien::wxWidgets->version; my @libs = Alien::wxWidgets->library_keys; my %libs; @libs{@libs} = Alien::wxWidgets->shared_libraries( @libs ); my $libs = Data::Dumper::Dumper( \%libs ); my $keyd; if( $^O =~ /mswin/i ) { $keyd = $key; } else { my( $vol, $dir, $file ) = splitpath( Alien::wxWidgets->prefix ); $keyd = $file ? $file : ( splitdir( $dir ) )[-1]; } unlink $to if -f $to; open my $in, "< $from"; binmode $in; open my $out, "> $to"; binmode $out; while( <$in> ) { s/XXXALIENDXXX/$keyd/g; s/XXXALIENXXX/$key/g; s/Wx::wxVERSION\(\)/$version/g; s/XXXDLLSXXX/$libs/g; print $out $_; } close $in; close $out; exit 0; Wx-0.9923/script/make_exp_list.pl000775000000000000 553712306612266 15167 0ustar00Mark000000000000#!/usr/bin/perl -w ############################################################################# ## Name: script/make_exp_list.pl ## Purpose: builds lib/Wx/_Exp.pm (export lists for Wx and Wx::Event) ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: make_exp_list.pl 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2000-2003, 2005, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# # # @EXPORT_OK and %EXPORT_TAGS for Wx.pm (constants in Constant.xs) # my $ext = shift @ARGV; my $parser; my %packages; my $tag; my $package; sub add_to_exports { my( $values, $tags ) = @_; foreach my $i ( split '\s+', $values ) { next if $i =~ /^\s*$/; foreach my $j ( split '\s+', $tags ) { next if $_ =~ /^\s*$/; push @{ $packages{$package}{tags}{$j} }, $i; } push @{ $packages{$package}{exp_ok} }, $i; } } foreach my $i ( map glob( $_ ), @ARGV ) { open IN, '< ' . $i or die "unable to open '$i'"; $tag = ''; $package = ''; $parser = undef; while( ) { m/^\W+?\!(\w+):\s*(.*)$/ && do { my( $t, $v ) = ( $1, $2 ); if( $t eq 'parser' ) { $parser = eval "$v"; die if $@ } if( $t eq 'package' ) { $package = $v } if( $t eq 'tag' ) { $tag = $v } if( $t eq 'export' ) { add_to_exports( $v, $tag ); next } next; }; next unless $parser; my @values = $parser->( $_ ); ( defined( $values[0] ) && length( $values[0] ) ) || next; $values[1] ||= ''; add_to_exports( $values[0], "$values[1] $tag" ); } } close IN; # # write export file # local $" = "\n"; open OUT, '> '. $ext || die "unable to open file '$ext'"; binmode OUT; # Perl 5.004 on Unix complains for CR print OUT < \&wanted, }, 'blib' ); my @files; sub wanted { return unless -f $_; push @files, $File::Find::name; } my( @dev, @bin ); foreach ( @files ) { if( m[\.(?:lib|a|h)$]i ) { push @dev, $_; next; } push @bin, $_; } my $auth = 'Mattia Barbon '; my $wx_ver = Module::Info->new_from_file( 'Wx.pm' )->version; my @ppms = ( { files => [ @bin ], package => 'Wx', version => $wx_ver, abstract => 'perl interface to the wxWigdets GUI library', author => $auth, }, { files => [ @dev ], package => 'Wx-dev', version => $wx_ver, abstract => 'developement files for wxPerl', author => $auth, }, ); foreach my $ppm ( @ppms ) { make_ppm( %$ppm ); } sub make_ppm { my %data = @_; my $tar = Archive::Tar->new; my $pack_ver = join ",", (split (/\./, $data{version}), (0) x 4) [0 .. 3]; my $author = $data{author}; $author =~ s//>/g; my $arch = $Config{archname} . ( $] >= 5.008 ? '-5.8' : '' ); my $base = $data{package} . '-' . $data{version}; my $tarfile = "$base-ppm.tar.gz"; my $ppdfile = "$base.ppd"; my $ppd = < $data{package} $data{abstract} $author EOT $tar->add_files( @{$data{files}} ); $tar->write( $tarfile, 9 ); local *PPD; open PPD, "> $ppdfile" or die "open '$ppdfile': $!"; binmode PPD; print PPD $ppd; close PPD; } exit 0; Wx-0.9923/script/make_typemap.pl000775000000000000 165312306612266 15012 0ustar00Mark000000000000#!/usr/bin/perl -w ############################################################################# ## Name: script/make_typemap.pl ## Purpose: Preprocess the typemap file ## Author: Mattia Barbon ## Modified by: ## Created: 27/03/2007 ## RCS-ID: $Id: make_typemap.pl 2050 2007-05-13 18:38:33Z mbarbon $ ## Copyright: (c) 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use Fatal qw(open close); open my $in, '<', $ARGV[0]; undef $/; $_ = <$in>; close $in; s{typemap\.tmpl}{typemap}; s{PERL_CLASS}'${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt}'g; s{CPP_CLASS}'${(my $t=$type)=~s/^Wx_/wx/;\$t}'g; open my $out, '>', $ARGV[1]; print $out $_; close $out; exit 0; Wx-0.9923/script/make_v_cback.pl000775000000000000 2735112306612266 14746 0ustar00Mark000000000000#!/usr/bin/perl -w ############################################################################# ## Name: script/make_v_cback.pl ## Purpose: Create the v_cback_def.h include ## Author: Mattia Barbon ## Modified by: ## Created: 19/08/2007 ## RCS-ID: $Id: make_v_cback.pl 3003 2011-02-13 13:05:48Z mbarbon $ ## Copyright: (c) 2007, 2011 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use Data::Dumper; my @macros = qw(DEC_V_CBACK_BOOL__BOOL DEF_V_CBACK_BOOL__BOOL DEC_V_CBACK_BOOL__INT DEF_V_CBACK_BOOL__INT DEF_V_CBACK_BOOL__INT_pure DEC_V_CBACK_BOOL__WXVARIANT_UINT_UINT DEF_V_CBACK_BOOL__WXVARIANT_UINT_UINT_pure DEC_V_CBACK_BOOL__SIZET DEF_V_CBACK_BOOL__SIZET DEF_V_CBACK_BOOL__SIZET_pure DEC_V_CBACK_BOOL__SIZET_SIZET DEF_V_CBACK_BOOL__SIZET_SIZET DEF_V_CBACK_BOOL__SIZET_SIZET_pure DEC_V_CBACK_BOOL__VOID DEC_V_CBACK_BOOL__VOID_const DEF_V_CBACK_BOOL__VOID DEF_V_CBACK_BOOL__VOID_const DEF_V_CBACK_BOOL__VOID_pure DEC_V_CBACK_BOOL__INT_INT DEC_V_CBACK_BOOL__INT_INT_const DEF_V_CBACK_BOOL__INT_INT DEF_V_CBACK_BOOL__INT_INT_pure DEF_V_CBACK_BOOL__INT_INT_const DEF_V_CBACK_BOOL__INT_INT_const_pure DEC_V_CBACK_DOUBLE__INT_INT DEC_V_CBACK_DOUBLE__INT_INT_const DEF_V_CBACK_DOUBLE__INT_INT DEF_V_CBACK_DOUBLE__INT_INT_pure DEF_V_CBACK_DOUBLE__INT_INT_const DEF_V_CBACK_DOUBLE__INT_INT_const_pure DEC_V_CBACK_INT__LONG_LONG DEC_V_CBACK_INT__LONG_LONG_const DEF_V_CBACK_INT__LONG_LONG DEF_V_CBACK_INT__LONG_LONG_pure DEF_V_CBACK_INT__LONG_LONG_const DEC_V_CBACK_INT__VOID DEF_V_CBACK_INT__VOID DEF_V_CBACK_INT__VOID_pure DEC_V_CBACK_LONG__INT_INT DEC_V_CBACK_LONG__INT_INT_const DEF_V_CBACK_LONG__INT_INT DEF_V_CBACK_LONG__INT_INT_pure DEF_V_CBACK_LONG__INT_INT_const DEF_V_CBACK_LONG__INT_INT_const_pure DEC_V_CBACK_UINT__VOID DEC_V_CBACK_UINT__VOID_const DEF_V_CBACK_UINT__VOID DEF_V_CBACK_UINT__VOID_const DEF_V_CBACK_UINT__VOID_pure DEF_V_CBACK_UINT__VOID_const_pure DEC_V_CBACK_VOID__INT_INT_LONG DEF_V_CBACK_VOID__INT_INT_LONG DEF_V_CBACK_VOID__INT_INT_LONG_pure DEC_V_CBACK_VOID__mWXVARIANT_UINT_UINT_const DEF_V_CBACK_VOID__mWXVARIANT_UINT_UINT_const_pure DEC_V_CBACK_VOID__SIZET_SIZET_const DEF_V_CBACK_VOID__SIZET_SIZET_const DEC_V_CBACK_WXCOORD__VOID_const DEF_V_CBACK_WXCOORD__VOID_const DEF_V_CBACK_WXCOORD__VOID_const_pure DEC_V_CBACK_WXCOORD__SIZET DEC_V_CBACK_WXCOORD__SIZET_const DEF_V_CBACK_WXCOORD__SIZET DEF_V_CBACK_WXCOORD__SIZET_const DEF_V_CBACK_WXCOORD__SIZET_pure DEF_V_CBACK_WXCOORD__SIZET_const_pure DEC_V_CBACK_WXSTRING__WXSTRING DEF_V_CBACK_WXSTRING__WXSTRING DEC_V_CBACK_WXSTRING__UINT DEC_V_CBACK_WXSTRING__UINT_const DEF_V_CBACK_WXSTRING__UINT DEF_V_CBACK_WXSTRING__UINT_const_pure DEC_V_CBACK_WXGRIDATTR__INT_INT_WXATTRKIND DEF_V_CBACK_WXGRIDATTR__INT_INT_WXATTRKIND ); my %type_map = ( BOOL => [ 'bool', 'SvTRUE( ret )', 'return false', 'bool p%d', 'b', 'p%d', 'p%d' ], SIZET => [ 'size_t', 'SvIV( ret )', 'return 0', 'size_t p%d', 'L', 'p%d', 'p%d' ], LONG => [ 'long', 'SvIV( ret )', 'return 0', 'long p%d', 'l', 'p%d', 'p%d' ], INT => [ 'int', 'SvIV( ret )', 'return 0', 'int p%d', 'i', 'p%d', 'p%d' ], UINT => [ 'unsigned int', 'SvUV( ret )', 'return 0', 'unsigned int p%d', 'I', 'p%d', 'p%d' ], WXCOORD => [ 'wxCoord', 'SvIV( ret )', 'return 0', 'wxCoord p%d', 'l', 'p%d', 'p%d' ], DOUBLE => [ 'double', 'SvNV( ret )', 'return 0.0', ], VOID => [ 'void', ';', , 'return', ], WXSTRING=> [ 'wxString','wxPli_sv_2_wxString( aTHX_ ret )', 'return wxEmptyString', 'const wxString& p%d', 'P', '&p%d', 'p%d' ], WXVARIANT=> [ 'wxVariant','wxPli_sv_2_wxvariant( aTHX_ ret )', 'return wxVariant()', 'const wxVariant& p%d', 'q', '&p%d, "Wx::Variant"', 'p%d' ], mWXVARIANT=> [ 'wxVariant','wxPli_sv_2_wxvariant( aTHX_ ret )', 'return wxVariant()', 'wxVariant& p%d', 'q', '&p%d, "Wx::Variant"', 'p%d' ], WXGRIDATTR=> [ 'wxGridCellAttr*', '(wxGridCellAttr*)wxPli_sv_2_object( aTHX_ ret, "Wx::GridCellAttr" )', 'return NULL', 'wxGridCellAttr* p%d', 'q', 'p%d, "Wx::GridCellAttr"', 'p%d' ], WXATTRKIND=> [ 'wxGridCellAttr::wxAttrKind', 'SvIV( ret )', 'return 0', 'wxGridCellAttr::wxAttrKind p%d', 'i', 'p%d', 'p%d' ], ); my %const_map = ( 0 => 'wxPli_NOCONST', 1 => 'wxPli_CONST', ); my %emitted; my @todo = map [ parse_macro( $_, \%type_map ) ], @macros; print <<'EOT'; // GENERATED FILE, DO NOT EDIT #ifndef _WXPERL_V_CBACK_DEF_H #define _WXPERL_V_CBACK_DEF_H EOT foreach my $todo ( @todo ) { my $args = join '_', @{$todo->[2]}; my( $c_args, $p_args, $b_args, $tymap ) = macro_call_args( $todo ); if( $todo->[0] eq 'DEC' && $todo->[1] eq 'VOID' ) { my $name = sprintf 'DEC_V_CBACK_VOID__%s_', $args; next if $emitted{$name}; $emitted{$name} = 1; printf <<'EOT', #define %s( RET, METHOD, CONST ) \ void METHOD(%s) CONST EOT $name, $c_args; } elsif( $todo->[0] eq 'DEC' ) { my $name = sprintf 'DEC_V_CBACK_ANY__%s_', $args; next if $emitted{$name}; $emitted{$name} = 1; printf <<'EOT', #define %s( RET, METHOD, CONST ) \ RET METHOD(%s) CONST EOT $name, $c_args; } elsif( $todo->[0] eq 'DEF' && $todo->[1] eq 'VOID' ) { my $name = sprintf 'DEF_V_CBACK_VOID__%s_', $args; next if $emitted{$name}; $emitted{$name} = 1; printf <<'EOT', #define %s( RET, CVT, CLASS, CALLBASE, METHOD, CONST ) \ void CLASS::METHOD(%s) CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxPliCCback( aTHX_ &m_callback, G_SCALAR|G_DISCARD, \ %s%s ); \ } \ else \ CALLBASE; \ } EOT $name, $c_args, $tymap, ( $p_args ? ", $p_args" : '' ); } elsif( $todo->[0] eq 'DEF' ) { my $name = sprintf 'DEF_V_CBACK_ANY__%s_', $args; next if $emitted{$name}; $emitted{$name} = 1; printf <<'EOT', #define %s( RET, CVT, CLASS, CALLBASE, METHOD, CONST ) \ RET CLASS::METHOD(%s) CONST \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, \ %s%s ) ); \ return CVT; \ } \ else \ CALLBASE; \ } EOT $name, $c_args, $tymap, ( $p_args ? ", $p_args" : '' ); } } foreach my $todo ( @todo ) { my $args = join '_', @{$todo->[2]}; my( $c_args, $p_args, $b_args, $tymap ) = macro_call_args( $todo ); my $const = $todo->[3]->{const} ? '_const' : ''; my $pure = $todo->[3]->{pure} ? '_pure' : ''; die 'No type name for ', $todo->[1] unless $type_map{$todo->[1]}[0]; die 'No type conversion for ', $todo->[1] unless $type_map{$todo->[1]}[1]; if( $todo->[0] eq 'DEC' && $todo->[1] eq 'VOID' ) { printf <<'EOT', #define DEC_V_CBACK_VOID__%s%s( METHOD ) \ DEC_V_CBACK_VOID__%s_( %s, METHOD, %s ) EOT $args, $const, $args, $type_map{$todo->[1]}[0], $const_map{$todo->[3]->{const}}; } elsif( $todo->[0] eq 'DEC' ) { printf <<'EOT', #define DEC_V_CBACK_%s__%s%s( METHOD ) \ DEC_V_CBACK_ANY__%s_( %s, METHOD, %s ) EOT $todo->[1], $args, $const, $args, $type_map{$todo->[1]}[0], $const_map{$todo->[3]->{const}}; } elsif( $todo->[0] eq 'DEF' && $todo->[1] eq 'VOID' ) { my $callbase = sprintf 'BASE::METHOD(%s)', $b_args; die 'No default value for pure function ', $todo->[1] if $todo->[3]{pure} && !$type_map{$todo->[1]}[2]; printf <<'EOT', #define DEF_V_CBACK_VOID__%s%s%s( CLASS, BASE, METHOD ) \ DEF_V_CBACK_VOID__%s_( %s, %s, CLASS, %s, METHOD, %s ) EOT $args, $const, $pure, $args, $type_map{$todo->[1]}[0], $type_map{$todo->[1]}[1], ( $todo->[3]{pure} ? $type_map{$todo->[1]}[2] : $callbase ), $const_map{$todo->[3]->{const}}; } elsif( $todo->[0] eq 'DEF' ) { my $callbase = sprintf 'return BASE::METHOD(%s)', $b_args; die 'No default value for pure function ', $todo->[1] if $todo->[3]{pure} && !$type_map{$todo->[1]}[2]; printf <<'EOT', #define DEF_V_CBACK_%s__%s%s%s( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__%s_( %s, %s, CLASS, %s, METHOD, %s ) EOT $todo->[1], $args, $const, $pure, $args, $type_map{$todo->[1]}[0], $type_map{$todo->[1]}[1], ( $todo->[3]{pure} ? $type_map{$todo->[1]}[2] : $callbase ), $const_map{$todo->[3]->{const}}; } } print <<'EOT'; #endif EOT sub parse_macro { my( $macro, $types ) = @_; my( $type, $ret, @args, %flags ); $flags{$_} = 0 foreach qw(const pure); my $tmp = $macro; $tmp =~ s/_const// and $flags{const} = 1; $tmp =~ s/_pure// and $flags{pure} = 1; $tmp =~ s/^DE([CF])_V_CBACK// and $type = 'DE' . $1; $tmp =~ s/^_([A-Za-z]+)__// and $ret = $1; @args = split '_', $tmp; die "Unable to parse '$macro'" unless @args && $ret; $types->{$_} or die "invalid type $_ in '$macro'" foreach $ret, @args; return ( $type, $ret, \@args, \%flags ); } sub macro_call_args { my( $todo ) = @_; my( $c_args, $p_args, $b_args, $tymap ); if( $todo->[2][0] eq 'VOID' ) { $c_args = $p_args = $b_args = ''; $tymap = 'NULL'; } else { my $c = 0; my( @cargs, @pargs, @bargs ); foreach my $idx ( 0 .. $#{$todo->[2]} ) { my $type = $todo->[2][$idx]; die 'Incomplete type definition for ', $type unless $type_map{$type}[3] && $type_map{$type}[4] && $type_map{$type}[5]; $cargs[$idx] = sprintf $type_map{$type}[3], $idx + 1; $tymap .= $type_map{$type}[4]; $pargs[$idx] = sprintf $type_map{$type}[5], $idx + 1; $bargs[$idx] = sprintf $type_map{$type}[6], $idx + 1; } $c_args = ' ' . join( ', ', @cargs ) . ' '; $p_args = join( ', ', @pargs ); $b_args = join( ', ', @bargs ); $tymap = qq{"$tymap"}; } return ( $c_args, $p_args, $b_args, $tymap ); } Wx-0.9923/script/pipe.pl000775000000000000 124012306612266 13263 0ustar00Mark000000000000#!/usr/bin/perl -w ############################################################################# ## Name: script/pipe.pl ## Purpose: redirects stderr to stdout and execs arguments ## Author: Mattia Barbon ## Modified by: ## Created: 13/12/2000 ## RCS-ID: $Id: pipe.pl 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# open STDERR, ">&STDOUT"; exec @ARGV; # Local variables: # # mode: cperl # # End: # Wx-0.9923/script/wxperl_overload000775000000000000 314612306612266 15137 0ustar00Mark000000000000#!/usr/bin/perl -w ############################################################################# ## Name: script/wxperl_overload ## Purpose: builds overload constants ## Author: Mattia Barbon ## Modified by: ## Created: 17/08/2001 ## RCS-ID: $Id: wxperl_overload 2335 2008-01-21 22:58:59Z mbarbon $ ## Copyright: (c) 2001-2003, 2005-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use FindBin; use strict; use lib "$FindBin::RealBin/../build"; =head1 NAME wxperl_overload - create overload declarations for wxPerl extensions =head1 SYNOPSIS # usually invoked from Makefile wxperl_overload <.cpp file> <.h file> files... wxperl_overload <.cpp file> <.h file> file.lst =head1 DOCUMENTATION This script if usually invoked from an C-generated file by using C in F. Scans the files given on the command line or listed in the F<.lst> file searching for wxPerl overload declarations. Writes a F<.h> file with matching F<.cpp> file containing the definition for wxPerl overload constants. =cut use Wx::Overload::Driver; my( $ovlc, $ovlh ) = ( shift, shift ); if( $ARGV[0] && $ARGV[0] =~ /\.lst$/ ) { # lame hack to read list from file open my $fh, "<", $ARGV[0] or die "$!"; @ARGV = map { chomp; $_ } <$fh>; } my $driver = Wx::Overload::Driver->new ( files => \@ARGV, header => $ovlh, source => $ovlc, ); $driver->process; exit 0; Wx-0.9923/script/wxperl_xspp000775000000000000 147212306612266 14316 0ustar00Mark000000000000#!/usr/bin/perl -w ############################################################################# ## Name: script/wxperl_xspp ## Purpose: XS++ preprocessor ## Author: Mattia Barbon ## Modified by: ## Created: 01/03/2003 ## RCS-ID: $Id: wxperl_xspp 2700 2009-12-13 11:25:50Z mbarbon $ ## Copyright: (c) 2003-2004, 2006, 2008-2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use ExtUtils::XSpp::Cmd; =head1 NAME wxperl_xspp - XS++ preprocessor =head1 SYNOPSIS wxperl_xspp [--typemap=typemap.xsp [--typemap=typemap2.xsp]] Foo.xsp =head1 DOCUMENTATION See L. =cut exit xspp; Wx-0.9923/t/000775000000000000 012316265011 10641 5ustar00Mark000000000000Wx-0.9923/t/01_load.t000775000000000000 112212306612265 12332 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Test::More tests => 6; BEGIN { use_ok 'Wx' } use Wx 'wxYES'; my $x = wxYES; ok( 1, "Exported constant" ); SKIP: { use Wx qw(:frame :allclasses wxNO_3D wxTAB_TRAVERSAL); $x = wxTAB_TRAVERSAL(); $x = wxCAPTION(); ok( 1, "Export list with :allclasses" ); ok( Wx::HtmlWindow->isa( 'Wx::Window' ), "Wx::Html was loaded" ); } eval "use Wx qw(wxNO_SUCH_CONSTANT)"; ok( $@, "Error exporting missing constant: $@" ); eval "Wx::wxNO_SUCH_CONSTANT()"; ok( $@, "Error autoloading missing constant: $@" ); # Local variables: # # mode: cperl # # End: # Wx-0.9923/t/02_inheritance.t000775000000000000 37512306612265 13676 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; BEGIN { require Wx::ArtProvider if Wx::wxVERSION >= 2.005002; } use lib './t'; use Test::More 'no_plan'; use Tests_Helper qw(:inheritance); test_inheritance_all(); # Local variables: # # mode: cperl # # End: # Wx-0.9923/t/03_event.t000775000000000000 631612306612265 12550 0ustar00Mark000000000000#!/usr/bin/perl -w # tests the ability of sending events directly # to windows use strict; use Wx; use lib './t'; use Test::More 'tests' => 17; use Tests_Helper qw(test_frame); test_frame( 'MyFrame' ); package MyEvent; use base 'Wx::PlCommandEvent'; our $destroyed; BEGIN { $destroyed = 0 }; sub DESTROY { $destroyed++; # print "D: $_[0]\n"; $_[0]->SUPER::DESTROY; } sub Clone { my( $self ) = @_; my $class = ref $self; # my $c = $class->new( $self->GetEventType, $self->GetId ); print "C: $c\n"; return $c; return $class->new( $self->GetEventType, $self->GetId ); } package MyFrame; use base 'Wx::Frame'; use Wx::Event qw(EVT_BUTTON); sub new { my $class = shift; my $this = $class->SUPER::new( undef, -1, 'Test' ); my $button = Wx::Button->new( $this, -1, 'Button' ); my $var = 0; EVT_BUTTON( $this, $button, sub { my( $this, $evt ) = @_; $var = 1; } ); { my $event = Wx::CommandEvent->new( &Wx::wxEVT_COMMAND_BUTTON_CLICKED, $button->GetId() ); $button->GetEventHandler->ProcessEvent( $event ); } main::ok( $var, "event succesfully received" ); main::is( $MyEvent::destroyed, 0, "no object destroyed" ); $var = 0; { my $event = MyEvent->new( &Wx::wxEVT_COMMAND_BUTTON_CLICKED, $button->GetId() ); $button->GetEventHandler->ProcessEvent( $event ); main::is( $MyEvent::destroyed, 0, "still no object destroyed" ); } main::ok( $var, "event succesfully received" ); main::is( $MyEvent::destroyed, 1, "one event destroyed" ); $var = 0; { my $event = MyEvent->new( &Wx::wxEVT_COMMAND_BUTTON_CLICKED, $button->GetId() ); # print "E: $event\n"; $button->GetEventHandler->AddPendingEvent( $event ); main::is( $MyEvent::destroyed, 1, "still one event destroyed" ); } main::is( $MyEvent::destroyed, 2, "original event destroyed" ); main::ok( !$var, "event not received before yield" ); Wx::wxTheApp->ProcessPendingEvents; main::ok( $var, "event received after yield" ); main::is( $MyEvent::destroyed, 3, "cloned event destroyed" ); $var = 0; EVT_BUTTON( $this, $button, undef ); { my $event = MyEvent->new( &Wx::wxEVT_COMMAND_BUTTON_CLICKED, $button->GetId() ); } main::is( $MyEvent::destroyed, 4 ); { my $event = MyEvent->new( &Wx::wxEVT_COMMAND_BUTTON_CLICKED, $button->GetId() ); $button->GetEventHandler->ProcessEvent( $event ); } main::ok( !$var, "event handler disconnected" ); main::is( $MyEvent::destroyed, 5 ); $var = 0; { my $event = MyEvent->new( &Wx::wxEVT_COMMAND_BUTTON_CLICKED, $button->GetId() ); $button->GetEventHandler->AddPendingEvent( $event ); } main::is( $MyEvent::destroyed, 6, "original event destroyed" ); main::ok( !$var, "event not received before yield" ); Wx::wxTheApp->ProcessPendingEvents; main::ok( !$var, "event not received after yield" ); main::is( $MyEvent::destroyed, 7, "cloned event destroyed" ); $this->Destroy; } # Local variables: # # mode: cperl # # End: # Wx-0.9923/t/04_userdata.t000775000000000000 2347712306612265 13267 0ustar00Mark000000000000#!/usr/bin/perl -w # test for client data handling in various controls use strict; use Wx; use lib './t'; use Tests_Helper qw(in_frame); use Wx::Event qw(EVT_BUTTON); package MyClass; sub new { my $class = shift; my $code = shift; die "want a CODE reference" unless ref $code eq 'CODE'; return bless [ $code ], $class; } sub DESTROY { &{$_[0][0]} } package main; use Test::More 'tests' => 65; use strict; #use base 'Wx::Frame'; use vars '$TODO'; sub tdata($) { Wx::TreeItemData->new( MyClass->new( $_[0] ) ) } sub cdata($) { MyClass->new( $_[0] ) } sub tests { my $this = shift; ############################################################################ # wxTreeCtrl ############################################################################ my $tree = Wx::TreeCtrl->new( $this, -1 ); my $root = $tree->AddRoot( 'Root', -1, -1, Wx::TreeItemData->new( 'Frobnicate' ) ); my $trdata = $tree->GetItemData( $root ); my $data = $trdata->GetData(); is( $data, 'Frobnicate', "Wx::TreeItemData::GetData" ); $data = $trdata->GetData(); is( $data, 'Frobnicate', "Wx::TreeItemData::GetData (again)" ); $data = $tree->GetPlData( $root ); is( $data, 'Frobnicate', "Wx::TreeCtrl::GetPlData" ); $trdata = $tree->GetItemData( $root ); $trdata->SetData( 'Baz' ); $trdata = $tree->GetItemData( $root ); $data = $trdata->GetData(); is( $data, 'Baz', "Wx::TreeItemData::SetData" ); $tree->SetItemData( $root, Wx::TreeItemData->new( 'Boo' ) ); $data = $tree->GetPlData( $root ); is( $data, 'Boo', "Wx::TreeCtrl::SetItemData" ); $tree->SetPlData( $root, 'XyZ' ); $data = $tree->GetPlData( $root ); is( $data, 'XyZ', "Wx::TreeCtrl::SetPlData" ); # test deleting and setting again my( $deleting, $setting, $ctrldelete ) = ( 0, 0, 0 ); my $item1 = $tree->AppendItem( $root, 'An item', -1, -1, tdata sub { $deleting = 1 } ); my $item2 = $tree->AppendItem( $root, 'An item', -1, -1, tdata sub { $setting = 1 } ); my $item3 = $tree->AppendItem( $root, 'An item', -1, -1, tdata sub { $ctrldelete = 1 } ); $tree->Delete( $item1 ); ok( $deleting, 'WxTreeCtrl: deleting an item deletes the data' ); $tree->SetItemData( $item2, Wx::TreeItemData->new( 'foo' ) ); ok( $setting, 'Wx::TreeCtrl: setting again item data deletes old data' ); # and hope the tree is deleted NOW $tree->Destroy; ok( $ctrldelete, 'Wx::TreeCtrl: deleting the tree deletes the data' ); ############################################################################ # wxTreeListCtrl ############################################################################ SKIP: { skip 'No Native Wx::TreeListCtrl', 8 unless defined(&Wx::TreeListCtrl::new); my $treelist = Wx::TreeListCtrl->new( $this, -1, ); $treelist->AppendColumn("Component", &Wx::wxCOL_WIDTH_AUTOSIZE, &Wx::wxALIGN_LEFT, &Wx::wxCOL_RESIZABLE | &Wx::wxCOL_SORTABLE); $treelist->AppendColumn("# Files", $treelist->WidthFor("1,000,000"), &Wx::wxALIGN_RIGHT, &Wx::wxCOL_RESIZABLE | &Wx::wxCOL_SORTABLE); $treelist->AppendColumn("Size", $treelist->WidthFor("1,000,000 KiB"), &Wx::wxALIGN_RIGHT, &Wx::wxCOL_RESIZABLE | &Wx::wxCOL_SORTABLE); my $tlroot = $treelist->GetRootItem(); ok( $tlroot->IsOk, 'Wx::TreeListCtrl Root item OK'); my $tldata = \'Hubris'; $treelist->SetItemData($tlroot, $tldata); my $outdata = $treelist->GetItemData($tlroot); is( $$outdata, 'Hubris', "Wx::TreeListCtrl::GetItemData" ); $outdata = $treelist->GetItemData($tlroot); is( $$outdata, 'Hubris', "Wx::TreeListCtrl::GetItemData again" ); $treelist->SetItemData($tlroot, Wx::TreeItemData->new( 'Aghast' ) ); $outdata = $treelist->GetItemData($tlroot)->GetData; is( $outdata, 'Aghast', "Wx::TreeListCtrl::GetItemData From Wx::TreeItemData" ); ## test deleting and setting again my( $tldeleting, $tlsetting, $tlctrldelete ) = ( 0, 0, 0 ); my $tlitem1 = $treelist->AppendItem( $tlroot, 'An item', -1, -1, cdata sub { $tldeleting = 1 } ); my $tlitem2 = $treelist->AppendItem( $tlroot, 'An item', -1, -1, cdata sub { $tlsetting = 1 } ); my $tlitem3 = $treelist->AppendItem( $tlroot, 'An item', -1, -1, cdata sub { $tlctrldelete = 1 } ); is( ref($treelist->GetItemData($tlitem1)), 'MyClass', 'Wx::TreeListCtrl Item Data is class'); $treelist->DeleteItem( $tlitem1 ); ok( $tldeleting, 'Wx::TreeListCtrl: deleting an item deletes the data' ); $treelist->SetItemData( $tlitem2, Wx::TreeItemData->new( 'foo' ) ); ok( $tlsetting, 'Wx::TreeListCtrl: setting again item data deletes old data' ); ## and hope the tree is deleted NOW $treelist->Destroy; ok( $tlctrldelete, 'Wx::TreeListCtrl: deleting the tree deletes the data' ); }; ############################################################################ # wxListBox & co. ############################################################################ my $list = Wx::ListBox->new( $this, -1 ); my $combo = Wx::ComboBox->new( $this, -1, 'foo' ); my $choice = Wx::Choice->new( $this, -1 ); my $checklist = Wx::CheckListBox->new( $this, -1, [-1, -1], [-1, -1], [1] ); my $odncombo = undef; if( defined &Wx::PlOwnerDrawnComboBox::new ) { $odncombo = Wx::PlOwnerDrawnComboBox->new( $this, -1, 'foo', [-1, -1], [-1, -1], [] ); } # test deleting and setting again for my $x ( [ $list, 'Wx::ListBox' ], [ $choice, 'Wx::Choice' ], [ $combo, 'Wx::ComboBox' ], [ $checklist, 'Wx::CheckListBox' ], [ $odncombo, 'Wx::OwnerDrawnComboBox' ], ) { SKIP: { my( $list, $name ) = @$x; ( $deleting, $setting, $ctrldelete ) = ( 0, 0, 0 ); skip( $x->[1] . ": not available", 8 ) if !defined $x->[0]; skip( "wxMSW wxCheckListBox can't store client data yet", 8 ) if Wx::wxMSW && $name eq 'Wx::CheckListBox'; $list->Clear; # diag "starting tests for $name"; my $data = 'Foo'; $list->Append( 'An item', $data ); $list->SetClientData( 0, $data ); # workaround bug in HEAD $list->Append( 'An item' ); $data = 'Frobnication'; is( $list->GetClientData( 0 ), 'Foo', "$name: some client data" ); is( $list->GetClientData( 1 ), undef, "$name: no client data" ); $list->SetClientData( 0, 'Bar' ); $list->SetClientData( 1, 'Baz' ); is( $list->GetClientData( 0 ), 'Bar', "$name: setting client data" ); is( $list->GetClientData( 1 ), 'Baz', "$name: setting client data (again)" ); my $x = 1; $list->SetClientData( 0, \$x ); $x = 2; is( ${$list->GetClientData( 0 )}, 2, "$name: client data is a reference" ); $list->Append( 'An item', cdata sub { $setting = 1 } ); $list->Append( 'An item', cdata sub { $ctrldelete = 1 } ); $list->Append( 'An item', cdata sub { $deleting = 1 } ); SKIP: { skip "delayed on Mac", 1 if Wx::wxMAC && $list->isa( 'Wx::ListBox' ); $list->Delete( 4 ); ok( $deleting, "$name: deleting an item deletes the data" ); } $list->SetClientData( 2, 'foo' ); ok( $setting, "$name: setting again item data deletes old data" ); # and hope the control is deleted NOW $list->Destroy; TODO: { local $TODO = "is it correct to skip as below ? - Fails on osx-cocoa & 2.9.2 all platforms?"; # skip "delete delayed", 1 if ( $list->isa( 'Wx::ListBox' ) || $list->isa( 'Wx::ComboBox' ) || $list->isa( 'Wx::Choice' ) ); ok( $ctrldelete, "$name: deleting the control deletes the data" ); }; } } ############################################################################ # wxListCtrl ############################################################################ my $listctrl = Wx::ListCtrl->new( $this, -1, [-1, -1], [-1, -1], Wx::wxLC_REPORT() ); $listctrl->InsertColumn( 1, "Type" ); $listctrl->InsertStringItem( 0, 'text0' ); $listctrl->InsertStringItem( 1, 'text1' ); $listctrl->InsertStringItem( 2, 'text2' ); $listctrl->SetItemData( 0, 123 ); $listctrl->SetItemData( 1, 456 ); $listctrl->SetItemData( 2, 789 ); is( $listctrl->GetItemData( 0 ), 123, "Wx::ListCtrl first item data" ); is( $listctrl->GetItemData( 1 ), 456, "Wx::ListCtrl second item data" ); is( $listctrl->GetItemData( 2 ), 789, "Wx::ListCtrl third item data" ); $listctrl->SetItemData( 1, 135 ); is( $listctrl->GetItemData( 1 ), 135, "Wx::ListCtrl, changing item data" ); ############################################################################ # wxToolBar ############################################################################ my $toolbar = Wx::ToolBar->new( $this, -1); my $tool = $toolbar->AddTool(Wx::wxID_ANY(), Wx::Bitmap->new(16,16,1)); $tool = $toolbar->AddTool(Wx::wxID_ANY(), Wx::Bitmap->new(16,16,1)); my $toolid = $tool->GetId; isnt($toolid, -1, 'Wx::ToolBar got valid tool id'); $toolbar->SetToolClientData( $toolid, 'Bar' ); is( $toolbar->GetToolClientData( $toolid ), 'Bar', 'Wx::ToolBar client data set'); $toolbar->Realize; $ctrldelete = 0; $toolbar->SetToolClientData( $toolid, cdata( sub { $ctrldelete = 1 } )); ok( $ctrldelete == 0, 'Wx::ToolBar controldata not deleted' ); $toolbar->SetToolClientData( $toolid, undef ); ok( $ctrldelete, 'Wx::ToolBar - setting client data causes previous data deletion' ); } in_frame( \&tests ); # local variables: # mode: cperl # end: Wx-0.9923/t/05_timer.t000775000000000000 240612306612265 12545 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib './t'; use Test::More Wx::wxMAC() ? ( 'skip_all' => 'Hangs on wxMac' ) : ( 'tests' => 2 ); use Tests_Helper qw(test_app); # test with Notify package MyTimer; use vars qw(@ISA); @ISA = qw(Wx::Timer); sub Notify { main::ok( 1, "Overriding Notify works" ); } package main; # test with owner package MyHandler; use base qw(Wx::EvtHandler); use Wx::Event qw(EVT_TIMER); sub new { my $class = shift; my $this = $class->SUPER::new( @_ ); EVT_TIMER( $this, -1, \&OnTimer ); return $this; } sub OnTimer { main::ok( 1, "EVT_TIMER works" ); my $frame = Wx::wxTheApp()->GetTopWindow; $frame->{T1}->Destroy; $frame->{T2}->Destroy; $frame->Destroy; Wx::WakeUpIdle; } package MyFrame; use base qw(Wx::Frame); sub new { my $class = shift; my $this = $class->SUPER::new( @_ ); my $timer2 = Wx::Timer->new( MyHandler->new ); $timer2->Start( 800, 1 ); my $timer1 = MyTimer->new; $timer1->Start( 100, 1 ); $this->{T1} = $timer1; $this->{T2} = $timer2; return $this; } package main; my $app = test_app( sub { MyFrame->new( undef, -1, 'boo' )->Show( 1 ); } ); $app->MainLoop; # Local variables: # # mode: cperl # # End: # Wx-0.9923/t/06_loadxpm.t000775000000000000 154612306612265 13076 0ustar00Mark000000000000#!/usr/bin/perl -w BEGIN { print "1..2\n"; } use strict; use Wx; use lib './t'; use Tests_Helper qw(test_app); my $data = [ map { m/^"(.*)"/ ? ( $1 ) : () } split /\n/, <<'EOT' ]; /* XPM */ static char * wxpl16_xpm[] = { "16 16 5 1", " c None", ". c Gray100", "X c Red", "o c Yellow", "O c Blue", " ", " ........... ", " .XXXXXXXXX. ", " .XXXXXXXXX. ", " .XXXX......... ", " .XXXX.ooooooo. ", " .XXXX.ooooooo. ", " .X........ooo. ", " ...OOOOOO.ooo. ", " .OOOOOO.ooo. ", " .OOOOOO.ooo. ", " .OOOOOO.ooo. ", " ........ooo. ", " .ooooooo. ", " ......... ", " "}; EOT test_app( sub { my $xpm = Wx::Bitmap->newFromXPM( $data ); print +( $xpm->Ok ? "ok" : "not ok" ), "\n"; print +( $xpm->GetWidth == 16 ? "ok" : "not ok" ), "\n"; } ); # local variables: # mode: cperl # end: Wx-0.9923/t/07_overload.t000775000000000000 1137012306612265 13262 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib './t'; use Tests_Helper qw(test_app); use Test::More 'tests' => 110; my $undef = undef; my $app = test_app( sub { 1 } ); for my $i ( [ \&Wx::_match, 'match' ], [ \&Wx::_xsmatch, 'xsmatch' ] ) { my( $m, $t ) = @$i; local *xx = $m; # some simple cases ok( xx( [ [] ], $Wx::_arr ), "$t: match an array" ); ok( xx( [ [], 1 ], $Wx::_arr ), "$t: more arguments than in prototype" ); ok( !xx( [ '' ], $Wx::_arr ), "$t: wrong arguments" ); ok( xx( [ [] ], $Wx::_arr ), "$t: match with required arguments" ); ok( !xx( [ [], 1 ], $Wx::_arr, 1 ), "$t: don't match with more than required" ); ok( xx( [ [] ], $Wx::_arr, 1, 1 ), "$t: match with required arguments and allow_more" ); ok( xx( [ [], 1 ], $Wx::_arr, 1, 1 ), "$t: match with more than required and allow_more" ); # tests for boolean ok( xx( [ [] ], $Wx::_b ), "$t: boolean matches reference" ); ok( xx( [ 1 ], $Wx::_b ), "$t: boolean matches integer" ); ok( xx( [ 0 ], $Wx::_b ), "$t: boolean matches zero" ); ok( xx( [ undef ], $Wx::_b ), "$t: boolean matches literal undef" ); ok( xx( [ $undef ], $Wx::_b ), "$t: boolean matches undefined variable" ); ok( xx( [ 'foo' ], $Wx::_b ), "$t: boolean matches string" ); # test for string ok( xx( [ [] ], $Wx::_s ), "$t: string matches reference" ); ok( xx( [ 1 ], $Wx::_s ), "$t: string matches integer" ); ok( xx( [ 0 ], $Wx::_s ), "$t: string matches zero" ); ok( xx( [ undef ], $Wx::_s ), "$t: string matches literal undef" ); ok( xx( [ $undef ], $Wx::_s ), "$t: string matches undefined variable" ); ok( xx( [ 'foo' ], $Wx::_s ), "$t: string matches string" ); # test for number ok( !xx( [ [] ], $Wx::_n ), "$t: number does not match reference" ); ok( xx( [ 1 ], $Wx::_n ), "$t: number matches integer" ); ok( xx( [ 0 ], $Wx::_n ), "$t: number matches zero" ); ok( xx( [ 1.2 ], $Wx::_n ), "$t: number matches floating point" ); ok( xx( [ 0.0 ], $Wx::_n ), "$t: number matches floating point zero" ); ok( !xx( [ undef ], $Wx::_n ), "$t: number does not match literal undef" ); ok( !xx( [ $undef ], $Wx::_n ), "$t: number does not match undefined variable" ); ok( !xx( [ 'foo' ], $Wx::_n ), "$t: number does not match string" ); # test Wx::Sizer ok( !xx( [ [] ], $Wx::_wszr ), "$t: Wx::Sizer does not match reference" ); ok( !xx( [ 1 ], $Wx::_wszr ), "$t: Wx::Sizer does not match integer" ); ok( !xx( [ 0 ], $Wx::_wszr ), "$t: Wx::Sizer does not match zero" ); ok( xx( [ undef ], $Wx::_wszr ), "$t: Wx::Sizer matches literal undef" ); ok( xx( [ $undef ], $Wx::_wszr ), "$t: Wx::Sizer matches undefined variable" ); ok( !xx( [ 'foo' ], $Wx::_wszr ), "$t: Wx::Sizer does not match string" ); ok( xx( [ Wx::BoxSizer->new( Wx::wxVERTICAL() ) ], $Wx::_wszr ), "$t: Wx::Sizer matches Wx::Sizer" ); # test Wx::Image ok( !xx( [ [] ], $Wx::_wimg ), "$t: Wx::Image does not match reference" ); ok( !xx( [ 1 ], $Wx::_wimg ), "$t: Wx::Image does not match integer" ); ok( !xx( [ 0 ], $Wx::_wimg ), "$t: Wx::Image does not match zero" ); ok( xx( [ undef ], $Wx::_wimg ), "$t: Wx::Image matches literal undef" ); ok( xx( [ $undef ], $Wx::_wimg ), "$t: Wx::Image matches undefined variable" ); ok( !xx( [ 'foo' ], $Wx::_wimg ), "$t: Wx::Image does not match string" ); ok( xx( [ Wx::Image->new( 1, 2 ) ], $Wx::_wimg ), "$t: Wx::Image matches Wx::Image" ); # test for Wx::Point/Wx::Size ok( xx( [ [] ], $Wx::_wpoi ), "$t: Wx::Point matches ARRAY reference" ); ok( !xx( [ {} ], $Wx::_wpoi ), "$t: Wx::Point does not match other reference" ); ok( !xx( [ 1 ], $Wx::_wpoi ), "$t: Wx::Point does not match integer" ); ok( !xx( [ 0 ], $Wx::_wpoi ), "$t: Wx::Point does not match zero" ); ok( xx( [ $undef ], $Wx::_wpoi ), "$t: Wx::Point matches undefined variable" ); ok( !xx( [ 'foo' ], $Wx::_wpoi ), "$t: Wx::Point does not match string" ); ok( xx( [ Wx::Point->new( 1, 1 ) ], $Wx::_wpoi ), "$t: Wx::Point matches Wx::Point" ); ok( xx( [ Wx::Size->new( 1, 2 ) ], $Wx::_wsiz ), "$t: Wx::Size matches Wx::Size" ); # test for Wx::Input/OutputStream ok( xx( [ [], 1 ], $Wx::_wist_n ), "$t: Wx::InputStream matches references" ); ok( xx( [ {}, 1 ], $Wx::_wist_n ), "$t: Wx::InputStream matches references (again)" ); ok( !xx( [ 1, 1 ], $Wx::_wist_n ), "$t: Wx::InputStream does not match integer" ); ok( !xx( [ 'foo', 1 ], $Wx::_wist_n ), "$t: Wx::InputStream does not match string" ); ok( xx( [ undef, 1 ], $Wx::_wist_n ), "$t: Wx::InputStream matches undef" ); ok( xx( [ *main::bar, 1 ], $Wx::_wist_n ), "$t: Wx::InputStream matches typeglobs" ); *main::bar = *main::bar; # fool warning } Wx-0.9923/t/08_ovl_func.t000775000000000000 13364312306612265 13313 0ustar00Mark000000000000#!/usr/bin/perl -w # test that overload dispatch works for # specific functions use strict; use Wx; use lib './t'; use Test::More 'tests' => 230; use Tests_Helper qw(test_app :overload); use Fatal qw(open); my $nolog = Wx::LogNull->new; Wx::InitAllImageHandlers; test_app( sub { my $frame = Wx::Frame->new( undef, -1, 'a' ); my $bmpok = Wx::Bitmap->new( 'wxpl.ico', Wx::wxBITMAP_TYPE_ICO() ); my $imgok = Wx::Image->new( 'wxpl.ico', Wx::wxBITMAP_TYPE_ICO() ); my $icook = Wx::GetWxPerlIcon(); die unless $bmpok->Ok; die unless $imgok->Ok; die unless $icook->Ok; ############################################################################## # Wx::Brush ############################################################################## { my( $newbmp, $newcol, $newname ) = ( 0, 0, 0 ); my( $scrgb, $sccol, $scname ) = ( 0, 0, 0 ); hijack( 'Wx::Brush::newBitmap' => sub { $newbmp = 1 }, 'Wx::Brush::newColour' => sub { $newcol = 1 }, 'Wx::Brush::newName' => sub { $newname = 1 }, 'Wx::Brush::SetColourRGB' => sub { $scrgb = 1 }, 'Wx::Brush::SetColourColour' => sub { $sccol = 1 }, 'Wx::Brush::SetColourName' => sub { $scname = 1 } ); Wx::Brush->new( Wx::Bitmap->new( 1, 1, 1 ) ); ok( $newbmp, 'Wx::Brush::newBitmap' ); Wx::Brush->new( Wx::wxRED(), 1 ); ok( $newcol, 'Wx::Brush::newColour' ); my $b = Wx::Brush->new( 'red', 2 ); ok( $newname, 'Wx::Brush::newName' ); $b->SetColour( 1, 2, 3 ); ok( $scrgb, 'Wx::Brush::SetColourRGB' ); $b->SetColour( Wx::wxRED() ); ok( $sccol, 'Wx::Brush::SetColourColour' ); $b->SetColour( 'red' ); ok( $scname, 'Wx::Brush::SetColourName' ); } ############################################################################## # Wx::Bitmap & Wx::Mask ############################################################################## { my( $newbmp, $newbmpn, $newbmpcol ) = ( 0, 0, 0 ); my( $newempty, $newfile, $newicon, $newimage ) = ( 0, 0, 0, 0 ); hijack( 'Wx::Mask::newBitmapColour' => sub { $newbmpcol = 1 }, 'Wx::Mask::newBitmapIndex' => sub { $newbmpn = 1 }, 'Wx::Mask::newBitmap' => sub { $newbmp = 1 }, 'Wx::Bitmap::newEmpty' => sub { $newempty = 1 }, 'Wx::Bitmap::newFile' => sub { $newfile = 1 }, 'Wx::Bitmap::newIcon' => sub { $newicon = 1 }, 'Wx::Bitmap::newImage' => sub { $newimage = 1 }, ); my $bitmap = Wx::Bitmap->new( 1, 1, 1 ); ok( $newempty, "Wx::Bitmap::newEmpty" ); Wx::Bitmap->new( 'demo/data/logo.jpg', Wx::wxBITMAP_TYPE_JPEG() ); ok( $newfile, "Wx::Bitmap::newFile" ); Wx::Bitmap->new( $icook ); ok( $newicon, "Wx::Bitmap::newIcon" ); Wx::Bitmap->new( Wx::Image->new( 1, 1 ) ); ok( $newimage, "Wx::Bitmap::newImage" ); Wx::Mask->new( $bmpok, Wx::Colour->new( 'red' ) ); ok( $newbmpcol,"Wx::Mask::newBitmapColour" ); SKIP: { skip "Does not work on wxGTK, wxMAC, wxX11 and wxMOTIF", 1 if Wx::wxGTK() || Wx::wxX11() || Wx::wxMOTIF() || Wx::wxMAC(); Wx::Mask->new( $bmpok, 0 ); ok( $newbmpn, "Wx::Mask::newBitmapIndex" ); } # does not work: colour bitmap # Wx::Mask->new( $bitmap ); # ok( $newbmp, "Wx::Mask::newBitmap" ); } ############################################################################## # Wx::Colour ############################################################################## { my( $newrgb, $newname ) = ( 0, 0 ); hijack( 'Wx::Colour::newRGB' => sub { $newrgb = 1 }, 'Wx::Colour::newName' => sub { $newname = 1 } ); Wx::Colour->new( 1, 2, 3 ); ok( $newrgb, "Wx::Colour::newRGB" ); Wx::Colour->new( 'red' ); ok( $newname, "Wx::Colour::newName" ); } ############################################################################## # Wx::Caret ############################################################################## { my( $newwh, $newsize, $movepoint, $movexy, $setsizesize, $setsizewh ) = ( 0, 0, 0, 0, 0, 0 ); hijack( 'Wx::Caret::newWH' => sub { $newwh = 1 }, 'Wx::Caret::newSize' => sub { $newsize = 1 }, 'Wx::Caret::MovePoint' => sub { $movepoint = 1 }, 'Wx::Caret::MoveXY' => sub { $movexy = 1 }, 'Wx::Caret::SetSizeSize' => sub { $setsizesize = 1 }, 'Wx::Caret::SetSizeWH' => sub { $setsizewh = 1 } ); my $caret = Wx::Caret->new( Wx::Window->new( $frame, -1 ), 1, 1 ); ok( $newwh, "Wx::Caret::newWH" ); Wx::Caret->new( Wx::Window->new( $frame, -1 ), [ 1, 1 ] ); ok( $newsize, "Wx::Caret::newSize" ); $caret->Move( [ 1, 1 ] ); ok( $movepoint, "Wx::Caret::MovePoint" ); Wx::Caret->new( Wx::Window->new( $frame, -1 ), 1, 1 )->Move( 1, 1 ); ok( $movexy, "Wx::Caret::MoveXY" ); $caret->SetSize( [ 1, 1 ] ); ok( $setsizesize, "Wx::Caret::SetSizeSize" ); $caret->SetSize( 1, 1 ); ok( $setsizewh, "Wx::Caret::SetSizeWH" ); } ############################################################################## # Wx::ControlWithItems/Wx::ComboBox ############################################################################## { my( $cwiappendstr, $cwiappenddata, $cwiappenditems, $cbappendstr, $cbappenddata, $cbsetselectionN, $cbsetselectionNN, $cwiappenditemsdata, $cwiinsertitemsdata, $cwiinsertitems, $cwiinsertdata, $cwiinsertstr, $cwisetitemsdata, $cwisetitems, $cwifindstringc, $cwifindstringnoc ); my $good_combo = 'Wx::ComboBox'->isa( 'Wx::Choice' ); hijack( 'Wx::ControlWithItems::AppendString' => sub { $cwiappendstr = 1 }, 'Wx::ControlWithItems::AppendData' => sub { $cwiappenddata = 1 }, 'Wx::ControlWithItems::AppendItems' => sub { $cwiappenditems = 1 }, ( Wx::wxVERSION() >= 2.009 ? ( 'Wx::ControlWithItems::AppendItemsData' => sub { $cwiappenditemsdata = 1 }, 'Wx::ControlWithItems::InsertItemsData' => sub { $cwiinsertitemsdata = 1 }, 'Wx::ControlWithItems::InsertItems' => sub { $cwiinsertitems = 1 }, 'Wx::ControlWithItems::InsertData' => sub { $cwiinsertdata = 1 }, 'Wx::ControlWithItems::InsertString' => sub { $cwiinsertstr = 1 }, 'Wx::ControlWithItems::SetItemsData' => sub { $cwisetitemsdata = 1 }, 'Wx::ControlWithItems::SetItems' => sub { $cwisetitems = 1 } ) : () ), ( $good_combo ? () : ( 'Wx::ComboBox::AppendString' => sub { $cbappendstr = 1 }, 'Wx::ComboBox::AppendData' => sub { $cbappenddata = 1 } ) ), 'Wx::ComboBox::SetMark' => sub { $cbsetselectionNN = 1 }, ( !Wx::wxMAC() ? ( 'Wx::ComboBox::SetSelectionN' => sub { $cbsetselectionN = 1 } ) : () ), ( Wx::wxVERSION() >= 2.007002 ? ( 'Wx::ControlWithItems::FindStringCase' => sub { $cwifindstringc = 1 } ) : () ), 'Wx::ControlWithItems::FindStringNoCase' => sub { $cwifindstringnoc = 1 }, ); my $cwi = Wx::ListBox->new( $frame, -1 ); my $cb = Wx::ComboBox->new( $frame, -1, 'bar' ); $cwi->FindString( 'a' ); ok( $cwifindstringnoc,"Wx::ControlWithItems::FindStringNoCase" ); $cwi->FindString( 'a', 0 ); ok( $cwifindstringc, "Wx::ControlWithItems::FindStringCase" ); $cwi->Append( 'a' ); ok( $cwiappendstr, "Wx::ControlWithItems::AppendString" ); $cwi->Append( 'a', {} ); ok( $cwiappenddata, "Wx::ControlWithItems::AppendData" ); $cwi->Append( [ 'c', 'd', 'e' ] ); ok( $cwiappenditems, "Wx::ControlWithItems::AppendItems" ); if( Wx::wxVERSION() >= 2.009 ) { $cwi->Append( [ 'c', 'd', 'e' ], [ 1, 2, 3 ] ); $cwi->Insert( [ 'c', 'd', 'e' ], 2, [ 1, 2, 3 ] ); $cwi->Insert( [ 'c', 'd', 'e' ], 3 ); $cwi->Insert( 'w', 4, 7 ); $cwi->Insert( 'w', 5 ); $cwi->Set( [ 'c', 'd', 'e' ], [ 1, 2, 3 ] ); $cwi->Set( [ 'w', 'x', 'y' ] ); } else { ( $cwiappenditems, $cwiappenditemsdata, $cwiinsertitemsdata, $cwiinsertitems, $cwiinsertdata, $cwiinsertstr, $cwisetitemsdata, $cwisetitems ) = ( 1, 1, 1, 1, 1, 1, 1, 1 ); # just to check it is there $cwi->Set( [ 'w', 'x', 'y' ] ); } ok( $cwiappenditemsdata, 'Wx::ControlWithItems::AppendItemsData' ); ok( $cwiinsertitemsdata, 'Wx::ControlWithItems::InsertItemsData' ); ok( $cwiinsertitems, 'Wx::ControlWithItems::InsertItems' ); ok( $cwiinsertdata, 'Wx::ControlWithItems::InsertData' ); ok( $cwiinsertstr, 'Wx::ControlWithItems::InsertString' ); ok( $cwisetitemsdata, 'Wx::ControlWithItems::SetItemsData' ); ok( $cwisetitems, 'Wx::ControlWithItems::SetItems' ); if( !$good_combo ) { $cb->Append( 'a' ); $cb->Append( 'b', sub {} ); } else { ( $cbappendstr, $cbappenddata ) = ( 1, 1 ); } ok( $cbappendstr, "Wx::ComboBox::AppendString" ); ok( $cbappenddata, "Wx::ComboBox::AppendData" ); SKIP: { skip "Segfaults on wxMAC", 1 if Wx::wxMAC(); $cb->SetSelection( 0 ); ok( $cbsetselectionN, "Wx::ComboBox::SetSelectionN" ); } $cb->SetSelection( 0, 1 ); ok( $cbsetselectionNN,"Wx::ComboBox::SetMark" ); } ############################################################################## # Wx::Cursor ############################################################################## { my( $newid, $newimage, $newfile ) = ( 0, 0, 0 ); hijack( 'Wx::Cursor::newId' => sub { $newid = 1 }, ( Wx::wxVERSION() >= 2.003002 && !Wx::wxMAC() ? ( 'Wx::Cursor::newImage' => sub { $newimage = 1 } ) : () ), # ( Wx::wxMSW() # ? ( 'Wx::Cursor::newFile' => sub { $newfile = 1 } ) # : () ), ); Wx::Cursor->new( 1 ); ok( $newid, "Wx::Cursor::newId" ); SKIP: { skip "Only for wxWidgets 2.3.x", 1 unless Wx::wxVERSION() >= 2.003002 && !Wx::wxMAC(); Wx::Cursor->new( Wx::Image->new( 1, 1 ) ); ok( $newimage, "Wx::Cursor::newImage" ); } #SKIP: { # skip "Only for wxMSW", 1 unless Wx::wxMSW(); # Wx::Cursor->new( 'demo/data/logo.jpg', Wx::wxBITMAP_TYPE_JPEG(), 2, 2 ); # ok( $newfile, "Wx::Cursor::newFile" ); #} } ############################################################################## # Wx::Icon ############################################################################## { my( $newnull, $newfile, $newiconloc ) = ( 0, 0, 0 ); hijack( 'Wx::Icon::newNull' => sub { $newnull = 1 }, 'Wx::Icon::newFile' => sub { $newfile = 1 }, ( Wx::wxVERSION() >= 2.005002 ? ( 'Wx::Icon::newLocation' => sub { $newiconloc = 1 } ) : () ), ); Wx::Icon->new(); ok( $newnull, "Wx::Icon::newNull" ); Wx::Icon->new( 'wxpl.xpm', Wx::wxBITMAP_TYPE_XPM() ); ok( $newfile, "Wx::Icon::newFile" ); SKIP: { skip "Only for wxWidgets 2.5.2+", 1 unless Wx::wxVERSION >= 2.005002; skip "Hangs under wxMotif", 1 if Wx::wxMOTIF; my $mtm = Wx::MimeTypesManager->new; my $filet = $mtm->GetFileTypeFromExtension( 'jpg' ); skip "No jpg file type", 1 unless $filet; my $location = $filet->GetIcon; skip "No icon for jpg file type", 1 unless $location; my $icon = Wx::Icon->new( $location ); ok( $newiconloc, "Wx::Icon::newLocation" ); } } ############################################################################## # Wx::ToolBar ############################################################################## { my( $addtoollong, $addtoolshort, $setmarginsxy, $setmarginssize, $addnews, $addnewl, $instoollong, $insnewl ) = ( 0, 0, 0, 0, 0, 0, 0, 0 ); hijack( 'Wx::ToolBarBase::AddToolLong' => sub { $addtoollong = 1 }, 'Wx::ToolBarBase::AddToolShort' => sub { $addtoolshort = 1 }, 'Wx::ToolBarBase::InsertToolLong' => sub { $instoollong = 1 }, ( Wx::wxVERSION >= 2.004 ? ( 'Wx::ToolBarBase::AddToolNewShort' => sub { $addnews = 1 }, 'Wx::ToolBarBase::AddToolNewLong' => sub { $addnewl = 1 } ) : () ), ( Wx::wxVERSION >= 2.006 ? ( 'Wx::ToolBarBase::InsertToolNewLong' => sub { $insnewl = 1 } ) : () ), 'Wx::ToolBarBase::SetMarginsXY' => sub { $setmarginsxy = 1 }, 'Wx::ToolBarBase::SetMarginsSize' => sub { $setmarginssize = 1 } ); my $tbar = Wx::ToolBar->new( $frame, -1 ); $tbar->SetMargins( 0, 1 ); ok( $setmarginsxy, "Wx::ToolBar::SetMarginsXY" ); $tbar->SetMargins( [1, 2] ); ok( $setmarginssize, "Wx::Toolbar::SetMarginsSize" ); $tbar->AddTool( Wx::wxID_NEW(), $bmpok, Wx::wxNullBitmap(), 0, undef, 'foo' ); ok( $addtoollong, "Wx::ToolBar::AddToolLong" ); $tbar->AddTool( -1, $bmpok, 'a', 'b' ); ok( $addtoolshort, "Wx::ToolBar::AddToolShort" ); $tbar->InsertTool( 1, Wx::wxID_NEW(), $bmpok, Wx::wxNullBitmap(), 0, undef, 'foo' ); ok( $instoollong, "Wx::ToolBar::InsertToolLong" ); SKIP: { skip "Only for wxWidgets 2.5+", 2 unless Wx::wxVERSION >= 2.005; $tbar->AddTool( -1, "boo", $bmpok, Wx::wxNullBitmap(), 0, 'str', 'foo', 'data' ); ok( $addnewl, "Wx::ToolBar::AddToolNewLong" ); $tbar->AddTool( -1, "bar", $bmpok, 'a', 0 ); ok( $addnews, "Wx::ToolBar::AddToolNewShort" ); } SKIP: { skip "Only for wxWidgets 2.6+", 1 unless Wx::wxVERSION >= 2.006; $tbar->InsertTool( 1, Wx::wxID_NEW(), 'lbl', $bmpok, Wx::wxNullBitmap(), 0, 'foo', 'moo', undef ); ok( $insnewl, "Wx::ToolBar::InsertToolNewLong" ); } } ############################################################################## # Wx::StaticBitmap ############################################################################## SKIP: { skip "Segfaults under wxMotif 2.6.x", 2 if Wx::wxMOTIF && Wx::wxVERSION < 2.008; my( $newicon, $newbitmap ) = ( 0, 0 ); hijack( 'Wx::StaticBitmap::newIcon' => sub { $newicon = 1 }, 'Wx::StaticBitmap::newBitmap' => sub { $newbitmap =1 } ); Wx::StaticBitmap->new( $frame, -1, $icook ); ok( $newicon, "Wx::StaticBitmap::newIcon" ); Wx::StaticBitmap->new( $frame, -1, $bmpok ); ok( $newbitmap, "Wx::StaticBitmap::newBitmap" ); } ############################################################################## # Wx::Rect ############################################################################## { my( $newxywh, $newps, $newpp ) = ( 0, 0, 0 ); hijack( 'Wx::Rect::newXYWH' => sub { $newxywh = 1 }, 'Wx::Rect::newPS' => sub { $newps = 1 }, 'Wx::Rect::newPP' => sub { $newpp = 1 } ); Wx::Rect->new( 0, 1, 2, 3 ); ok( $newxywh, "Wx::Rect::newXYWH" ); Wx::Rect->new( Wx::Point->new( 0, 1 ), Wx::Size->new( 1, 2 ) ); ok( $newps, "Wx::Rect::newPS" ); Wx::Rect->new( Wx::Point->new( 0, 1 ), Wx::Point->new( 2, 3 ) ); ok( $newpp, "Wx::Rect::newPP" ); } ############################################################################## # Wx::ScreenDC ############################################################################## { my( $sdotwin, $sdotrec ) = ( 0, 0 ); hijack( 'Wx::ScreenDC::StartDrawingOnTopWindow' => sub { $sdotwin = 1 }, 'Wx::ScreenDC::StartDrawingOnTopRect' => sub { $sdotrec = 1 } ); my $dc = Wx::ScreenDC->new; $dc->StartDrawingOnTop( $frame ); ok( $sdotwin, "Wx::ScreenDC::StartDrawingOnTopWindow" ); $dc->EndDrawingOnTop; $dc->StartDrawingOnTop( Wx::Rect->new( 0, 1, 2, 3 ) ); ok( $sdotrec, "Wx::ScreenDC::StartDrawingOnTopRect" ); } ############################################################################## # Wx::Window ############################################################################## { my( $ssxywh, $sswh, $sssize, $ssrect, $stttip, $sttstr, $ctsxy, $ctspoint, $cdppoint, $cdpsize, $cpdpoint, $cpdsize, $iepoint, $ierect, $iexywh, $movepoint, $movexy, $stcpoi, $stcxy, $scspoi, $scswh ) = ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); hijack( 'Wx::Window::SetSizeXYWHF' => sub { $ssxywh = 1 }, 'Wx::Window::SetSizeWH' => sub { $sswh = 1 }, 'Wx::Window::SetSizeSize' => sub { $sssize = 1 }, 'Wx::Window::SetSizeRect' => sub { $ssrect = 1 }, ( Wx::wxMOTIF() ? () : ( 'Wx::Window::SetToolTipTip' => sub { $stttip = 1 }, 'Wx::Window::SetToolTipString' => sub { $sttstr = 1 }, ) ), 'Wx::Window::ClientToScreenXY' => sub { $ctsxy = 1 }, 'Wx::Window::ClientToScreenPoint' => sub { $ctspoint = 1 }, 'Wx::Window::ConvertDialogPointToPixels' => sub { $cdppoint = 1 }, 'Wx::Window::ConvertDialogSizeToPixels' => sub { $cdpsize =1 }, 'Wx::Window::ConvertPixelsPointToDialog' => sub { $cpdpoint = 1 }, 'Wx::Window::ConvertPixelsSizeToDialog' => sub { $cpdsize =1 }, 'Wx::Window::IsExposedPoint' => sub { $iepoint = 1 }, 'Wx::Window::IsExposedRect' => sub { $ierect = 1 }, 'Wx::Window::IsExposedXYWH' => sub { $iexywh = 1 }, 'Wx::Window::MovePoint' => sub { $movepoint = 1 }, 'Wx::Window::MoveXY' => sub { $movexy = 1 }, # Wx::Window::PopupMenuPoint => sub { $poppoint = 1 }, # Wx::Window::PopupMenuXY => sub { $popxy = 1 }, 'Wx::Window::ScreenToClientPoint' => sub { $stcpoi = 1 }, 'Wx::Window::ScreenToClientXY' => sub { $stcxy = 1 }, 'Wx::Window::SetClientSizeSize' => sub { $scspoi = 1 }, 'Wx::Window::SetClientSizeWH' => sub { $scswh = 1 } ); $frame->SetSize( 20, 20, 30, 30 ); ok( $ssxywh, "Wx::Window::SetSizeXYWHF" ); $frame->SetSize( 40, 40 ); ok( $sswh, "Wx::Window::SetSizeWH" ); $frame->SetSize( [ 50, 50 ] ); ok( $sssize, "Wx::Window::SetSizeSize" ); $frame->SetSize( Wx::Rect->new( 40, 40, 60, 60 ) ); ok( $ssrect, "Wx::Window::SetSizeRect" ); SKIP: { skip "No ToolTips under wxMOTIF", 2 if Wx::wxMOTIF(); $frame->SetToolTip( "FOO" ); ok( $sttstr, "Wx::Window::SetToolTipString" ); $frame->SetToolTip( Wx::ToolTip->new( "Bar" ) ); ok( $stttip, "Wx::Window::SetToolTipTip" ); } $frame->ClientToScreen( 1, 2 ); ok( $ctsxy, "Wx::Window::ClientToScreenXY" ); $frame->ClientToScreen( [1, 2] ); ok( $ctspoint, "Wx::Window::ClientToScreenPoint" ); $frame->ConvertDialogToPixels( Wx::Point->new( 2, 3 ) ); ok( $cdppoint, "Wx::Window::ConvertDialogPointToPixels" ); $frame->ConvertDialogToPixels( Wx::Size->new( 1, 2 ) ); ok( $cdpsize, "Wx::Window::ConvertDialogSizeToPixels" ); $frame->ConvertPixelsToDialog( Wx::Point->new( 2, 3 ) ); ok( $cpdpoint, "Wx::Window::ConvertPixelsPointToDialog" ); $frame->ConvertPixelsToDialog( Wx::Size->new( 1, 2 ) ); ok( $cpdsize, "Wx::Window::ConvertPixelsSizeToDialog" ); $frame->IsExposed( Wx::Point->new( 1, 2 ) ); ok( $iepoint, "Wx::Window::IsExposedPoint" ); $frame->IsExposed( Wx::Rect->new( 1, 2, 3, 4 ) ); ok( $ierect, "Wx::Window::IsExposedRect" ); $frame->IsExposed( 1, 2, 3, 4 ); ok( $iexywh, "Wx::Window::IsExposedXYWH" ); $frame->Move( [ 50, 50 ] ); ok( $movepoint, "Wx::Window::MovePoint" ); $frame->Move( 6, 60 ); ok( $movexy, "Wx::Window::MoveXY" ); $frame->ScreenToClient( [ 1, 2 ] ); ok( $stcpoi, "Wx::Window::ScreenToClientPoint" ); $frame->ScreenToClient( 1, 2 ); ok( $stcxy, "Wx::Window::ScreenToClientXY" ); $frame->SetClientSize( [50, 50] ); ok( $scspoi, "Wx::Window::SetClientSizePoint" ); $frame->SetClientSize( 200, 200 ); ok( $scswh, "Wx::Window::SetClientSizeWH" ); test_override { $frame->SetVirtualSize( 500, 500 ) } 'Wx::Window::SetVirtualSizeXY'; test_override { $frame->SetVirtualSize( [ 500, 500 ] ) } 'Wx::Window::SetVirtualSizeSize'; } ############################################################################## # Wx::DC ############################################################################## { my( $drawcxywh, $drawcrec, $setclxywh, $setclreg ) = ( 0, 0, 0, 0 ); hijack( 'Wx::DC::DrawCheckMarkXYWH' => sub { $drawcxywh = 1 }, 'Wx::DC::DrawCheckMarkRect' => sub { $drawcrec = 1 }, 'Wx::DC::SetClippingRegionXYWH' => sub { $setclxywh = 1 }, 'Wx::DC::SetClippingRegionRegion' => sub { $setclreg = 1 } ); my $dc = Wx::ClientDC->new( $frame ); $dc->DrawCheckMark( 1, 2, 5, 6 ); ok( $drawcxywh, "Wx::DC::DrawCheckMarkXYWH" ); $dc->DrawCheckMark( Wx::Rect->new( 1, 2, 5, 6 ) ); ok( $drawcrec, "Wx::DC::DrawCheckMarkRect" ); $dc->SetClippingRegion( 0, 0, 50, 50 ); ok( $setclxywh, "Wx::DC::SetClippingRegionXYWH" ); $dc->SetClippingRegion( Wx::Region->new( Wx::Rect->new( 0, 0, 40, 40 ) ) ); ok( $setclreg, "Wx::DC::SetClippingRegionRegion" ); } ############################################################################## # Wx::Timer ############################################################################## { my( $newdefault, $neweh ) = ( 0, 0 ); hijack( 'Wx::Timer::newDefault' => sub { $newdefault = 1 }, 'Wx::Timer::newEH' => sub { $neweh = 1 } ); Wx::Timer->new->Destroy; ok( $newdefault, "Wx::Timer::newDefault" ); Wx::Timer->new( $frame, 1 ); ok( $neweh, "Wx::Timer::newEH" ); } ############################################################################## # Wx::TreeCtrl ############################################################################## { my( $tgetp, $wgetp, $iitid, $iiint ) = ( 0, 0, 0, 0 ); hijack( 'Wx::TreeCtrl::GetParent' => sub { $tgetp = 1 }, 'Wx::Window::GetParent' => sub { $wgetp = 1 }, 'Wx::TreeCtrl::InsertItemPrev' => sub { $iitid = 1 }, 'Wx::TreeCtrl::InsertItemBef' => sub { $iiint = 1 } ); my $tc = Wx::TreeCtrl->new( $frame, -1 ); my $rt = $tc->AddRoot( 'root' ); my $c1 = $tc->AppendItem( $rt, 'first' ); my $c2 = $tc->AppendItem( $rt, 'second' ); $tc->GetParent( $c1 ); ok( $tgetp, "Wx::TreeCtrl::GetParent" ); $tc->GetParent; ok( $wgetp, "Wx::Window::GetParent" ); $tc->InsertItem( $rt, $c1, 'insert 1' ); ok( $iitid, "Wx::TreeCtrl::InsertItemPrev" ); $tc->InsertItem( $rt, 1, 'insert 2' ); ok( $iiint, "Wx::TreeCtrl::InsertItemBef" ); } ############################################################################## # Wx::Pen ############################################################################## { my( $newcol, $newbitmap, $newstring, $setcolcol, $setcolrgb, $setcolname ) = ( 0, 0, 0, 0, 0, 0 ); hijack( 'Wx::Pen::newColour' => sub { $newcol = 1 }, ( Wx::wxMSW() ? ( 'Wx::Pen::newBitmap' => sub { $newbitmap = 1 } ) : () ), 'Wx::Pen::newString' => sub { $newstring = 1 }, 'Wx::Pen::SetColourColour' => sub { $setcolcol = 1 }, 'Wx::Pen::SetColourRGB' => sub { $setcolrgb = 1 }, 'Wx::Pen::SetColourName' => sub { $setcolname = 1 } ); Wx::Pen->new( Wx::Colour->new( 'red' ), 0, 0 ); ok( $newcol, "Wx::Pen::newColour" ); SKIP: { skip "MSW-only method", 1 unless Wx::wxMSW(); Wx::Pen->new( $bmpok, 1 ); ok( $newbitmap, "Wx::Pen::newBitmap" ); } my $pen = Wx::Pen->new( 'red', 0, 0 ); ok( $newstring, "Wx::Pen::newString" ); $pen->SetColour( Wx::wxRED() ); ok( $setcolcol, "Wx::Pen::SetColourColour" ); $pen->SetColour( 1, 2, 3 ); ok( $setcolrgb, "Wx::Pen::SetColourRGB" ); $pen->SetColour( 'red' ); ok( $setcolname, "Wx::Pen::SetColourName" ); } ############################################################################## # Wx::ListCtrl ############################################################################## { my( $ici, $istr, $setii, $setstr ) = ( 0, 0, 0, 0 ); hijack( 'Wx::ListCtrl::InsertColumnInfo' => sub { $ici = 1 }, 'Wx::ListCtrl::InsertColumnString' => sub { $istr = 1 }, 'Wx::ListCtrl::SetItemInfo' => sub { $setii = 1 }, 'Wx::ListCtrl::SetItemString' => sub { $setstr = 1 } ); my $lc = Wx::ListCtrl->new( $frame, -1, [-1,-1], [-1,-1], Wx::wxLC_REPORT() ); $lc->InsertColumn( 0, 'Column' ); ok( $istr, "Wx::ListCtrl::InsertColumnString" ); my $li = Wx::ListItem->new; $li->SetColumn( 1 ); $li->SetText( 'Foo' ); $lc->InsertColumn( 1, $li ); ok( $ici, "Wx::ListCtrl::InsertColumnInfo" ); $lc->InsertStringItem( 0, 'Foo' ); $lc->SetItem( 0, 0, 'Bar' ); ok( $setstr, "Wx::ListCtrl::SetItemString" ); $li->SetId( 0 ); $lc->SetItem( $li ); ok( $setii, "Wx::ListCtrl::SetItemInfo" ); } ############################################################################## # Wx::ImageList ############################################################################## { my( $addbitmap, $addwithcolour, $addicon, $replico, $replbmp ) = ( 0, 0, 0, 0, 0 ); hijack( 'Wx::ImageList::AddBitmap' => sub { $addbitmap = 1 }, 'Wx::ImageList::AddWithColourMask' => sub { $addwithcolour = 1 }, 'Wx::ImageList::AddIcon' => sub { $addicon = 1 }, 'Wx::ImageList::ReplaceIcon' => sub { $replico = 1 }, 'Wx::ImageList::ReplaceBitmap' => sub { $replbmp = 1 } ); my $img = Wx::Image->new( 16, 16 ); my( $bmp, $ico ) = ( Wx::Bitmap->new( $img ), Wx::GetWxPerlIcon( 1 ) ); my $imgl = Wx::ImageList->new( 16, 16 ); $imgl->Add( $bmp ); ok( $addbitmap, "Wx::ImageList::AddBitmap" ); $imgl->Add( $bmp, Wx::wxBLACK() ); ok( $addwithcolour, "Wx::ImageList::AddWithColourMask" ); $imgl->Add( $ico ); ok( $addicon, "Wx::ImageList::AddIcon" ); $imgl->Replace( 0, $bmp ); ok( $replbmp, "Wx::ImageList::ReplaceBitmap" ); $imgl->Replace( 1, $ico ); ok( $replico, "Wx::ImageList::ReplaceIcon" ); } ############################################################################## # Wx::Menu ############################################################################## { my( $appmen, $appstr, $appite, $delite, $delid, $desite, $desid, $remite, $remid, $prepite, $prepstr, $insite, $insstr ) = ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); hijack( 'Wx::Menu::AppendSubMenu_'=> sub { $appmen = 1 }, 'Wx::Menu::AppendString' => sub { $appstr = 1 }, 'Wx::Menu::AppendItem' => sub { $appite = 1 }, 'Wx::Menu::DeleteItem' => sub { $delite = 1 }, 'Wx::Menu::DeleteId' => sub { $delid = 1 }, 'Wx::Menu::DestroyItem' => sub { $desite = 1 }, 'Wx::Menu::DestroyId' => sub { $desid = 1 }, 'Wx::Menu::RemoveItem' => sub { $remite = 1 }, 'Wx::Menu::RemoveId' => sub { $remid = 1 }, 'Wx::Menu::PrependString' => sub { $prepstr = 1 }, 'Wx::Menu::PrependItem' => sub { $prepite = 1 }, 'Wx::Menu::InsertString' => sub { $insstr = 1 }, 'Wx::Menu::InsertItem' => sub { $insite = 1 } ); my $me = Wx::Menu->new; my $me2 = Wx::Menu->new; my $i1 = Wx::MenuItem->new( $me, 1, 'Foo' ); my $i2 = Wx::MenuItem->new( $me, 2, 'Bar' ); my $i3 = Wx::MenuItem->new( $me, 3, 'Baz' ); my $i4 = Wx::MenuItem->new( $me, 4, 'Baz' ); $me->Append( 11, 'My' ); ok( $appstr, "Wx::Menu::AppendString" ); $me->Append( 12, 'Sub', $me2 ); ok( $appmen, "Wx::Menu::AppendSubMenu_" ); $me->Append( $i1 ); ok( $appite, "Wx::Menu::AppendItem" ); $me->Delete( $i1 ); ok( $delite, "Wx::Menu::DeleteItem" ); $me->Delete( 12 ); ok( $delid, "Wx::Menu::DeleteId" ); $me->Append( $i2 ); $me->Append( $i3 ); $me->Append( 12, 'Fubar' ); $me->Append( 13, 'Fubar' ); $me->Destroy( $i2 ); ok( $desite, "Wx::Menu::DestroyItem" ); $me->Destroy( 12 ); ok( $desid, "Wx::Menu::DestroyId" ); $me->Remove( $i3 ); ok( $remite, "Wx::Menu::RemoveItem" ); $me->Remove( 13 ); ok( $remid, "Wx::Menu::RemoveId" ); $me->Prepend( $i3 ); ok( $prepite, "Wx::Menu::PrependItem" ); $me->Prepend( 15, 'Myself' ); ok( $prepstr, "Wx::Menu::PrependString" ); $me->Insert( 0, $i4 ); ok( $insite, "Wx::Menu::InsertItem" ); $me->Insert( 0, 17, 'Foo' ); ok( $insstr, "Wx::Menu::InsertString" ); } ############################################################################## # Wx::RadioBox ############################################################################## { my( $wenable, $renable, $wgetlabel, $rgetlabel, $wsetlabel, $rsetlabel, $wshow, $rshow ) = ( 0, 0, 0, 0, 0, 0, 0, 0 ); hijack( 'Wx::Window::Enable' => sub { $wenable = 1 }, 'Wx::RadioBox::EnableItem' => sub { $renable = 1 }, 'Wx::Window::GetLabel' => sub { $wgetlabel = 1 }, 'Wx::RadioBox::GetItemLabel' => sub { $rgetlabel = 1 }, 'Wx::Window::SetLabel' => sub { $wsetlabel = 1 }, 'Wx::RadioBox::SetItemLabel' => sub { $rsetlabel = 1 }, 'Wx::Window::Show' => sub { $wshow = 1 }, 'Wx::RadioBox::ShowItem' => sub { $rshow = 1 } ); my $rb = Wx::RadioBox->new( $frame, -1, 'Foo', [-1,-1], [-1,-1], [ qw(a b c) ] ); $rb->Enable( 1 ); ok( $wenable, "Wx::Window::Enable" ); $rb->Enable( 1, 1 ); ok( $renable, "Wx::RadioBox::EnableItem" ); $rb->GetLabel; ok( $wgetlabel, "Wx::Window::GetLabel" ); $rb->GetLabel( 1 ); ok( $rgetlabel, "Wx::RadioBox::GetItemLabel" ); $rb->SetLabel( 'Foo' ); ok( $wsetlabel, "Wx::Window::SetLabel" ); $rb->SetLabel( 1, 'My' ); ok( $rsetlabel, "Wx::RadioBox::SetLabel" ); $rb->Show( 1 ); ok( $wshow, "Wx::Window::Show" ); $rb->Show( 1, 1 ); ok( $rshow, "Wx::RadioBox::ShowItem" ); } ############################################################################## # Wx::Region ############################################################################## { my( $newempty, $newxywh, $newpp, $newrect, $cxywh, $cxy, $cpoint, $crect, $ixywh, $irect, $iregion, $srect, $sregion, $uxywh, $urect, $uregion, $xxywh, $xrect, $xregion ) = ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); hijack( 'Wx::Region::newEmpty' => sub { $newempty = 1 }, 'Wx::Region::newXYWH' => sub { $newxywh = 1 }, 'Wx::Region::newPP' => sub { $newpp = 1 }, 'Wx::Region::newRect' => sub { $newrect = 1 }, # Wx::Region::newPolygon' => sub { $newpolygon = 1 }, 'Wx::Region::ContainsXYWH' => sub { $cxywh = 1 }, 'Wx::Region::ContainsXY' => sub { $cxy = 1 }, 'Wx::Region::ContainsPoint' => sub { $cpoint = 1 }, 'Wx::Region::ContainsRect' => sub { $crect = 1 }, 'Wx::Region::IntersectXYWH' => sub { $ixywh = 1 }, 'Wx::Region::IntersectRect' => sub { $irect = 1 }, 'Wx::Region::IntersectRegion' => sub { $iregion = 1 }, 'Wx::Region::SubtractRect' => sub { $srect = 1 }, 'Wx::Region::SubtractRegion' => sub { $sregion = 1 }, 'Wx::Region::UnionXYWH' => sub { $uxywh = 1 }, 'Wx::Region::UnionRect' => sub { $urect = 1 }, 'Wx::Region::UnionRegion' => sub { $uregion = 1 }, 'Wx::Region::XorXYWH' => sub { $xxywh = 1 }, 'Wx::Region::XorRect' => sub { $xrect = 1 }, 'Wx::Region::XorRegion' => sub { $xregion = 1 } ); Wx::Region->new; ok( $newempty, "Wx::Region::newEmpty" ); Wx::Region->new( 1, 2, 3, 4 ); ok( $newxywh, "Wx::Region::newXYWH" ); Wx::Region->new( [0, 0], [50, 50] ); ok( $newpp, "Wx::Region::newPP" ); my $r = Wx::Region->new( Wx::Rect->new( 0, 0, 50, 50 ) ); ok( $newrect, "Wx::Region::newRect" ); $r->Contains( 0, 0, 1, 2 ); ok( $cxywh, "Wx::Region::ContainsXYWH" ); $r->Contains( 1, 2 ); ok( $cxy, "Wx::Region::ContainsXY" ); $r->Contains( [ 1, 2 ] ); ok( $cpoint, "Wx::Region::ContainsPoint" ); $r->Contains( Wx::Rect->new( 0, 1, 2, 3 ) ); ok( $crect, "Wx::Region::ContainsRect" ); $r->Intersect( 0, 1, 2, 3 ); ok( $ixywh, "Wx::Region::IntersectXYWH" ); $r->Intersect( Wx::Rect->new( 0, 1, 2, 3 ) ); ok( $irect, "Wx::Region::IntersectRect" ); $r->Intersect( Wx::Region->new( 0, 0, 50, 50 ) ); ok( $iregion, "Wx::Region::IntersectRegion" ); $r->Subtract( Wx::Rect->new( 0, 1, 2, 3 ) ); ok( $srect, "Wx::Region::SubtractRect" ); $r->Subtract( $r ); ok( $sregion, "Wx::Region::SubtractRegion" ); $r->Union( 0, 0, 50, 50 ); ok( $uxywh, "Wx::Region::UnionXYWH" ); $r->Union( Wx::Rect->new( Wx::Point->new( 0, 0 ), Wx::Size->new( 50, 50 ) ) ); ok( $urect, "Wx::Region::UnionRect" ); SKIP: { skip "Does not work with wxGTK 2.2", 1 if Wx::wxGTK && Wx::wxVERSION < 2.003; $r->Union( $r ); ok( $uregion, "Wx::Region::UnionRegion" ); } $r->Xor( 0, 0, 1, 1 ); ok( $xxywh, "Wx::Region::XorXYWH" ); $r->Xor( Wx::Rect->new( 0, 0, 1, 2 ) ); ok( $xrect, "Wx::Region::XorRect" ); SKIP: { skip "Does not work with wxGTK 2.2", 1 if Wx::wxGTK && Wx::wxVERSION < 2.003; $r->Xor( $r ); ok( $xregion, "Wx::Region::XorRegion" ); } } ############################################################################## # Wx::Image ############################################################################## { my( $newnull, $newicon, $newbitmap, $newstreamt, $newstreamm, $newwh, $newdata, $newnametype, $newnamemime, $lsm, $lst, $lft, $lfm, $ssm, $sst, $sft, $sfm, $sfo ) = ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); hijack( 'Wx::Image::newNull' => sub { $newnull = 1 }, 'Wx::Image::newIcon' => sub { $newicon = 1 }, 'Wx::Image::newBitmap' => sub { $newbitmap = 1 }, 'Wx::Image::newStreamType' => sub { $newstreamt = 1 }, 'Wx::Image::newStreamMIME' => sub { $newstreamm = 1 }, 'Wx::Image::newWH' => sub { $newwh = 1 }, 'Wx::Image::newData' => sub { $newdata = 1 }, 'Wx::Image::newNameType' => sub { $newnametype = 1 }, 'Wx::Image::newNameMIME' => sub { $newnamemime = 1 }, 'Wx::Image::LoadStreamType' => sub { $lst = 1 }, 'Wx::Image::LoadStreamMIME' => sub { $lsm = 1 }, 'Wx::Image::LoadFileType' => sub { $lft = 1 }, 'Wx::Image::LoadFileMIME' => sub { $lfm = 1 }, # Wx::Image::SaveFileSType => sub { $sst = 1 }, # Wx::Image::SaveFileSMIME => sub { $ssm = 1 }, # Wx::Image::SaveFileType => sub { $sft = 1 }, # Wx::Image::SaveFileMIME => sub { $sfm = 1 }, # Wx::Image::SaveFileOnly => sub { $sfo = 1 } ); my $op = '< wxpl.xpm'; Wx::Image->new; ok( $newnull, "Wx::Image::newNull" ); Wx::Image->new( $icook ); ok( $newicon, "Wx::Image::newIcon" ); Wx::Image->new( $bmpok ); ok( $newbitmap, "Wx::Image::newBitmap" ); open IN, $op; binmode IN; Wx::Image->new( *IN, Wx::wxBITMAP_TYPE_XPM() ); ok( $newstreamt, "Wx::Image::newStreamType" ); open IN, $op; binmode IN; Wx::Image->new( *IN, 'image/xpm' ); ok( $newstreamm, "Wx::Image::newStreamMIME" ); Wx::Image->new( 1, 2 ); ok( $newwh, "Wx::Image::newWH" ); Wx::Image->new( 3, 4, ' ' x 3 x 4 x 3 ); ok( $newdata, "Wx::Image::newData" ); Wx::Image->new( 'wxpl.ico', Wx::wxBITMAP_TYPE_ICO() ); ok( $newnametype, "Wx::Image::newNameType" ); Wx::Image->new( 'wxpl.xpm', 'image/xpm' ); ok( $newnametype, "Wx::Image::newNameMIME" ); my $img = Wx::Image->new; open IN, "wxpl.xpm"; binmode IN; $img->LoadFile( \*IN, Wx::wxBITMAP_TYPE_XPM() ); ok( $lst, "Wx::Image::LoadStreamType" ); open IN, $op; binmode IN; $img->LoadFile( \*IN, 'image/xpm' ); ok( $lsm, "Wx::Image::LoadStreamMIME" ); $img->LoadFile( 'wxpl.xpm', Wx::wxBITMAP_TYPE_XPM() ); ok( $lft, "Wx::Image::LoadFileType" ); $img->LoadFile( 'wxpl.xpm', 'image/xpm' ); ok( $lfm, "Wx::Image::LoadFileMIME" ); } ############################################################################## # Wx::BitmapComboBox ############################################################################## if( Wx::wxVERSION() >= 2.007002 ) { my $bcb = Wx::BitmapComboBox->new( $frame, -1, 'a', [-1, -1], [-1, -1], [] ); test_override { $bcb->Append( 'a', $bmpok ) } 'Wx::BitmapComboBox::AppendString'; test_override { $bcb->Append( 'b', $bmpok, \1 ) } 'Wx::BitmapComboBox::AppendData'; test_override { $bcb->Insert( 'a', $bmpok, 1 ) } 'Wx::BitmapComboBox::InsertString'; test_override { $bcb->Insert( 'b', $bmpok, 1, \1 ) } 'Wx::BitmapComboBox::InsertData'; } else { ok( 1, 'skipped' ) for 1 .. 4; } ############################################################################## # Wx::ColourPickerCtrl ############################################################################## if( Wx::wxVERSION() >= 2.007000 ) { my $cpc = Wx::ColourPickerCtrl->new( $frame ); test_override { $cpc->SetColour( Wx::Colour->new( 'red' ) ) } 'Wx::ColourPickerCtrl::SetColourColour'; test_override { $cpc->SetColour( 'red' ) } 'Wx::ColourPickerCtrl::SetColourString'; } else { ok( 1, 'skipped' ) for 1 .. 2; } ############################################################################## # Wx::IconBundle ############################################################################## { my $ib = Wx::IconBundle->new; test_override { Wx::IconBundle->new } 'Wx::IconBundle::newEmpty'; test_override { Wx::IconBundle->new( 'wxpl.ico' ) } 'Wx::IconBundle::newFile'; test_override { Wx::IconBundle->new( $icook ) } 'Wx::IconBundle::newIcon'; test_override { $ib->AddIcon( 'wxpl.ico' ) } 'Wx::IconBundle::AddIconFile'; test_override { $ib->AddIcon( $icook ) } 'Wx::IconBundle::AddIconIcon'; test_override { $ib->GetIcon( 16 ) } 'Wx::IconBundle::GetIconCoord'; test_override { $ib->GetIcon( [ 16, 16 ] ) } 'Wx::IconBundle::GetIconSize'; if( Wx::wxVERSION() >= 2.009 ) { test_override { $ib->GetIconOfExactSize( 16 ) } 'Wx::IconBundle::GetIconOfExactSizeCoord'; test_override { $ib->GetIconOfExactSize( [ 16, 16 ] ) } 'Wx::IconBundle::GetIconOfExactSizeSize'; } else { ok( 1, 'skipped' ); ok( 1, 'skipped' ); } } ############################################################################## # Wx::HVScrollHelper ############################################################################## if( Wx::wxVERSION() >= 2.009 ) { my $sw = Wx::PlHVScrolledWindow->new( $frame, -1 ); $sw->SetRowColumnCount( 10, 10 ); test_override { $sw->ScrollToRowColumn( 1, 1 ) } 'Wx::HVScrolledWindow::ScrollToRowColumnRC'; test_override { $sw->ScrollToRowColumn( Wx::Position->new( 2, 2 ) ) } 'Wx::HVScrolledWindow::ScrollToRowColumnPosition'; test_override { $sw->RefreshRowColumn( 1, 1 ) } 'Wx::HVScrolledWindow::RefreshRowColumnRC'; test_override { $sw->RefreshRowColumn( Wx::Position->new( 2, 2 ) ) } 'Wx::HVScrolledWindow::RefreshRowColumnPosition'; test_override { $sw->RefreshRowsColumns( 1, 1, 3, 3 ) } 'Wx::HVScrolledWindow::RefreshRowsColumnsRC'; test_override { $sw->RefreshRowsColumns( Wx::Position->new( 2, 2 ), Wx::Position->new( 4, 4 ) ) } 'Wx::HVScrolledWindow::RefreshRowsColumnsPosition'; test_override { $sw->VirtualHitTest( 10, 10 ) } 'Wx::HVScrolledWindow::VirtualHitTestXY'; test_override { $sw->VirtualHitTest( [ 10, 10 ] ) } 'Wx::HVScrolledWindow::VirtualHitTestPoint'; test_override { $sw->IsVisible( 1, 1 ) } 'Wx::HVScrolledWindow::IsVisibleRC'; test_override { $sw->IsVisible( Wx::Position->new( 2, 2 ) ) } 'Wx::HVScrolledWindow::IsVisiblePosition'; } else { ok( 1, 'skipped' ) for 1 .. 10; } $frame->Destroy; } ); ############################################################################## # Wx::Buffered{Paint}DC ############################################################################## { my( $newd, $newb, $news, $initb, $inits ) = ( 0, 0, 0, 0, 0, ); hijack( 'Wx::BufferedDC::newDefault' => sub { $newd = 1 }, 'Wx::BufferedDC::newBitmap' => sub { $newb = 1 }, 'Wx::BufferedDC::newSize' => sub { $news = 1 }, 'Wx::BufferedDC::InitBitmap' => sub { $initb = 1 }, 'Wx::BufferedDC::InitSize' => sub { $inits = 1 }, ); my $frame = Wx::Frame->new( undef, -1, 'Frame' ); my $cdc = Wx::ClientDC->new( $frame ); my $dc; $dc = Wx::BufferedDC->new; ok( $newd, 'Wx::BufferedDC::newDefault' ); my $backing = Wx::Bitmap->new( 20, 20 ); $dc = Wx::BufferedDC->new( $cdc, $backing ); ok( $newb, 'Wx::BufferedDC::newBitmap' ); $dc = Wx::BufferedDC->new( $cdc, [20, 20] ); ok( $news, 'Wx::BufferedDC::newSize' ); SKIP: { skip 'Broken inheritance for 2.6.x', 2 if ref $dc eq 'Wx::MemoryDC'; skip 'Does not work with 2.7.1', 2 if Wx::wxVERSION < 2.007002; $dc = Wx::BufferedDC->new; my $backing = Wx::Bitmap->new( 200, 100 ); $dc->Init( $cdc, $backing ); ok( $initb, 'Wx::BufferedDC::InitBitmap' ); $dc = Wx::BufferedDC->new; $dc->Init( $cdc, [200, 100] ); ok( $inits, 'Wx::BufferedDC::InitSize' ); } undef $dc; undef $cdc; } ############################################################################## # Wx::GridBagSizer ############################################################################## { my $gbs = Wx::GridBagSizer->new; my $win = Wx::Frame->new( undef, -1, 'Foo' ); my $sz = Wx::BoxSizer->new( Wx::wxVERTICAL() ); test_override { $gbs->Add( $win, Wx::GBPosition->new( 0, 0 ), Wx::GBSpan->new( 1, 1 ) ) } 'Wx::GridBagSizer::AddWindow'; test_override { $gbs->Add( $sz, Wx::GBPosition->new( 0, 1 ), Wx::GBSpan->new( 1, 1 ) ) } 'Wx::GridBagSizer::AddSizer'; test_override { $gbs->Add( 20, 20, Wx::GBPosition->new( 0, 2 ), Wx::GBSpan->new( 1, 1 ) ) } 'Wx::GridBagSizer::AddSpace'; test_override { $gbs->GetItemPosition( $win ) } 'Wx::GridBagSizer::GetItemPositionWindow'; test_override { $gbs->GetItemPosition( $sz ) } 'Wx::GridBagSizer::GetItemPositionSizer'; test_override { $gbs->GetItemPosition( 0 ) } 'Wx::GridBagSizer::GetItemPositionIndex'; test_override { $gbs->SetItemPosition( $win, Wx::GBPosition->new( 1, 0 ) ) } 'Wx::GridBagSizer::SetItemPositionWindow'; test_override { $gbs->SetItemPosition( $sz, Wx::GBPosition->new( 1, 1 ) ) } 'Wx::GridBagSizer::SetItemPositionSizer'; test_override { $gbs->SetItemPosition( 2, Wx::GBPosition->new( 1, 2 ) ) } 'Wx::GridBagSizer::SetItemPositionIndex'; test_override { $gbs->GetItemSpan( $win ) } 'Wx::GridBagSizer::GetItemSpanWindow'; test_override { $gbs->GetItemSpan( $sz ) } 'Wx::GridBagSizer::GetItemSpanSizer'; test_override { $gbs->GetItemSpan( 0 ) } 'Wx::GridBagSizer::GetItemSpanIndex'; test_override { $gbs->FindItem( $win ) } 'Wx::GridBagSizer::FindItemWindow'; test_override { $gbs->FindItem( $sz ) } 'Wx::GridBagSizer::FindItemSizer'; test_override { $gbs->SetItemSpan( $win, Wx::GBSpan->new( 2, 1 ) ) } 'Wx::GridBagSizer::SetItemSpanWindow'; test_override { $gbs->SetItemSpan( $sz, Wx::GBSpan->new( 2, 1 ) ) } 'Wx::GridBagSizer::SetItemSpanSizer'; test_override { $gbs->SetItemSpan( 2, Wx::GBSpan->new( 2, 1 ) ) } 'Wx::GridBagSizer::SetItemSpanIndex'; my $gbi = $gbs->GetItem( 0 ); test_override { $gbi->Intersects( $gbi ) } 'Wx::GBSizerItem::IntersectsItem'; test_override { $gbi->Intersects( Wx::GBPosition->new( 0, 0 ), Wx::GBSpan->new( 1, 1 ) ) } 'Wx::GBSizerItem::IntersectsPosition'; test_override { $gbs->CheckForIntersection( $gbi ) } 'Wx::GridBagSizer::CheckForIntersectionItem'; test_override { $gbs->CheckForIntersection( Wx::GBPosition->new( 0, 0 ), Wx::GBSpan->new( 1, 1 ) ) } 'Wx::GridBagSizer::CheckForIntersectionPos'; } ############################################################################## # Wx::Sizer/Wx::SizerItem ############################################################################## { my( $showw, $shows, $showi, $srfloat, $srwh, $srsize, $addsiz, $addwin, $addspa, $inssiz, $inswin, $insspa, $presiz, $prewin, $prespa, $remwin, $remsiz, $remnth, $smsxy, $smssize, $siswin, $sissiz, $sisnth ) = ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); hijack( 'Wx::Sizer::ShowWindow' => sub { $showw = 1 }, 'Wx::Sizer::ShowSizer' => sub { $shows = 1 }, # 'Wx::Sizer::ShowItem' => sub { $showi = 1 }, 'Wx::SizerItem::SetRatioFloat' => sub { $srfloat = 1 }, 'Wx::SizerItem::SetRatioWH' => sub { $srwh = 1 }, 'Wx::SizerItem::SetRatioSize' => sub { $srsize = 1 }, 'Wx::Sizer::AddSizer' => sub { $addsiz = 1 }, 'Wx::Sizer::AddWindow' => sub { $addwin = 1 }, 'Wx::Sizer::AddSpace' => sub { $addspa = 1 }, 'Wx::Sizer::InsertSizer' => sub { $inssiz = 1 }, 'Wx::Sizer::InsertWindow' => sub { $inswin = 1 }, 'Wx::Sizer::InsertSpace' => sub { $insspa = 1 }, 'Wx::Sizer::PrependSizer' => sub { $presiz = 1 }, 'Wx::Sizer::PrependWindow' => sub { $prewin = 1 }, 'Wx::Sizer::PrependSpace' => sub { $prespa = 1 }, ( $Wx::wxVERSION < 2.007 ? ( 'Wx::Sizer::RemoveWindow' => sub { $remwin = 1 } ) : () ), 'Wx::Sizer::RemoveSizer' => sub { $remsiz = 1 }, 'Wx::Sizer::RemoveNth' => sub { $remnth = 1 }, 'Wx::Sizer::SetMinSizeXY' => sub { $smsxy = 1 }, 'Wx::Sizer::SetMinSizeSize' => sub { $smssize= 1 }, 'Wx::Sizer::SetItemMinSizeWindow' => sub { $siswin = 1 }, 'Wx::Sizer::SetItemMinSizeSizer' => sub { $sissiz = 1 }, 'Wx::Sizer::SetItemMinSizeNth' => sub { $sisnth = 1 }, ); my $win = Wx::Frame->new( undef, -1, 'Foo' ); my $siz = Wx::BoxSizer->new( Wx::wxVERTICAL() ); $siz->Add( Wx::BoxSizer->new( Wx::wxVERTICAL() ) ); $win->SetSizer( $siz ); $siz->Show( $win ); ok( $showw, 'Wx::Sizer::ShowWindow' ); $siz->Show( $siz, 1 ); ok( $shows, 'Wx::Sizer::ShowSizer' ); #$siz->Show( 0 ); #ok( $showi, 'Wx::Sizer::ShowItem' ); sub siz1 { Wx::BoxSizer->new( Wx::wxHORIZONTAL() ) } sub win1 { Wx::Window->new( $win, -1 ) } my $item = ( $siz->GetChildren )[0]; $item->SetRatio( 1.234 ); ok( $srfloat, 'Wx::SizerItem::SetRatioFloat' ); $item->SetRatio( 1, 2 ); ok( $srfloat, 'Wx::SizerItem::SetRatioWH' ); $item->SetRatio( [ 1, 3 ] ); ok( $srfloat, 'Wx::SizerItem::SetRatioSize' ); $siz->Add( siz1 ); $siz->Add( siz1, 1, 1, 1, 1 ); ok( $addsiz, 'Wx::Sizer::AddSizer' ); $siz->Add( win1 ); $siz->Add( win1, 1, 1, 1, 1 ); ok( $addwin, 'Wx::Sizer::AddWindow' ); $siz->Add( 100, 100 ); $siz->Add( 100, 100, 1, 1, 1, 1 ); ok( $addspa, 'Wx::Sizer::AddSpace' ); $siz->Insert( 2, siz1 ); $siz->Insert( 2, siz1, 1, 1, 1, 1 ); ok( $inssiz, 'Wx::Sizer::InsertSizer' ); $siz->Insert( 3, win1 ); $siz->Insert( 3, win1, 1, 1, 1, 1 ); ok( $inswin, 'Wx::Sizer::InsertWindow' ); $siz->Insert( 4, 100, 100 ); $siz->Insert( 4, 100, 100, 1, 1, 1, 1 ); ok( $insspa, 'Wx::Sizer::InsertSpace' ); $siz->Prepend( siz1 ); $siz->Prepend( siz1, 1, 1, 1, 1 ); ok( $presiz, 'Wx::Sizer::PrependSizer' ); $siz->Prepend( win1 ); $siz->Prepend( win1, 1, 1, 1, 1 ); ok( $prewin, 'Wx::Sizer::PrependWindow' ); $siz->Prepend( 100, 100 ); $siz->Prepend( 100, 100, 1, 1, 1, 1 ); ok( $prespa, 'Wx::Sizer::PrependSpace' ); $siz->Remove( 3 ); ok( $remnth, 'Wx::Sizer::RemoveNth' ); $siz->Remove( siz1 ); ok( $remsiz, 'Wx::Sizer::RemoveSizer' ); if( $Wx::wxVERSION < 2.007 ) { $siz->Remove( win1 ); ok( $remwin, 'Wx::Sizer::RemoveWindow' ); } else { ok( 1, 'dummy' ); } $siz->SetItemMinSize( win1, 100, 100 ); ok( $siswin, 'Wx::Sizer::SetItemMinSizeWindow' ); $siz->SetItemMinSize( siz1, 100, 100 ); ok( $sissiz, 'Wx::Sizer::SetItemMinSizeSizer' ); $siz->SetItemMinSize( 4, 100, 100 ); ok( $sisnth, 'Wx::Sizer::SetItemMinSizeNth' ); $siz->SetMinSize( 100, 100 ); ok( $smsxy, 'Wx::Sizer::SetMinSizeXY' ); $siz->SetMinSize( [ 100, 100 ] ); ok( $smssize, 'Wx::Sizer::SetMinSizeSize' ); $win->Destroy; } # local variables: # mode: cperl # end: Wx-0.9923/t/09_create_delete.t000775000000000000 161412306612265 14216 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib './t'; use Tests_Helper 'test_frame'; package MyFrame; use base 'Wx::Frame'; use Test::More 'tests' => 8; sub new { my $this = shift->SUPER::new( undef, -1, 'a' ); # $class, @args my( @tests ) = ( [ 'Wx::MessageDialog', [ $this, 'dummy' ] ], [ 'Wx::Wizard', [ $this ] ], [ 'Wx::WizardPage', [ Wx::Wizard->new( $this ) ] ], [ 'Wx::WizardPageSimple', [ Wx::Wizard->new( $this ) ] ], ); foreach my $t ( @tests ) { my $class = ${$t}[0]; my @args = @{${$t}[1]}; my $obj = $class->new( @args ); isa_ok( $obj, $class, "$class: new returns an object of the correct class" ); $obj->Destroy(); ok( 1, " got there after $class->Destroy" ); } return $this; }; package main; test_frame( 'MyFrame', 1 ); Wx::wxTheApp()->MainLoop(); # local variables: # mode: cperl # end: Wx-0.9923/t/10_oor.t000775000000000000 571112306612265 12222 0ustar00Mark000000000000#!/usr/bin/perl -w # tests that Original Object Return works # only tests a few classes use strict; use Wx; use lib './t'; use Tests_Helper 'test_frame'; package MyListBox; use base 'Wx::ListBox'; package MyFrame; use base 'Wx::Frame'; use Test::More 'tests' => 58; sub new { my $this = shift->SUPER::new( undef, -1, 'a' ); # class, params my @data = ( [ 'Wx::Button', [ 'a' ] ], [ 'Wx::BitmapButton', [ Wx::Bitmap->new( 10, 10 ) ] ], [ 'Wx::CheckBox', [ 'foo' ] ], [ 'Wx::CheckListBox', [ [-1, -1], [-1, -1], [1] ] ], [ 'Wx::Choice', [] ], [ 'Wx::ComboBox', [ 'a' ] ], [ 'Wx::Gauge', [ 1 ] ], [ 'Wx::ListBox', [] ], [ 'Wx::ListCtrl', [] ], [ 'Wx::ListView', [] ], [ 'Wx::MiniFrame', [ 'a' ], 'SKIP' ], [ 'Wx::Notebook', [] ], [ 'Wx::RadioBox', [ 'a', [-1, -1], [-1, -1], [ 'a' ] ] ], [ 'Wx::RadioButton', [ 'a' ] ], [ 'Wx::SashWindow', [] ], [ 'Wx::ScrollBar', [] ], [ 'Wx::SpinButton', [] ], [ 'Wx::SpinCtrl', [ 'aaa' ] ], [ 'Wx::SplitterWindow', [] ], [ 'Wx::Slider', [ 3, 2, 4 ] ], [ 'Wx::StaticBitmap', [ Wx::Bitmap->new( 10, 10 ) ], 'SKIP' ], [ 'Wx::StaticBox', [ 'a' ], 'SKIP' ], [ 'Wx::StaticLine', [], 'SKIP' ], [ 'Wx::StaticText', [ 'a' ], 'SKIP' ], [ 'Wx::StatusBar', [], 'SKIP' ], [ 'Wx::TextCtrl', [ 'a' ] ], [ 'Wx::TreeCtrl', [] ], [ 'Wx::Window', [] ], ); foreach my $d ( @data ) { my( $class, $args, $skip_phase ) = @$d; SKIP: { # simple creation skip "Some controls are weird", 2 if Wx::wxMOTIF() && $class eq 'Wx::StaticLine' or Wx::wxMOTIF() && $class eq 'Wx::SpinCtrl' or Wx::wxGTK() && $class =~ m/^Wx::(MiniFrame|StatusBar)/ or Wx::wxMAC() && $class eq 'Wx::SpinCtrl'; skip "Segfaults under wxMotif 2.6.x", 2 if Wx::wxMOTIF() && $class eq 'Wx::StaticBitmap' && Wx::wxVERSION < 2.008; my $lb = $class->new( $this, -1, @$args ); my $lb2 = ($this->GetChildren)[-1]; is( $lb2, $lb, "objects reference the same hash ($class)" ); $lb->Destroy; skip "Skipping two-phase creation for $class", 1 if $skip_phase; # test double-phase creation $lb = $class->new; $lb->Create( $this, -1, @$args ); $lb2 = ($this->GetChildren)[-1]; is( $lb2, $lb, "objects reference the same hash ($class) (2 phase) " ); $lb->Destroy; } } my $lb = MyListBox->new( $this, -1 ); $lb->{MYDATA} = 'some data'; my $lb2 = ($this->GetChildren)[-1]; is( $lb2, $lb, "objects reference the same hash" ); is( $lb2->{MYDATA}, $lb->{MYDATA}, "sanity check" ); $lb->Destroy; return $this; }; package main; test_frame( 'MyFrame', 1 ); Wx::wxTheApp()->MainLoop(); # local variables: # mode: cperl # end: Wx-0.9923/t/11_twostage.t000775000000000000 102212306612265 13250 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib './t'; use Tests_Helper 'test_frame'; package MyFrame; use base 'Wx::Frame'; use Test::More 'tests' => 2; sub new { my $this = shift->SUPER::new( undef, -1, 'a' ); my $panel2 = Wx::Panel->new( $this, -1 ); like( "$panel2", qr/^Wx::Panel=HASH/ ); my $panel1 = Wx::Panel->new; like( "$panel1", qr/^Wx::Panel=HASH/ ); $panel1->Create( $this, -1 ); return $this; }; package main; test_frame( 'MyFrame', 1 ); Wx::wxTheApp()->MainLoop(); # local variables: # mode: cperl # end: Wx-0.9923/t/12_pod.t000775000000000000 43112306612265 12161 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use if !$ENV{AUTHOR_TESTS}, 'Test::More' => skip_all => 'Author tests'; use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; Test::Pod::all_pod_files_ok( Test::Pod::all_pod_files( 'blib' ) ); Wx-0.9923/t/13_nbksizer.t000775000000000000 66512306612265 13240 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib './t'; use Tests_Helper qw(in_frame); use Test::More 'tests' => 3; in_frame( sub { my $self = shift; my $nbk = Wx::Notebook->new( $self, -1 ); my $szr = Wx::NotebookSizer->new( $nbk ); isa_ok( $szr, 'Wx::NotebookSizer' ); $self->SetSizer( $szr ); ok( 1, 'Got there' ); $self->Layout; ok( 1, 'Got there too' ); } ); Wx-0.9923/t/14_eh_die.t000775000000000000 222712306612265 12643 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib './t'; use Tests_Helper qw(test_app); use Test::More Wx::wxMAC() ? ( 'skip_all' => 'Hangs on wxMac' ) : ( 'tests' => 6 ); use Wx::Event qw(EVT_TIMER); my $app = test_app( sub { Wx::Frame->new( undef, -1, 'X' )->Show( 1 ); # to appease wxGTK } ); my $timer = Wx::Timer->new($app, 123); sub onTimer0 { ok( 1, 'Timer fired' ); eval 'BEGIN { die "Fatal!" }'; ok( $@, 'Error was generated and trapped' ); EVT_TIMER( $app, 123, undef ); # disconnect EVT_TIMER( $app, 123, \&onTimer1 ); $timer->Start( 20, 1 ); } sub onTimer1 { ok( 1, 'Second timer fired' ); eval 'use ThisModuleDoesNotExist'; ok( $@, 'Error was generated and trapped' ); EVT_TIMER( $app, 123, undef ); # disconnect EVT_TIMER( $app, 123, \&onTimer2 ); $timer->Start( 20, 1 ); } sub onTimer2 { ok( 1, 'Third timer fired' ); die "I am going away..."; fail( 'panic: die() did not work' ); } EVT_TIMER( $app, 123, \&onTimer0 ); $timer->Start( 10, 1 ); eval { $app->MainLoop }; like( $@, qr/^I am going away\.\.\./, 'Exception correctly propagated' ); Wx-0.9923/t/15_threads.t000775000000000000 1347112306612265 13104 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS(), 'Test::More' => skip_all => 'No thread support'; use Test::More tests => 8; use Wx::Event qw(EVT_BUTTON); Wx::InitAllImageHandlers; my @tocheck; sub check_init(&) { my( $code ) = @_; push @tocheck, [ $code->(), $code->() ]; } sub check_undef { $_->[1] = undef foreach @tocheck; } my $testtreelist = defined(&Wx::TreeListCtrl::new); my $app = Wx::App->new( sub { 1 } ); # ancillary my $frame = Wx::Frame->new( undef, -1, 'Test frame' ); $frame->Show; # otherwise overlay tests fail my $treectrl = Wx::TreeCtrl->new( $frame, -1 ); my $textctrl = Wx::TextCtrl->new( $frame, -1, 'Some text' ); my $treelist = Wx::TreeListCtrl->new( $frame, -1) if $testtreelist; my $point = Wx::Point->new( 100, 100 ); my $size = Wx::Size->new( 100, 100 ); my $rect = Wx::Rect->new( $point, $size ); my $region = Wx::Region->new( $rect ); my $bitmap = Wx::Bitmap->new( 100, 100, -1 ); my $image = Wx::Image->new( 16, 16 ); my $locker; my $animation; if( Wx::wxVERSION >= 2.008 ) { $locker = Wx::WindowUpdateLocker->new( $frame ); $animation = Wx::Animation->new; } my $blocker; if( Wx::wxVERSION >= 2.009 ) { $blocker = Wx::EventBlocker->new( $frame ); } my $display = Wx::Display->new; my $vidmode = Wx::VideoMode->new; my $variant = Wx::Variant->new( 1 ); my $sound = Wx::Sound->new; my $dc = Wx::ScreenDC->new; my $dcclipper; if( Wx::wxVERSION >= 2.008 ) { $dcclipper = Wx::DCClipper->new( $dc, 20, 20, 40, 40 ); } my $notification; if( Wx::wxVERSION >= 2.009 ) { $notification = Wx::NotificationMessage->new( 'Test' ); $notification->Show(1); # avoid crash with current version } my $mimetypes = Wx::MimeTypesManager->new; EVT_BUTTON( $app, -1, sub { my $t = threads->create ( sub { ok( 1, 'In event thread' ); } ); ok( 1, 'Before event join' ); $t->join; ok( 1, 'After event join' ); } ); my $color = Wx::Colour->new( 0, 10, 20 ); my $color2 = Wx::Colour->new( 0, 10, 20 ); my $color3 = Wx::Colour->new( 0, 10, 20 ); check_init { Wx::Image->new( 16, 16 ) }; my $pen = Wx::Pen->new( $color2, 0, wxSOLID ); my $pen2 = Wx::Pen->new( $color2, 0, wxSOLID ); check_init { Wx::Bitmap->new( 100, 100, -1 ) }; check_init { Wx::Icon->new( 'wxpl.ico', Wx::wxBITMAP_TYPE_ICO() ) }; check_init { Wx::Brush->new( $bitmap ) }; check_init { Wx::Palette->new( ( [ 50 ] ) x 3 ) }; check_init { Wx::Cursor->new( $image ) }; check_init { Wx::Font->new( 15, wxROMAN, wxNORMAL, wxNORMAL ) }; check_init { Wx::NativeFontInfo->new }; check_init { Wx::Point->new( 100, 100 ) }; check_init { Wx::Size->new( 100, 100 ) }; check_init { Wx::Rect->new( $point, $size ) }; check_init { Wx::Region->new( $rect ) }; check_init { Wx::RegionIterator->new( $region ) }; check_init { Wx::FontData->new }; check_init { Wx::Locale->new( wxLANGUAGE_DEFAULT ) }; my $imagelist = Wx::ImageList->new( 16, 16 ); my $imagelist2 = Wx::ImageList->new( 32, 32 ); check_init { Wx::CaretSuspend->new( Wx::Frame->new( undef, -1, 'Moo' ) ) }; if( Wx::wxVERSION > 2.009001 ) { # OSX fails to handle null window or 1 check_init { Wx::WindowDisabler->new(0) }; } else { check_init { Wx::WindowDisabler->new }; } check_init { Wx::BusyCursor->new }; my $bi = Wx::BusyInfo->new( 'x' ); my $bi2 = Wx::BusyInfo->new( 'y' ); check_init { Wx::StopWatch->new }; my $tid = $treectrl->AddRoot( 'Test root' ); my $tid2 = $treectrl->AppendItem( $tid, 'Test child' ); my ($tlid, $tlid1, $tlid2, $tlid3, $tlid4, $tlccomp, $tlccompkeep); if($testtreelist) { $tlid = $treelist->GetRootItem; $tlid1 = $treelist->AppendItem( $tlid, 'Test Child' ); $tlid2 = $treelist->AppendItem( $tlid, 'Test Child' ); check_init { Wx::PlTreeListItemComparator->new }; $tlccomp = Wx::PlTreeListItemComparator->new; $tlccompkeep = Wx::PlTreeListItemComparator->new; $treelist->SetItemComparator( Wx::PlTreeListItemComparator->new ); } if(defined(&Wx::UIActionSimulator::new)) { check_init { Wx::UIActionSimulator->new }; } check_init { Wx::TextAttr->new }; check_init { Wx::LanguageInfo->new( 12345, 'Dummy', 2, 3, 'Dummy' ) }; check_init { Wx::SingleInstanceChecker->new }; check_init { Wx::ListItem->new }; check_init { Wx::ListItemAttr->new }; check_init { Wx::LogNull->new }; check_init { Wx::ClientDC->new( $frame ) }; check_init { Wx::ScreenDC->new }; check_init { Wx::ColourData->new }; check_init { Wx::FontEnumerator->new }; check_init { Wx::AcceleratorEntry->new( 0, 1, 1 ) }; check_init { Wx::AcceleratorTable->new }; check_init { Wx::PlValidator->new }; if( Wx::wxVERSION > 2.009002 ) { check_init { Wx::RichToolTip->new('Hello', 'Goodbye') } ; } # Wx::Overlay / Wx::DCOverlay thread tests # creation / destruction order is important my( $overlay1, $overlay2, $checkdc1, $checkdc2, $dcoverlay1, $dcoverlay2 ); if( Wx::wxVERSION >= 2.008 ) { $overlay1 = Wx::Overlay->new; $overlay2 = Wx::Overlay->new; $checkdc1 = Wx::ClientDC->new( $frame ); $checkdc2 = Wx::ClientDC->new( $frame ); $dcoverlay1 = Wx::DCOverlay->new($overlay1, $checkdc1); $dcoverlay2 = Wx::DCOverlay->new($overlay2, $checkdc2); } undef $dcoverlay1; undef $checkdc1; undef $overlay1; # check the ref hash is safe! undef $color2; undef $pen2; undef $imagelist2; undef $bi2; undef $tid2; undef $tlid2 if $testtreelist; undef $tlccomp if $testtreelist; check_undef; my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); my $evt2 = Wx::CommandEvent->new( wxEVT_COMMAND_BUTTON_CLICKED, 123 ); undef $evt2; $app->ProcessEvent ( Wx::CommandEvent->new( wxEVT_COMMAND_BUTTON_CLICKED, 123 ) ); ok( 1, 'After event' ); END { ok( 1, 'At END' ) }; Wx-0.9923/t/16_stream.t000775000000000000 240712306612265 12723 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx qw(wxBITMAP_TYPE_ICO); use lib './t'; use Test::More 'tests' => 8; use Fatal qw(open); my $app = Wx::SimpleApp->new; Wx::InitAllImageHandlers; sub _slurp { local $/; open my $fh, '< :raw', $_[0]; return <$fh>; } # plain Perl handle (file) { open my $fh, '< :raw', 'wxpl.ico'; my $img = Wx::Image->new( $fh, wxBITMAP_TYPE_ICO ); ok( $img->Ok ); is( $img->GetWidth, 32 ); } # in-memory file (uses PerlIO, hasn't a filehandle SKIP: { skip 'Perl 5.8 required', 2 if $] < 5.008; my $data = _slurp( 'wxpl.ico' ); open my $fh, '<', \$data; my $img = Wx::Image->new( $fh, wxBITMAP_TYPE_ICO ); ok( $img->Ok ); is( $img->GetWidth, 32 ); } # Tied filehandles SKIP: { eval { require IO::String }; skip 'IO::String required', 2 if $@; my $data = _slurp( 'wxpl.ico' ); my $fh = IO::String->new( $data ); my $img = Wx::Image->new( $fh, wxBITMAP_TYPE_ICO ); ok( $img->Ok ); is( $img->GetWidth, 32 ); } SKIP: { eval { require IO::Scalar }; skip 'IO::Scalar required', 2 if $@; my $data = _slurp( 'wxpl.ico' ); my $fh = IO::Scalar->new( \$data ); my $img = Wx::Image->new( $fh, wxBITMAP_TYPE_ICO ); ok( $img->Ok ); is( $img->GetWidth, 32 ); } Wx-0.9923/t/17_thread_evt.t000775000000000000 240012306612265 13547 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use threads::shared; use Wx; use if !Wx::wxTHREADS(), 'Test::More' => skip_all => 'No thread support'; use if Wx::wxVERSION < 2.006, 'Test::More' => skip_all => 'Hangs under 2.5'; use Test::More tests => 2; { package MyFrame; use base 'Wx::Frame'; } my $app = Wx::App->new( sub { 1 } ); my $frame = MyFrame->new( undef, -1, 'Test' ); my $timer = Wx::Timer->new( $frame ); my $TEST_DONE_EVENT : shared = Wx::NewEventType; # avoid use()ing Wx::Event on purpose Wx::Event::EVT_COMMAND( $frame, -1, $TEST_DONE_EVENT, \&got_thread_event ); Wx::Event::EVT_TIMER( $frame, -1, \&got_timer_event ); $timer->Start( 800, 1 ); $app->MainLoop; pass; # ended successfully sub got_timer_event { my( $frame, $event ) = @_; @_ = (); # hack to avoid "Scalars leaked" start_thread( $frame ); } sub start_thread { my( $frame ) = @_; my $thread = threads->new( \&send_thread_event, $frame ); $thread->join; } sub send_thread_event { my( $frame ) = @_; my $threvent = new Wx::PlThreadEvent( -1, $TEST_DONE_EVENT, 123 ); Wx::PostEvent( $frame, $threvent ); } sub got_thread_event { pass; $frame->Destroy; } Wx-0.9923/t/18_unicode.t000775000000000000 337012306612265 13060 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib './t'; use Tests_Helper qw(in_frame); use Test::More 'tests' => 12; use encoding qw(iso-8859-1); use Encode qw(is_utf8); my $ascii = 'Abcde'; my $ascii2 = 'XXX'; my $latin1 = 'Àbcdë'; my $unicode = "\x{1234}"; # needs to be upgraded to characters because wxPerl converts # based upon the current locale, which might not be Latin-1 utf8::upgrade( $latin1 ); # safe beacuse it's latin1 in_frame( sub { my $self = shift; my $label = Wx::StaticText->new( $self, -1, $ascii ); is( $label->GetLabel, $ascii ); $label->SetLabel( $ascii2 ); is( $label->GetLabel, $ascii2 ); SKIP: { skip "Only meaningful in ANSI mode", 4 if Wx::wxUNICODE; # it would be better to use the latin1 label, but it might # not round trip if the GUI locale is not latin1 $label->SetLabel( $ascii ); Wx::SetAlwaysUTF8( 1 ); is( $label->GetLabel, $ascii ); ok( is_utf8( $label->GetLabel ) ); Wx::SetAlwaysUTF8( 0 ); is( $label->GetLabel, $ascii ); ok( !is_utf8( $label->GetLabel ) ); }; SKIP: { skip "Unicode support needed for the tests", 6 unless Wx::wxUNICODE; skip "wrongly asserts under 2.5.x", 6 if Wx::wxVERSION < 2.006; $label->SetLabel( $latin1 ); is( $label->GetLabel, $latin1 ); ok( is_utf8( $latin1 ) ); ok( is_utf8( $label->GetLabel ) ); $label->SetLabel( $unicode ); is( $label->GetLabel, $unicode ); ok( is_utf8( $unicode ) ); ok( is_utf8( $label->GetLabel ) ); } } ); Wx-0.9923/t/19_overlay.t000775000000000000 202712306612265 13112 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx; use lib './t'; use Tests_Helper qw(in_frame); use if !defined(&Wx::Overlay::new) => 'Test::More' => skip_all => 'no Overlay'; use Test::More 'tests' => 1; # test will crash if creation / destruction does not happen as # we expect sub run_overlay_tests { my $self = shift; # Wx::Overlay real usage test $self->{wx_overlay} = Wx::Overlay->new; run_mouse_captured_drawing($self); run_mouse_captured_drawing($self); run_mouse_release($self); ok(1, 'Test completed'); } sub run_mouse_captured_drawing { my $self = shift; my $dc = Wx::ClientDC->new( $self ); my $olay = Wx::DCOverlay->new($self->{wx_overlay}, $dc); $dc->DrawLine(1,1,10,10); } sub run_mouse_release { my $self = shift; { # dc scope MUST be narrower than Reset call to overlay my $dc = Wx::ClientDC->new( $self ); my $olay = Wx::DCOverlay->new($self->{wx_overlay}, $dc); $olay->Clear; } $self->{wx_overlay}->Reset; } in_frame(\&run_overlay_tests); Wx-0.9923/t/20_ctx_threads.t000775000000000000 702212306612265 13731 0ustar00Mark000000000000#!/usr/bin/perl -w # Create a frame # Create and use some locally scoped contexts and GCDC's in the EVT_PAINT handler # After this, create and use some some globally scoped contexts and GCDCs using # the ClientDC base. # create and join thread; use strict; use Config; use if !$Config{useithreads} => 'Test::More' => skip_all => 'no threads'; use threads; use Wx qw(:everything); use if !Wx::wxTHREADS(), 'Test::More' => skip_all => 'No thread support'; use if !defined(&Wx::GraphicsContext::Create) => 'Test::More' => skip_all => 'no GraphicsContext'; use lib './t'; use Test::More 'tests' => 9; package MyFrame; use Test::More; use Wx qw( :everything ); use base 'Wx::Frame'; use Wx::Event qw(EVT_PAINT); my ( $context, $contextdc, $clientdc ); our $eventpaintcalled; sub new { my $class = shift; my $self = $class->SUPER::new( undef, -1, 'Test' ); $eventpaintcalled = 0; EVT_PAINT($self, \&on_paint); return $self; } sub on_draw { my $self = shift; ok(1, 'on draw called'); # persistent items my $usegcdc = (Wx::wxVERSION > 2.0080075) ? 1 : 0; # Cannot CREATE graphics context from a DC outside paint event on wxMAC # but we can 'Create' from a Window OR from GCDC (which creates from a window) $clientdc = Wx::ClientDC->new($self); # check out default renderer redisp $context = Wx::GraphicsRenderer::GetDefaultRenderer()->CreateContext( $self ); # we should not really use a Wx::GCDC AND create a GraphicsContext $contextdc = Wx::GCDC->new($clientdc) if $usegcdc; $context->SetFont( Wx::SystemSettings::GetFont( wxSYS_SYSTEM_FONT ), wxBLACK ); $context->DrawText('Test',20,20) if Wx::wxMAC(); if($usegcdc) { $contextdc->SetFont( Wx::SystemSettings::GetFont( wxSYS_SYSTEM_FONT ) ); $contextdc->DrawText('Test',20,50) if !Wx::wxMAC(); } ok($eventpaintcalled, 'event paint called before on_draw'); # ensure we fail if EVT_PAINT was not called can_ok('Wx::GraphicsContext', (qw( CLONE DESTROY ) )); SKIP: { skip "No wxGCDC", 1 if !$usegcdc; can_ok('Wx::GCDC', (qw( CLONE DESTROY GetGraphicsContext) )); } SKIP: { skip "No SetGraphicsContext on wxMAC or No wxGCDC", 1 if( Wx::wxMAC() || (!$usegcdc)); can_ok('Wx::GCDC', (qw( SetGraphicsContext) )); } my $t = threads->create ( sub { ok( 1, 'In thread' ); } ); ok( 1, 'Before join' ); $t->join; ok( 1, 'After join' ); } sub on_paint { my($self, $event) = @_; # some items to drop out of scope my $usegcdc = (Wx::wxVERSION > 2.0080075) ? 1 : 0; my $dc = Wx::PaintDC->new($self); my $gcdc = Wx::GCDC->new($dc) if $usegcdc; # if we use a Wx::GCDC - NEVER create a Graphics Context in OnPaint my $ctx = ( $usegcdc ) ? $gcdc->GetGraphicsContext : Wx::GraphicsContext::Create( $dc ); $ctx->SetFont( Wx::SystemSettings::GetFont( wxSYS_SYSTEM_FONT ), wxBLACK ); $ctx->DrawText('Test',20,20); if($usegcdc) { $gcdc->SetFont( Wx::SystemSettings::GetFont( wxSYS_SYSTEM_FONT ) ); $gcdc->DrawText('Test',20,50); } $eventpaintcalled = 1; } package MyApp; use Wx qw( :everything ); use base qw(Wx::App); sub OnInit { my $self = shift; my $mwin = MyFrame->new(undef, -1); $self->SetTopWindow($mwin); $mwin->Show(1); return 1; } package main; use Wx qw ( :everything ); my $app = MyApp->new; my $win = $app->GetTopWindow; my $timer = Wx::Timer->new( $win ); Wx::Event::EVT_TIMER( $win, -1, sub { $win->on_draw; wxTheApp->ExitMainLoop } ); $timer->Start( 500, 1 ); $app->MainLoop; $win->Destroy; END { ok(1, 'Global destruction OK'); } Wx-0.9923/t/21_locale.t000775000000000000 143512306612265 12663 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use Wx qw( wxLANGUAGE_DEFAULT wxLANGUAGE_ENGLISH ); use Wx::Locale; use Test::More 'tests' => 4; my $langinfo = Wx::Locale::GetLanguageInfo(wxLANGUAGE_DEFAULT); # see http://trac.wxwidgets.org/ticket/14039 - no default found on Mac $langinfo = Wx::Locale::GetLanguageInfo(wxLANGUAGE_ENGLISH) if( !$langinfo ); isa_ok( $langinfo, 'Wx::LanguageInfo', 'GetLanguageInfo' ); my $goodname = $langinfo->GetCanonicalName; my $langinfo2 = Wx::Locale::FindLanguageInfo($goodname); isa_ok( $langinfo2, 'Wx::LanguageInfo', 'FindLanguageInfo' ); my $langinfo3 = Wx::Locale::GetLanguageInfo(5000); ok(!defined($langinfo3), 'Undefined GetLanguageInfo'); my $langinfo4 = Wx::Locale::FindLanguageInfo('xx_xx'); ok(!defined($langinfo4), 'Undefined FindLanguageInfo'); Wx-0.9923/t/22_interface.t000775000000000000 134612306612265 13366 0ustar00Mark000000000000#!/usr/bin/perl -w # some basic tests that # interface parsing worked OK use strict; use Wx; use lib './t'; use Tests_Helper 'test_frame'; package MyFrame; use base 'Wx::Frame'; use Test::More 'tests' => 1; sub new { my $this = shift->SUPER::new( undef, -1, 'Test Frame' ); # we don't use Frame for Wx::Button::GetDefaultSize test # but perhaps we will add more tests in future # button GetDefaultSize ---------------------- my $buttonsize = undef; eval { my $wxbsize = Wx::Button::GetDefaultSize; $buttonsize = $wxbsize->x; }; ok(defined($buttonsize), 'Interface Wx::Button::GetDefaultSize'); return $this; }; package main; test_frame( 'MyFrame', 1 ); Wx::wxTheApp()->MainLoop(); # local variables: # mode: cperl # end: Wx-0.9923/t/Tests_Helper.pm000664000000000000 1342612306612265 13714 0ustar00Mark000000000000############################################################################# ## Name: t/Tests_Helper.pm ## Purpose: some test helper functions ## Author: Mattia Barbon ## Modified by: ## Created: 02/06/2001 ## RCS-ID: $Id: Tests_Helper.pm 3034 2011-03-13 21:54:19Z mbarbon $ ## Copyright: (c) 2001-2003, 2005 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Tests_Helper; use strict; use Wx; require Exporter; use Test::More (); *ok = \&Test::More::ok; *is = \&Test::More::is; *diag = \&Test::More::diag; use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK); @ISA = qw(Exporter); %EXPORT_TAGS = ( inheritance => [ qw(test_inheritance test_inheritance_all test_inheritance_start test_inheritance_end) ], overload => [ qw(hijack test_override) ], ); @EXPORT_OK = ( qw(test_app app_timeout test_frame in_frame), @{$EXPORT_TAGS{inheritance}}, @{$EXPORT_TAGS{overload}} ); sub in_frame($) { my $callback = shift; my $sub = sub { my $frame = Tests_Helper_Frame->new( $callback ); $frame->Show( 1 ); }; test_app( $sub ); Wx::wxTheApp->MainLoop; } sub app_timeout($) { test_app( sub { my $frame = Wx::Frame->new( undef, -1, 'test' ); my $timer = Wx::Timer->new( $frame ); Wx::Event::EVT_TIMER( $frame, -1, sub { Wx::wxTheApp()->ExitMainLoop; $frame->Destroy; } ); $timer->Start( 500, 1 ); Wx::WakeUpIdle(); $frame->Show( 1 ); } ); } sub test_app { my $function = shift; return Tests_Helper_App->new( $function ); } sub test_frame { my( $class, $delete_after ) = @_; my @params = @_; my $function = sub { my $frame = $class->new( @params ); if( $delete_after ) { Wx::Event::EVT_IDLE( $frame, sub { $frame->Destroy } ); # force idle event delivery Wx::Timer->new->Start( 100 ); } }; my $app = Tests_Helper_App->new( $function ); return $app; } sub test_inheritance { my( %perl_inheritance, %cpp_inheritance ); LOOP: foreach my $i ( @_ ) { my $key = $i; my $cn = "wx${key}"; my $ci = Wx::ClassInfo::FindClass( $cn ) or next LOOP; while ( 1 ) { push @{$cpp_inheritance{$key}}, cpp_2_perl( $cn ); last unless $ci; $cn = $ci->GetBaseClassName1(); last unless $cn; $ci = Wx::ClassInfo::FindClass( $cn ); } my $class = $key; while ( $class ) { push @{$perl_inheritance{$key}}, "Wx::$class"; last unless exists $Wx::{"${class}::"}{ISA} && @{ $Wx::{"${class}::"}{ISA} }; die $class unless defined @{ $Wx::{"${class}::"}{ISA} }[0]; $class = substr @{ $Wx::{"${class}::"}{ISA} }[0], 4; } } CLASSES: foreach my $i ( keys %perl_inheritance ) { my $pi = $perl_inheritance{$i}; my $ci = $cpp_inheritance{$i}; my @pi = @$pi; my @ci = @$ci; COMPARE: while ( @ci ) { my( $c_class ) = shift @ci; next if $c_class =~ m/Wx::Generic(?:ListCtrl|ImageList)/; next if $c_class =~ m/(?:Base|GTK|X11)$/; next if $c_class =~ m/StatusBar/; #FIXME// ad hoc next if $c_class eq 'Wx::Object'; my( $p_class ); while ( @pi ) { $p_class = shift @pi; next COMPARE if $c_class eq $p_class; } ok( 0, $pi->[0] . ' inheritance chain' ); diag( "C++ : @{$ci}" ); diag( "Perl: @{$pi}" ); next CLASSES; } ok( 1, $pi->[0] . ' inheritance chain' ); } } { my %classes_skip; sub test_inheritance_start { foreach my $i ( keys %Wx:: ) { next unless $i =~ m/^([^_].*)::$/; $classes_skip{$1} = 1; } } sub test_inheritance_end { my @classes; foreach my $i ( keys %Wx:: ) { next unless $i =~ m/^([^_].*)::$/; next if exists $classes_skip{$1}; push @classes, $1; } test_inheritance( @classes ); } } sub test_inheritance_all { my @classes; foreach my $i ( keys %Wx:: ) { next unless $i =~ m/^([^_].*)::$/; push @classes, $1; } test_inheritance( @classes ); } # utility sub perl_2_cpp { my( $v ) = $_[0]; $v =~ s/^Wx::/wx/; $v; } sub cpp_2_perl { my( $v ) = $_[0]; $v =~ s/^wx/Wx::/; $v; } sub hijack { while( @_ ) { my( $name, $code ) = ( shift, shift ); no strict 'refs'; die "Unknown method name '$name'" unless defined &{$name}; my $old = \&{$name}; undef *{$name}; *{$name} = sub { &$code; goto &$old }; } } sub test_override(&$) { my( $code, $method ) = @_; my $called = 0; local $Test::Builder::Level = $Test::Builder::Level + 1; hijack( $method => sub { $called = 1 } ); $code->(); ok( $called, $method ); } package Tests_Helper_App; use base 'Wx::App'; my $on_init; sub new { my $class = shift; my $function = shift; $on_init = $function; my $this = $class->SUPER::new( @_ ); $this->SetExitOnFrameDelete(1); return $this; } sub OnInit { &$on_init; return 1; } package Tests_Helper_Frame; use base 'Wx::Frame'; sub new { my $ref = shift; my $callback = shift; my $self = $ref->SUPER::new( undef, -1, "Test Frame" ); my $timer = Wx::Timer->new( $self ); Wx::Event::EVT_TIMER( $self, -1, sub { &$callback( $self, $_[1] ); $self->Destroy; } ); $timer->Start( 500, 1 ); Wx::WakeUpIdle(); return $self; } sub Destroy { my $self = shift; $self->SUPER::Destroy; Wx::wxTheApp()->ExitMainLoop; Wx::WakeUpIdle(); } 1; # Local variables: # # mode: cperl # # End: # Wx-0.9923/t/zz_distrib.t000775000000000000 117612306612265 13307 0ustar00Mark000000000000#!/usr/bin/perl -w use strict; use if !$ENV{AUTHOR_TESTS}, 'Test::More' => skip_all => 'Author tests'; use Test::More; eval "use YAML 0.35"; plan skip_all => "YAML 0.35 required for testing META.yml" if $@; eval "use Module::Info"; plan skip_all => "Module::Info required for testing META.yml" if $@; plan skip_all => "Run disttest to see the result of this test" unless -f 'META.yml'; plan 'tests' => 2; my $meta = YAML::LoadFile( 'META.yml' ); my $wx = Module::Info->new_from_file( 'Wx.pm' ); is( $meta->{version}, $wx->version, 'META.yml == Wx.pm' ); like( $meta->{generated_by}, qr/MY_Metafile/, 'Generated by MY_Metafile' ); Wx-0.9923/typemap000664000000000000 6450512313572313 12115 0ustar00Mark000000000000############################################################################# ## Name: typemap ## Purpose: typemap template ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: typemap.tmpl 3485 2013-04-16 15:28:22Z mdootson $ ## Copyright: (c) 2000-2013 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxFlexSizerGrowMode T_ENUM wxEdge T_ENUM wxRelationship T_ENUM wxWindowID T_WINDOWID wxStockCursor T_ENUM wxEventType T_ENUM wxCheckBoxState T_ENUM wxBitmapType T_ENUM const char * T_PV wxCoord T_IV float T_NV wxFontEncoding T_ENUM wxFontFamily T_ENUM wxFontStyle T_ENUM wxFontWeight T_ENUM wxRegionContain T_ENUM wxSashEdgePosition T_ENUM wxSashDragStatus T_ENUM wxListColumnFormat T_ENUM wxRasterOperationMode T_ENUM wxPolygonFillMode T_ENUM wxFloodFillStyle T_ENUM wxMappingMode T_ENUM off_t T_IV ResourceCat T_ENUM wxSeekMode T_ENUM WXCOLORREF T_IV EntryType T_ENUM wxKillError T_ENUM wxSignal T_ENUM wxItemKind T_ENUM wxLayoutDirection T_ENUM PlClassName T_CLASSNAME wxUint32 T_IV wxLongLong_t T_IV wxULongLong_t T_UV wxIntPtr T_IV wxUIntPtr T_UV wxByte T_U_CHAR wxTextCtrlHitTestResult T_ENUM wxArrayString T_ARRAYSTRING wxArrayString * T_ARRAYSTRING wxPliUserDataCD ** T_ARRAYUSERDATA wxArrayInt T_ARRAYINT wxTextPos T_IV wxTextAttrAlignment T_ENUM wxIdleMode T_ENUM wxDouble T_DOUBLE wxAnimationType T_ENUM wxUpdateUIMode T_ENUM wxWindowVariant T_ENUM wxImageResizeQuality T_ENUM wxAlignment T_ENUM wxFindReplaceDialogStyles T_ENUM wxFindReplaceFlags T_ENUM wxBackgroundStyle T_ENUM wxSystemColour T_ENUM wxSystemFont T_ENUM wxSystemMetric T_ENUM wxSystemScreenType T_ENUM wxOrientation T_ENUM wxBatteryState T_ENUM wxPowerType T_ENUM wxDirection T_ENUM wxPenStyle T_ENUM wxPenCap T_ENUM wxPenJoin T_ENUM wxBrushStyle T_ENUM wxShowEffect T_ENUM wxTipKind T_ENUM wxDialogLayoutAdaptationMode T_ENUM wxLogTraceMask T_UV wxLogLevel T_UV wxTraceMask T_UV wxTreeItemIdValue T_UV wxTreeItemIcon T_UV wxKeyCode T_KEYCODE wxChar T_IV wxStockHelpStringClient T_ENUM wxDateTime * O_NON_WXOBJECT Wx_UserDataCD * O_USERDATACD wxPliUserDataCD * O_USERDATACD Wx_UserDataO * O_USERDATAO wxPliUserDataO * O_USERDATAO SV_null * T_SV_NULL wxClassInfo * O_NON_WXOBJECT wxPropertyInfo * O_NON_WXOBJECT const wxClassInfo * O_NON_WXOBJECT const wxPropertyInfo * O_NON_WXOBJECT const wxTypeInfo * O_NON_WXOBJECT wxTypeInfo * O_NON_WXOBJECT wxPropertyAccessor * O_NON_WXOBJECT wxTypeKind T_ENUM wxPropertyInfoFlags T_ENUM wxObject * O_WXOBJECT wxApp * O_WXOBJECT wxStandardPaths * O_NON_WXOBJECT wxWindow * O_WXOBJECT wxPlWindow * O_WXOBJECT wxPlControl * O_WXOBJECT wxFrame * O_WXOBJECT wxTopLevelWindow * O_WXOBJECT wxEvtHandler * O_WXOBJECT wxMiniFrame * O_WXOBJECT wxPopupWindow * O_WXOBJECT wxPopupTransientWindow * O_WXOBJECT wxPlPopupTransientWindow * O_WXOBJECT wxDisplay * O_NON_WXOBJECT_THR wxVideoMode * O_NON_WXOBJECT_THR wxEventBlocker * O_NON_WXOBJECT_THR wxWindowUpdateLocker * O_NON_WXOBJECT_THR wxRichToolTip * O_NON_WXOBJECT_THR wxMenuBar * O_WXOBJECT wxMenu * O_WXOBJECT wxMenuItem * O_WXOBJECT wxRearrangeList * O_WXOBJECT_NAMED wxRearrangeCtrl * O_WXOBJECT_NAMED wxRearrangeDialog * O_WXOBJECT_NAMED wxDirFilterListCtrl * O_WXEVTHANDLER wxDirCtrl * O_WXEVTHANDLER wxFileCtrl * O_WXEVTHANDLER wxGenericDirCtrl * O_WXEVTHANDLER wxAnimationCtrl * O_WXEVTHANDLER wxStatusBar * O_WXEVTHANDLER wxToolBar * O_WXEVTHANDLER wxToolBarBase * O_WXEVTHANDLER wxToolBarSimple * O_WXEVTHANDLER wxPanel * O_WXOBJECT wxDialog * O_WXOBJECT wxControl * O_WXOBJECT wxButton * O_WXEVTHANDLER wxCommandLinkButton * O_WXEVTHANDLER wxStaticText * O_WXEVTHANDLER wxStaticLine * O_WXEVTHANDLER wxTextCtrl * O_WXOBJECT wxTextCtrlBase * O_WXOBJECT wxPropertySheetDialog * O_WXEVTHANDLER wxPlValidator * O_WXOBJECT wxValidator * O_WXOBJECT wxCheckBox * O_WXEVTHANDLER wxChoice * O_WXEVTHANDLER wxComboBox * O_WXEVTHANDLER wxComboCtrl * O_WXEVTHANDLER wxComboCtrlBase * O_WXEVTHANDLER wxComboPopup * O_NON_WXOBJECT wxPlComboPopup * O_NON_WXOBJECT wxOwnerDrawnComboBox * O_WXEVTHANDLER wxPlOwnerDrawnComboBox * O_WXEVTHANDLER wxControlWithItems * O_WXOBJECT wxEditableListBox * O_WXOBJECT wxListBox * O_WXEVTHANDLER wxStaticBox * O_WXEVTHANDLER wxRadioButton * O_WXEVTHANDLER wxRadioBox * O_WXEVTHANDLER wxScrollBar * O_WXEVTHANDLER wxNotebook * O_WXEVTHANDLER wxBookCtrl * O_WXEVTHANDLER wxBookCtrlBase * O_WXEVTHANDLER wxCheckListBox * O_WXEVTHANDLER wxGauge * O_WXEVTHANDLER wxBitmapButton * O_WXEVTHANDLER wxTreeCtrl * O_WXOBJECT wxListCtrl * O_WXOBJECT wxListView * O_WXEVTHANDLER wxStaticBitmap * O_WXEVTHANDLER wxSpinButton * O_WXEVTHANDLER wxSpinCtrl * O_WXEVTHANDLER wxSpinCtrlDouble * O_WXEVTHANDLER wxSlider * O_WXEVTHANDLER wxScrolledWindow * O_WXOBJECT wxVScrolledWindow * O_WXEVTHANDLER wxHScrolledWindow * O_WXEVTHANDLER wxHVScrolledWindow * O_WXEVTHANDLER wxPlVScrolledWindow * O_WXEVTHANDLER wxPlHScrolledWindow * O_WXEVTHANDLER wxPlHVScrolledWindow * O_WXEVTHANDLER wxVListBox * O_WXEVTHANDLER wxPlVListBox * O_WXEVTHANDLER wxSplitterWindow * O_WXEVTHANDLER wxSearchCtrl * O_WXEVTHANDLER wxSashWindow * O_WXEVTHANDLER wxToggleButton * O_WXEVTHANDLER wxBitmapToggleButton * O_WXEVTHANDLER wxSplashScreen * O_WXOBJECT wxSplashScreenWindow * O_WXOBJECT wxListbook * O_WXEVTHANDLER wxChoicebook * O_WXEVTHANDLER wxToolbook * O_WXEVTHANDLER wxTreebook * O_WXEVTHANDLER wxHyperlinkCtrl * O_WXEVTHANDLER wxPickerBase * O_WXEVTHANDLER wxColourPickerCtrl * O_WXEVTHANDLER wxFilePickerCtrl * O_WXEVTHANDLER wxDirPickerCtrl * O_WXEVTHANDLER wxFontPickerCtrl * O_WXEVTHANDLER wxCollapsiblePane * O_WXEVTHANDLER wxBitmapComboBox * O_WXEVTHANDLER wxInfoBar * O_WXEVTHANDLER wxHeaderCtrl * O_WXEVTHANDLER wxPlHeaderCtrl * O_WXEVTHANDLER wxHeaderCtrlSimple * O_WXEVTHANDLER wxPlHeaderCtrlSimple * O_WXEVTHANDLER wxHeaderColumn * O_NON_WXOBJECT_THR wxSettableHeaderColumn * O_NON_WXOBJECT_THR wxHeaderColumnSimple * O_NON_WXOBJECT_THR wxPlHeaderColumn * O_NON_WXOBJECT_SELF wxPlSettableHeaderColumn * O_NON_WXOBJECT_SELF wxBannerWindow * O_WXEVTHANDLER wxWizard * O_WXOBJECT wxWizardPage * O_WXOBJECT wxWizardPageSimple * O_WXOBJECT wxColourDialog * O_WXOBJECT wxFileDialog * O_WXOBJECT wxDirDialog * O_NON_WXOBJECT wxNumberEntryDialog * O_WXOBJECT wxMultiChoiceDialog * O_WXOBJECT wxSingleChoiceDialog * O_WXOBJECT wxMultipleChoiceDialog* O_WXOBJECT wxTextEntryDialog * O_WXOBJECT wxPasswordEntryDialog * O_WXOBJECT wxFontDialog * O_WXOBJECT wxPageSetupDialog * O_WXOBJECT wxPrintDialog * O_WXOBJECT wxMessageDialog * O_WXOBJECT wxProgressDialog * O_WXOBJECT wxFindReplaceDialog * O_WXOBJECT wxPropertySheetDialog * O_WXOBJECT wxFindReplaceData * O_NON_WXOBJECT wxColourData * O_WXOBJECT_THR wxFontData * O_WXOBJECT_THR wxSizer * O_WXOBJECT wxPlSizer * O_WXOBJECT wxBoxSizer * O_WXOBJECT wxStaticBoxSizer * O_WXOBJECT wxNotebookSizer * O_WXOBJECT wxGridSizer * O_WXOBJECT wxFlexGridSizer * O_WXOBJECT wxSizerItem * O_WXOBJECT wxGridBagSizer * O_WXOBJECT wxGBPosition * O_NON_WXOBJECT wxGBSpan * O_NON_WXOBJECT wxGBPosition O_GBPOSITION wxGBSpan O_GBSPAN wxGBPosition & O_GBPOSITION wxGBSpan & O_GBSPAN wxGBSizerItem * O_WXOBJECT wxStdDialogButtonSizer * O_WXOBJECT wxWrapSizer * O_WXOBJECT wxDC * O_WXOBJECT_THR wxMemoryDC * O_WXOBJECT_THR wxPrinterDC * O_WXOBJECT_THR wxWindowDC * O_WXOBJECT_THR wxClientDC * O_WXOBJECT_THR wxPaintDC * O_WXOBJECT_THR wxScreenDC * O_WXOBJECT_THR wxBufferedDC * O_WXOBJECT_THR wxBufferedPaintDC * O_WXOBJECT_THR wxAutoBufferedPaintDC * O_WXOBJECT_THR wxMirrorDC * O_WXOBJECT_THR wxSVGFileDC * O_WXOBJECT_THR wxGCDC * O_WXOBJECT_THR wxOverlay * O_NON_WXOBJECT_THR wxDCOverlay * O_NON_WXOBJECT_THR wxDCClipper * O_NON_WXOBJECT_THR wxTaskBarIcon * O_WXOBJECT wxNotificationMessage * O_NON_WXOBJECT_THR wxTextAttr * O_NON_WXOBJECT_THR wxLog * O_NON_WXOBJECT wxLogTextCtrl * O_NON_WXOBJECT wxLogNull * O_NON_WXOBJECT_THR wxLogGui * O_NON_WXOBJECT wxLogWindow * O_NON_WXOBJECT wxLogChain * O_NON_WXOBJECT wxLogPassThrough * O_NON_WXOBJECT wxLogStderr * O_NON_WXOBJECT wxPlLog * O_NON_WXOBJECT wxPlLogPassThrough * O_NON_WXOBJECT wxLogRecordInfo * O_NON_WXOBJECT wxPlLogFormatter * O_NON_WXOBJECT wxLogFormatter * O_NON_WXOBJECT wxLocale * O_NON_WXOBJECT_THR wxLanguageInfo * O_NON_WXOBJECT_THR const wxLanguageInfo * O_NON_WXOBJECT_THR wxStopWatch * O_NON_WXOBJECT_THR wxAboutDialogInfo * O_NON_WXOBJECT wxPoint O_POINT wxSize O_SIZE wxPosition O_POSITION wxColour O_NON_WXOBJECT_VAL wxPoint & O_POINT wxSize & O_SIZE wxPosition & O_POSITION wxColour & O_NON_WXOBJECT_VAL wxVariant* O_NON_WXOBJECT_THR wxVariant O_VARIANT wxProcess * O_WXOBJECT wxSound * O_NON_WXOBJECT_THR wxTipProvider * O_NON_WXOBJECT wxDrawObject * O_NON_WXOBJECT wxSize * O_NON_WXOBJECT_THR wxPoint * O_NON_WXOBJECT_THR wxRect * O_NON_WXOBJECT_THR wxPosition * O_NON_WXOBJECT_THR wxColour * O_NON_WXOBJECT_THR wxCaret * O_NON_WXOBJECT wxCaretSuspend * O_NON_WXOBJECT_THR wxWindowDisabler * O_NON_WXOBJECT_THR wxBusyCursor * O_NON_WXOBJECT_THR wxBusyInfo * O_NON_WXOBJECT_THR wxLayoutConstraints * O_WXOBJECT wxIndividualLayoutConstraint * O_WXOBJECT wxDropTarget * O_NON_WXOBJECT wxListItem * O_NON_WXOBJECT_THR wxListItemAttr * O_NON_WXOBJECT_THR wxPliTreeItemData * O_NON_WXOBJECT wxTreeItemData * O_NON_WXOBJECT wxTreeItemId * O_NON_WXOBJECT_THR wxAnimation * O_WXOBJECT_THR wxFontMapper * O_NON_WXOBJECT wxFontEnumerator * O_NON_WXOBJECT_THR wxPlFontEnumerator * O_NON_WXOBJECT_VXSP_THR wxNativeFontInfo * O_NON_WXOBJECT_THR wxFont * O_WXOBJECT_THR wxRegion * O_WXOBJECT_THR wxRegionIterator * O_WXOBJECT_THR wxIcon * O_WXOBJECT_THR wxIconBundle * O_NON_WXOBJECT wxIconLocation * O_NON_WXOBJECT wxBitmap * O_WXOBJECT_THR wxCursor * O_WXOBJECT_THR const wxCursor * O_WXOBJECT_THR wxToolTip * O_WXOBJECT wxPen * O_WXOBJECT_THR wxMask * O_WXOBJECT wxBrush * O_WXOBJECT_THR wxBitmapHandler * O_WXOBJECT wxPalette * O_WXOBJECT_THR wxMimeTypesManager * O_NON_WXOBJECT_THR wxFileType * O_NON_WXOBJECT wxFileTypeInfo * O_NON_WXOBJECT wxImage * O_WXOBJECT_THR wxImageHandler * O_WXOBJECT wxBMPHandler * O_WXOBJECT wxGIFHandler * O_WXOBJECT wxPCXHandler * O_WXOBJECT wxPNMHandler * O_WXOBJECT wxTIFFHandler * O_WXOBJECT wxJPEGHandler * O_WXOBJECT wxPNGHandler * O_WXOBJECT wxXPMHandler * O_WXOBJECT wxIFFHandler * O_WXOBJECT wxICOHandler * O_WXOBJECT wxCURHandler * O_WXOBJECT wxANIHandler * O_WXOBJECT wxTGAHandler * O_WXOBJECT wxImageList * O_WXOBJECT_THR wxToolBarToolBase * O_NON_WXOBJECT wxAcceleratorEntry * O_NON_WXOBJECT_THR wxAcceleratorTable * O_WXOBJECT_THR wxTimer * O_WXOBJECT wxSingleInstanceChecker * O_NON_WXOBJECT_THR wxWave * O_NON_WXOBJECT wxGraphicsRenderer * O_WXOBJECT wxGraphicsBrush * O_WXOBJECT_THR wxGraphicsContext * O_WXOBJECT_THR wxGraphicsFont * O_WXOBJECT_THR wxGraphicsMatrix * O_WXOBJECT_THR wxGraphicsObject * O_WXOBJECT_THR wxGraphicsPath * O_WXOBJECT_THR wxGraphicsPen * O_WXOBJECT_THR wxGraphicsGradientStop * O_NON_WXOBJECT_THR wxGraphicsGradientStops * O_NON_WXOBJECT_THR wxTreeListCtrl * O_WXEVTHANDLER wxTreeListItem * O_NON_WXOBJECT_THR wxTreeListItemComparator * O_NON_WXOBJECT_THR wxPlTreeListItemComparator * O_NON_WXOBJECT_SELF # events wxEvent * O_WXOBJECT_THR wxActivateEvent * O_WXOBJECT_THR wxBookCtrlEvent * O_WXOBJECT_THR wxClipboardTextEvent * O_WXOBJECT_THR wxCloseEvent * O_WXOBJECT_THR wxCommandEvent * O_WXOBJECT_THR wxContextMenuEvent * O_WXOBJECT_THR wxEraseEvent * O_WXOBJECT_THR wxFindDialogEvent * O_WXOBJECT_THR wxFocusEvent * O_WXOBJECT_THR wxFileCtrlEvent * O_WXOBJECT_THR wxKeyEvent * O_WXOBJECT_THR wxHelpEvent * O_WXOBJECT_THR wxIconizeEvent * O_WXOBJECT_THR wxIdleEvent * O_WXOBJECT_THR wxInitDialogEvent * O_WXOBJECT_THR wxJoystickEvent * O_WXOBJECT_THR wxListbookEvent * O_WXOBJECT_THR wxListEvent * O_WXOBJECT_THR wxMaximizeEvent * O_WXOBJECT_THR wxMenuEvent * O_WXOBJECT_THR wxMouseCaptureChangedEvent * O_WXOBJECT_THR wxMouseCaptureLostEvent * O_WXOBJECT_THR wxMouseEvent * O_WXOBJECT_THR wxMoveEvent * O_WXOBJECT_THR wxNotebookEvent * O_WXOBJECT_THR wxNotifyEvent * O_WXOBJECT_THR wxPaintEvent * O_WXOBJECT_THR wxQueryLayoutInfo * O_WXOBJECT_THR wxSashEvent * O_WXOBJECT_THR wxSizeEvent * O_WXOBJECT_THR wxScrollEvent * O_WXOBJECT_THR wxScrollWinEvent * O_WXOBJECT_THR wxSpinEvent * O_WXOBJECT_THR wxSplitterEvent * O_WXOBJECT_THR wxSetCursorEvent * O_WXOBJECT_THR wxSysColourChangedEvent * O_WXOBJECT_THR wxTaskBarIconEvent * O_WXOBJECT_THR wxTimerEvent * O_WXOBJECT_THR wxTreeEvent * O_WXOBJECT_THR wxUpdateUIEvent * O_WXOBJECT_THR wxTextUrlEvent * O_WXOBJECT_THR wxProcessEvent * O_WXOBJECT_THR wxWizardEvent * O_WXOBJECT_THR wxTreebookEvent * O_WXOBJECT_THR wxNavigationKeyEvent * O_WXOBJECT_THR wxChildFocusEvent * O_WXOBJECT_THR wxHyperlinkEvent * O_WXOBJECT_THR wxPowerEvent * O_WXOBJECT_THR wxColourPickerEvent * O_WXOBJECT_THR wxFileDirPickerEvent * O_WXOBJECT_THR wxFontPickerEvent * O_WXOBJECT_THR wxWindowCreateEvent * O_WXOBJECT_THR wxWindowDestroyEvent * O_WXOBJECT_THR wxCollapsiblePaneEvent * O_WXOBJECT_THR wxHeaderCtrlEvent * O_WXOBJECT_THR wxTreeListEvent * O_WXOBJECT_THR wxPlEvent * O_WXOBJECT_THR wxPlCommandEvent * O_WXOBJECT_THR wxPlThreadEvent * O_WXOBJECT_THR wxConfigBase * O_NON_WXOBJECT wxConfig * O_NON_WXOBJECT wxFileConfig * O_NON_WXOBJECT wxArtProvider * O_WXOBJECT wxPlArtProvider * O_WXOBJECT wxPlEventFilter * O_NON_WXOBJECT_THR wxEventFilter * O_NON_WXOBJECT_THR wxUIActionSimulator * O_NON_WXOBJECT_THR OUTPUT O_WXOBJECT wxPli_object_2_sv( aTHX_ $arg, $var ); O_WXOBJECT_THR wxPli_object_2_sv( aTHX_ $arg, $var ); wxPli_thread_sv_register( aTHX_ ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt}, $var, $arg ); O_WXEVTHANDLER wxPli_evthandler_2_sv( aTHX_ $arg, $var ); O_WXOBJECT_NAMED wxPli_namedobject_2_sv( aTHX_ $arg, $var, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_WXOBJECT_NAMED_THR wxPli_namedobject_2_sv( aTHX_ $arg, $var, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); wxPli_thread_sv_register( aTHX_ ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt}, $var, $arg ); O_WXCLIENTDATACONTAINER wxPli_clientdatacontainer_2_sv( aTHX_ $arg, $var, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_WXCLIENTDATACONTAINER_THR_SV wxPli_clientdatacontainer_2_sv( aTHX_ $arg, $var, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); wxPli_thread_sv_register( aTHX_ ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt}, SvRV( $arg ), $arg ); O_NON_WXOBJECT wxPli_non_object_2_sv( aTHX_ $arg, $var, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_NON_WXOBJECT_THR wxPli_non_object_2_sv( aTHX_ $arg, $var, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); wxPli_thread_sv_register( aTHX_ ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt}, $var, $arg ); O_NON_WXOBJECT_THR_SV wxPli_non_object_2_sv( aTHX_ $arg, $var, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); wxPli_thread_sv_register( aTHX_ ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt}, SvRV( $arg ), $arg ); O_SIZE wxPli_non_object_2_sv( aTHX_ $arg, new $type($var), ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_GBPOSITION wxPli_non_object_2_sv( aTHX_ $arg, new $type($var), ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_GBSPAN wxPli_non_object_2_sv( aTHX_ $arg, new $type($var), ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_POINT wxPli_non_object_2_sv( aTHX_ $arg, new $type($var), ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_POSITION wxPli_non_object_2_sv( aTHX_ $arg, new $type($var), ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); T_KEYCODE sv_setiv( $arg, $var ); T_UV sv_setuv( $arg, (UV)$var ); INPUT O_WXOBJECT $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_WXOBJECT_THR $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_WXEVTHANDLER $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_WXOBJECT_NAMED $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_WXOBJECT_NAMED_THR $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_WXCLIENTDATACONTAINER $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_WXCLIENTDATACONTAINER_THR_SV $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_NON_WXOBJECT $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_NON_WXOBJECT_VAL $var = *($type *) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_NON_WXOBJECT_THR $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_NON_WXOBJECT_THR_SV $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_POINT $var = wxPli_sv_2_wxpoint( aTHX_ $arg ); O_SIZE $var = wxPli_sv_2_wxsize( aTHX_ $arg ); O_POSITION $var = wxPli_sv_2_wxposition( aTHX_ $arg ); O_GBPOSITION $var = wxPli_sv_2_wxgbposition( aTHX_ $arg ); O_GBSPAN $var = wxPli_sv_2_wxgbspan( aTHX_ $arg ); T_KEYCODE $var = wxPli_sv_2_keycode( aTHX_ $arg ); T_UV $var = ($type)SvUV( $arg ); T_CLASSNAME $var = wxPli_get_class( aTHX_ $arg ); O_VARIANT $var = wxPli_sv_2_wxvariant( aTHX_ $arg ); # # Wx_UserData* # INPUT O_USERDATACD if( SvOK( $arg ) ) { $var = new wxPliUserDataCD( $arg ); } else $var = 0; O_USERDATAO if( SvOK( $arg ) ) { $var = new wxPliUserDataO( $arg ); } else $var = 0; OUTPUT O_USERDATACD $arg = ( $var == 0 ) ? &PL_sv_undef : $var->GetData(); SvREFCNT_inc( $arg ); // xsubpp mortalizes it... O_USERDATAO $arg = ( $var == 0 ) ? &PL_sv_undef : $var->GetData(); SvREFCNT_inc( $arg ); // xsubpp mortalizes it... # # Objects with a self reference # INPUT O_NON_WXOBJECT_SELF $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); OUTPUT O_NON_WXOBJECT_SELF $arg = ( $var == 0 ) ? &PL_sv_undef : $var->GetSelf(); SvREFCNT_inc( $arg ); // xsubpp mortalizes it... # # Non Objects handled by Wx::XSP::Virtual XS++ plugin # INPUT O_NON_WXOBJECT_VXSP $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_NON_WXOBJECT_VXSP_THR $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); OUTPUT O_NON_WXOBJECT_VXSP if( $var == 0 ) { $arg = &PL_sv_undef; } else { SvSetSV_nosteal( $arg, $var->GetSelf() ); } O_NON_WXOBJECT_VXSP_THR if( $var == 0 ) { $arg = &PL_sv_undef; } else { SvSetSV_nosteal( $arg, $var->GetSelf() ); wxPli_thread_sv_register( aTHX_ ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx|wxPl)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt}, $var, $arg ); } # # SV_null # INPUT T_SV_NULL $var = SvOK( $arg ) ? $arg : 0; OUTPUT T_SV_NULL $arg = ( $var == 0 ) ? &PL_sv_undef : $var; SvREFCNT_inc( $arg ); // xsubpp mortalizes it... # # streams # TYPEMAP wxPliInputStream S_PL_ISTREAM wxPliOutputStream S_PL_OSTREAM wxInputStream * S_WX_ISTREAM wxOutputStream * S_WX_OSTREAM Wx_InputStream * O_NON_WXOBJECT Wx_OutputStream * O_NON_WXOBJECT INPUT S_PL_ISTREAM wxPli_sv_2_istream( aTHX_ $arg, $var ); S_PL_OSTREAM wxPli_sv_2_ostream( aTHX_ $arg, $var ); OUTPUT S_WX_ISTREAM wxPli_stream_2_sv( aTHX_ $arg, $var, "Wx::InputStream" ); S_WX_OSTREAM wxPli_stream_2_sv( aTHX_ $arg, $var, "Wx::OutputStream" ); # Unicode support TYPEMAP wxChar * T_WXCHAR const wxChar* T_CONST_WXCHAR wxString T_WXSTRING INPUT T_WXCHAR WXCHAR_INPUT( $var, wxChar*, $arg ); T_CONST_WXCHAR WXCHAR_INPUT( $var, wxChar*, $arg ); T_WXSTRING WXSTRING_INPUT( $var, $type, $arg ); OUTPUT T_WXCHAR WXCHAR_OUTPUT( $var, $arg ); T_CONST_WXCHAR WXCHAR_OUTPUT( $var, $arg ); T_WXSTRING WXSTRING_OUTPUT( $var, $arg ); # typemap for window ID INPUT T_WINDOWID $var = wxPli_get_wxwindowid( aTHX_ $arg ); OUTPUT T_WINDOWID sv_setiv($arg, (IV)$var); INPUT T_ARRAYSTRING wxPli_av_2_arraystring( aTHX_ $arg, & $var ); INPUT T_ARRAYINT wxPli_av_2_arrayint( aTHX_ $arg, & $var ); INPUT T_ARRAYUSERDATA wxPli_av_2_userdatacdarray( aTHX_ $arg, & $var ); wxPliArrayGuard guard_$var = $var;Wx-0.9923/typemap.tmpl000664000000000000 5567112306612233 13072 0ustar00Mark000000000000############################################################################# ## Name: typemap.tmpl ## Purpose: typemap template ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: typemap.tmpl 3485 2013-04-16 15:28:22Z mdootson $ ## Copyright: (c) 2000-2013 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# TYPEMAP wxFlexSizerGrowMode T_ENUM wxEdge T_ENUM wxRelationship T_ENUM wxWindowID T_WINDOWID wxStockCursor T_ENUM wxEventType T_ENUM wxCheckBoxState T_ENUM wxBitmapType T_ENUM const char * T_PV wxCoord T_IV float T_NV wxFontEncoding T_ENUM wxFontFamily T_ENUM wxFontStyle T_ENUM wxFontWeight T_ENUM wxRegionContain T_ENUM wxSashEdgePosition T_ENUM wxSashDragStatus T_ENUM wxListColumnFormat T_ENUM wxRasterOperationMode T_ENUM wxPolygonFillMode T_ENUM wxFloodFillStyle T_ENUM wxMappingMode T_ENUM off_t T_IV ResourceCat T_ENUM wxSeekMode T_ENUM WXCOLORREF T_IV EntryType T_ENUM wxKillError T_ENUM wxSignal T_ENUM wxItemKind T_ENUM wxLayoutDirection T_ENUM PlClassName T_CLASSNAME wxUint32 T_IV wxLongLong_t T_IV wxULongLong_t T_UV wxIntPtr T_IV wxUIntPtr T_UV wxByte T_U_CHAR wxTextCtrlHitTestResult T_ENUM wxArrayString T_ARRAYSTRING wxArrayString * T_ARRAYSTRING wxPliUserDataCD ** T_ARRAYUSERDATA wxArrayInt T_ARRAYINT wxTextPos T_IV wxTextAttrAlignment T_ENUM wxIdleMode T_ENUM wxDouble T_DOUBLE wxAnimationType T_ENUM wxUpdateUIMode T_ENUM wxWindowVariant T_ENUM wxImageResizeQuality T_ENUM wxAlignment T_ENUM wxFindReplaceDialogStyles T_ENUM wxFindReplaceFlags T_ENUM wxBackgroundStyle T_ENUM wxSystemColour T_ENUM wxSystemFont T_ENUM wxSystemMetric T_ENUM wxSystemScreenType T_ENUM wxOrientation T_ENUM wxBatteryState T_ENUM wxPowerType T_ENUM wxDirection T_ENUM wxPenStyle T_ENUM wxPenCap T_ENUM wxPenJoin T_ENUM wxBrushStyle T_ENUM wxShowEffect T_ENUM wxTipKind T_ENUM wxDialogLayoutAdaptationMode T_ENUM wxLogTraceMask T_UV wxLogLevel T_UV wxTraceMask T_UV wxTreeItemIdValue T_UV wxTreeItemIcon T_UV wxKeyCode T_KEYCODE wxChar T_IV wxStockHelpStringClient T_ENUM wxDateTime * O_NON_WXOBJECT Wx_UserDataCD * O_USERDATACD wxPliUserDataCD * O_USERDATACD Wx_UserDataO * O_USERDATAO wxPliUserDataO * O_USERDATAO SV_null * T_SV_NULL wxClassInfo * O_NON_WXOBJECT wxPropertyInfo * O_NON_WXOBJECT const wxClassInfo * O_NON_WXOBJECT const wxPropertyInfo * O_NON_WXOBJECT const wxTypeInfo * O_NON_WXOBJECT wxTypeInfo * O_NON_WXOBJECT wxPropertyAccessor * O_NON_WXOBJECT wxTypeKind T_ENUM wxPropertyInfoFlags T_ENUM wxObject * O_WXOBJECT wxApp * O_WXOBJECT wxStandardPaths * O_NON_WXOBJECT wxWindow * O_WXOBJECT wxPlWindow * O_WXOBJECT wxPlControl * O_WXOBJECT wxFrame * O_WXOBJECT wxTopLevelWindow * O_WXOBJECT wxEvtHandler * O_WXOBJECT wxMiniFrame * O_WXOBJECT wxPopupWindow * O_WXOBJECT wxPopupTransientWindow * O_WXOBJECT wxPlPopupTransientWindow * O_WXOBJECT wxDisplay * O_NON_WXOBJECT_THR wxVideoMode * O_NON_WXOBJECT_THR wxEventBlocker * O_NON_WXOBJECT_THR wxWindowUpdateLocker * O_NON_WXOBJECT_THR wxRichToolTip * O_NON_WXOBJECT_THR wxMenuBar * O_WXOBJECT wxMenu * O_WXOBJECT wxMenuItem * O_WXOBJECT wxRearrangeList * O_WXOBJECT_NAMED wxRearrangeCtrl * O_WXOBJECT_NAMED wxRearrangeDialog * O_WXOBJECT_NAMED wxDirFilterListCtrl * O_WXEVTHANDLER wxDirCtrl * O_WXEVTHANDLER wxFileCtrl * O_WXEVTHANDLER wxGenericDirCtrl * O_WXEVTHANDLER wxAnimationCtrl * O_WXEVTHANDLER wxStatusBar * O_WXEVTHANDLER wxToolBar * O_WXEVTHANDLER wxToolBarBase * O_WXEVTHANDLER wxToolBarSimple * O_WXEVTHANDLER wxPanel * O_WXOBJECT wxDialog * O_WXOBJECT wxControl * O_WXOBJECT wxButton * O_WXEVTHANDLER wxCommandLinkButton * O_WXEVTHANDLER wxStaticText * O_WXEVTHANDLER wxStaticLine * O_WXEVTHANDLER wxTextCtrl * O_WXOBJECT wxTextCtrlBase * O_WXOBJECT wxPropertySheetDialog * O_WXEVTHANDLER wxPlValidator * O_WXOBJECT wxValidator * O_WXOBJECT wxCheckBox * O_WXEVTHANDLER wxChoice * O_WXEVTHANDLER wxComboBox * O_WXEVTHANDLER wxComboCtrl * O_WXEVTHANDLER wxComboCtrlBase * O_WXEVTHANDLER wxComboPopup * O_NON_WXOBJECT wxPlComboPopup * O_NON_WXOBJECT wxOwnerDrawnComboBox * O_WXEVTHANDLER wxPlOwnerDrawnComboBox * O_WXEVTHANDLER wxControlWithItems * O_WXOBJECT wxEditableListBox * O_WXOBJECT wxListBox * O_WXEVTHANDLER wxStaticBox * O_WXEVTHANDLER wxRadioButton * O_WXEVTHANDLER wxRadioBox * O_WXEVTHANDLER wxScrollBar * O_WXEVTHANDLER wxNotebook * O_WXEVTHANDLER wxBookCtrl * O_WXEVTHANDLER wxBookCtrlBase * O_WXEVTHANDLER wxCheckListBox * O_WXEVTHANDLER wxGauge * O_WXEVTHANDLER wxBitmapButton * O_WXEVTHANDLER wxTreeCtrl * O_WXOBJECT wxListCtrl * O_WXOBJECT wxListView * O_WXEVTHANDLER wxStaticBitmap * O_WXEVTHANDLER wxSpinButton * O_WXEVTHANDLER wxSpinCtrl * O_WXEVTHANDLER wxSpinCtrlDouble * O_WXEVTHANDLER wxSlider * O_WXEVTHANDLER wxScrolledWindow * O_WXOBJECT wxVScrolledWindow * O_WXEVTHANDLER wxHScrolledWindow * O_WXEVTHANDLER wxHVScrolledWindow * O_WXEVTHANDLER wxPlVScrolledWindow * O_WXEVTHANDLER wxPlHScrolledWindow * O_WXEVTHANDLER wxPlHVScrolledWindow * O_WXEVTHANDLER wxVListBox * O_WXEVTHANDLER wxPlVListBox * O_WXEVTHANDLER wxSplitterWindow * O_WXEVTHANDLER wxSearchCtrl * O_WXEVTHANDLER wxSashWindow * O_WXEVTHANDLER wxToggleButton * O_WXEVTHANDLER wxBitmapToggleButton * O_WXEVTHANDLER wxSplashScreen * O_WXOBJECT wxSplashScreenWindow * O_WXOBJECT wxListbook * O_WXEVTHANDLER wxChoicebook * O_WXEVTHANDLER wxToolbook * O_WXEVTHANDLER wxTreebook * O_WXEVTHANDLER wxHyperlinkCtrl * O_WXEVTHANDLER wxPickerBase * O_WXEVTHANDLER wxColourPickerCtrl * O_WXEVTHANDLER wxFilePickerCtrl * O_WXEVTHANDLER wxDirPickerCtrl * O_WXEVTHANDLER wxFontPickerCtrl * O_WXEVTHANDLER wxCollapsiblePane * O_WXEVTHANDLER wxBitmapComboBox * O_WXEVTHANDLER wxInfoBar * O_WXEVTHANDLER wxHeaderCtrl * O_WXEVTHANDLER wxPlHeaderCtrl * O_WXEVTHANDLER wxHeaderCtrlSimple * O_WXEVTHANDLER wxPlHeaderCtrlSimple * O_WXEVTHANDLER wxHeaderColumn * O_NON_WXOBJECT_THR wxSettableHeaderColumn * O_NON_WXOBJECT_THR wxHeaderColumnSimple * O_NON_WXOBJECT_THR wxPlHeaderColumn * O_NON_WXOBJECT_SELF wxPlSettableHeaderColumn * O_NON_WXOBJECT_SELF wxBannerWindow * O_WXEVTHANDLER wxWizard * O_WXOBJECT wxWizardPage * O_WXOBJECT wxWizardPageSimple * O_WXOBJECT wxColourDialog * O_WXOBJECT wxFileDialog * O_WXOBJECT wxDirDialog * O_NON_WXOBJECT wxNumberEntryDialog * O_WXOBJECT wxMultiChoiceDialog * O_WXOBJECT wxSingleChoiceDialog * O_WXOBJECT wxMultipleChoiceDialog* O_WXOBJECT wxTextEntryDialog * O_WXOBJECT wxPasswordEntryDialog * O_WXOBJECT wxFontDialog * O_WXOBJECT wxPageSetupDialog * O_WXOBJECT wxPrintDialog * O_WXOBJECT wxMessageDialog * O_WXOBJECT wxProgressDialog * O_WXOBJECT wxFindReplaceDialog * O_WXOBJECT wxPropertySheetDialog * O_WXOBJECT wxFindReplaceData * O_NON_WXOBJECT wxColourData * O_WXOBJECT_THR wxFontData * O_WXOBJECT_THR wxSizer * O_WXOBJECT wxPlSizer * O_WXOBJECT wxBoxSizer * O_WXOBJECT wxStaticBoxSizer * O_WXOBJECT wxNotebookSizer * O_WXOBJECT wxGridSizer * O_WXOBJECT wxFlexGridSizer * O_WXOBJECT wxSizerItem * O_WXOBJECT wxGridBagSizer * O_WXOBJECT wxGBPosition * O_NON_WXOBJECT wxGBSpan * O_NON_WXOBJECT wxGBPosition O_GBPOSITION wxGBSpan O_GBSPAN wxGBPosition & O_GBPOSITION wxGBSpan & O_GBSPAN wxGBSizerItem * O_WXOBJECT wxStdDialogButtonSizer * O_WXOBJECT wxWrapSizer * O_WXOBJECT wxDC * O_WXOBJECT_THR wxMemoryDC * O_WXOBJECT_THR wxPrinterDC * O_WXOBJECT_THR wxWindowDC * O_WXOBJECT_THR wxClientDC * O_WXOBJECT_THR wxPaintDC * O_WXOBJECT_THR wxScreenDC * O_WXOBJECT_THR wxBufferedDC * O_WXOBJECT_THR wxBufferedPaintDC * O_WXOBJECT_THR wxAutoBufferedPaintDC * O_WXOBJECT_THR wxMirrorDC * O_WXOBJECT_THR wxSVGFileDC * O_WXOBJECT_THR wxGCDC * O_WXOBJECT_THR wxOverlay * O_NON_WXOBJECT_THR wxDCOverlay * O_NON_WXOBJECT_THR wxDCClipper * O_NON_WXOBJECT_THR wxTaskBarIcon * O_WXOBJECT wxNotificationMessage * O_NON_WXOBJECT_THR wxTextAttr * O_NON_WXOBJECT_THR wxLog * O_NON_WXOBJECT wxLogTextCtrl * O_NON_WXOBJECT wxLogNull * O_NON_WXOBJECT_THR wxLogGui * O_NON_WXOBJECT wxLogWindow * O_NON_WXOBJECT wxLogChain * O_NON_WXOBJECT wxLogPassThrough * O_NON_WXOBJECT wxLogStderr * O_NON_WXOBJECT wxPlLog * O_NON_WXOBJECT wxPlLogPassThrough * O_NON_WXOBJECT wxLogRecordInfo * O_NON_WXOBJECT wxPlLogFormatter * O_NON_WXOBJECT wxLogFormatter * O_NON_WXOBJECT wxLocale * O_NON_WXOBJECT_THR wxLanguageInfo * O_NON_WXOBJECT_THR const wxLanguageInfo * O_NON_WXOBJECT_THR wxStopWatch * O_NON_WXOBJECT_THR wxAboutDialogInfo * O_NON_WXOBJECT wxPoint O_POINT wxSize O_SIZE wxPosition O_POSITION wxColour O_NON_WXOBJECT_VAL wxPoint & O_POINT wxSize & O_SIZE wxPosition & O_POSITION wxColour & O_NON_WXOBJECT_VAL wxVariant* O_NON_WXOBJECT_THR wxVariant O_VARIANT wxProcess * O_WXOBJECT wxSound * O_NON_WXOBJECT_THR wxTipProvider * O_NON_WXOBJECT wxDrawObject * O_NON_WXOBJECT wxSize * O_NON_WXOBJECT_THR wxPoint * O_NON_WXOBJECT_THR wxRect * O_NON_WXOBJECT_THR wxPosition * O_NON_WXOBJECT_THR wxColour * O_NON_WXOBJECT_THR wxCaret * O_NON_WXOBJECT wxCaretSuspend * O_NON_WXOBJECT_THR wxWindowDisabler * O_NON_WXOBJECT_THR wxBusyCursor * O_NON_WXOBJECT_THR wxBusyInfo * O_NON_WXOBJECT_THR wxLayoutConstraints * O_WXOBJECT wxIndividualLayoutConstraint * O_WXOBJECT wxDropTarget * O_NON_WXOBJECT wxListItem * O_NON_WXOBJECT_THR wxListItemAttr * O_NON_WXOBJECT_THR wxPliTreeItemData * O_NON_WXOBJECT wxTreeItemData * O_NON_WXOBJECT wxTreeItemId * O_NON_WXOBJECT_THR wxAnimation * O_WXOBJECT_THR wxFontMapper * O_NON_WXOBJECT wxFontEnumerator * O_NON_WXOBJECT_THR wxPlFontEnumerator * O_NON_WXOBJECT_VXSP_THR wxNativeFontInfo * O_NON_WXOBJECT_THR wxFont * O_WXOBJECT_THR wxRegion * O_WXOBJECT_THR wxRegionIterator * O_WXOBJECT_THR wxIcon * O_WXOBJECT_THR wxIconBundle * O_NON_WXOBJECT wxIconLocation * O_NON_WXOBJECT wxBitmap * O_WXOBJECT_THR wxCursor * O_WXOBJECT_THR const wxCursor * O_WXOBJECT_THR wxToolTip * O_WXOBJECT wxPen * O_WXOBJECT_THR wxMask * O_WXOBJECT wxBrush * O_WXOBJECT_THR wxBitmapHandler * O_WXOBJECT wxPalette * O_WXOBJECT_THR wxMimeTypesManager * O_NON_WXOBJECT_THR wxFileType * O_NON_WXOBJECT wxFileTypeInfo * O_NON_WXOBJECT wxImage * O_WXOBJECT_THR wxImageHandler * O_WXOBJECT wxBMPHandler * O_WXOBJECT wxGIFHandler * O_WXOBJECT wxPCXHandler * O_WXOBJECT wxPNMHandler * O_WXOBJECT wxTIFFHandler * O_WXOBJECT wxJPEGHandler * O_WXOBJECT wxPNGHandler * O_WXOBJECT wxXPMHandler * O_WXOBJECT wxIFFHandler * O_WXOBJECT wxICOHandler * O_WXOBJECT wxCURHandler * O_WXOBJECT wxANIHandler * O_WXOBJECT wxTGAHandler * O_WXOBJECT wxImageList * O_WXOBJECT_THR wxToolBarToolBase * O_NON_WXOBJECT wxAcceleratorEntry * O_NON_WXOBJECT_THR wxAcceleratorTable * O_WXOBJECT_THR wxTimer * O_WXOBJECT wxSingleInstanceChecker * O_NON_WXOBJECT_THR wxWave * O_NON_WXOBJECT wxGraphicsRenderer * O_WXOBJECT wxGraphicsBrush * O_WXOBJECT_THR wxGraphicsContext * O_WXOBJECT_THR wxGraphicsFont * O_WXOBJECT_THR wxGraphicsMatrix * O_WXOBJECT_THR wxGraphicsObject * O_WXOBJECT_THR wxGraphicsPath * O_WXOBJECT_THR wxGraphicsPen * O_WXOBJECT_THR wxGraphicsGradientStop * O_NON_WXOBJECT_THR wxGraphicsGradientStops * O_NON_WXOBJECT_THR wxTreeListCtrl * O_WXEVTHANDLER wxTreeListItem * O_NON_WXOBJECT_THR wxTreeListItemComparator * O_NON_WXOBJECT_THR wxPlTreeListItemComparator * O_NON_WXOBJECT_SELF # events wxEvent * O_WXOBJECT_THR wxActivateEvent * O_WXOBJECT_THR wxBookCtrlEvent * O_WXOBJECT_THR wxClipboardTextEvent * O_WXOBJECT_THR wxCloseEvent * O_WXOBJECT_THR wxCommandEvent * O_WXOBJECT_THR wxContextMenuEvent * O_WXOBJECT_THR wxEraseEvent * O_WXOBJECT_THR wxFindDialogEvent * O_WXOBJECT_THR wxFocusEvent * O_WXOBJECT_THR wxFileCtrlEvent * O_WXOBJECT_THR wxKeyEvent * O_WXOBJECT_THR wxHelpEvent * O_WXOBJECT_THR wxIconizeEvent * O_WXOBJECT_THR wxIdleEvent * O_WXOBJECT_THR wxInitDialogEvent * O_WXOBJECT_THR wxJoystickEvent * O_WXOBJECT_THR wxListbookEvent * O_WXOBJECT_THR wxListEvent * O_WXOBJECT_THR wxMaximizeEvent * O_WXOBJECT_THR wxMenuEvent * O_WXOBJECT_THR wxMouseCaptureChangedEvent * O_WXOBJECT_THR wxMouseCaptureLostEvent * O_WXOBJECT_THR wxMouseEvent * O_WXOBJECT_THR wxMoveEvent * O_WXOBJECT_THR wxNotebookEvent * O_WXOBJECT_THR wxNotifyEvent * O_WXOBJECT_THR wxPaintEvent * O_WXOBJECT_THR wxQueryLayoutInfo * O_WXOBJECT_THR wxSashEvent * O_WXOBJECT_THR wxSizeEvent * O_WXOBJECT_THR wxScrollEvent * O_WXOBJECT_THR wxScrollWinEvent * O_WXOBJECT_THR wxSpinEvent * O_WXOBJECT_THR wxSplitterEvent * O_WXOBJECT_THR wxSetCursorEvent * O_WXOBJECT_THR wxSysColourChangedEvent * O_WXOBJECT_THR wxTaskBarIconEvent * O_WXOBJECT_THR wxTimerEvent * O_WXOBJECT_THR wxTreeEvent * O_WXOBJECT_THR wxUpdateUIEvent * O_WXOBJECT_THR wxTextUrlEvent * O_WXOBJECT_THR wxProcessEvent * O_WXOBJECT_THR wxWizardEvent * O_WXOBJECT_THR wxTreebookEvent * O_WXOBJECT_THR wxNavigationKeyEvent * O_WXOBJECT_THR wxChildFocusEvent * O_WXOBJECT_THR wxHyperlinkEvent * O_WXOBJECT_THR wxPowerEvent * O_WXOBJECT_THR wxColourPickerEvent * O_WXOBJECT_THR wxFileDirPickerEvent * O_WXOBJECT_THR wxFontPickerEvent * O_WXOBJECT_THR wxWindowCreateEvent * O_WXOBJECT_THR wxWindowDestroyEvent * O_WXOBJECT_THR wxCollapsiblePaneEvent * O_WXOBJECT_THR wxHeaderCtrlEvent * O_WXOBJECT_THR wxTreeListEvent * O_WXOBJECT_THR wxPlEvent * O_WXOBJECT_THR wxPlCommandEvent * O_WXOBJECT_THR wxPlThreadEvent * O_WXOBJECT_THR wxConfigBase * O_NON_WXOBJECT wxConfig * O_NON_WXOBJECT wxFileConfig * O_NON_WXOBJECT wxArtProvider * O_WXOBJECT wxPlArtProvider * O_WXOBJECT wxPlEventFilter * O_NON_WXOBJECT_THR wxEventFilter * O_NON_WXOBJECT_THR wxUIActionSimulator * O_NON_WXOBJECT_THR OUTPUT O_WXOBJECT wxPli_object_2_sv( aTHX_ $arg, $var ); O_WXOBJECT_THR wxPli_object_2_sv( aTHX_ $arg, $var ); wxPli_thread_sv_register( aTHX_ PERL_CLASS, $var, $arg ); O_WXEVTHANDLER wxPli_evthandler_2_sv( aTHX_ $arg, $var ); O_WXOBJECT_NAMED wxPli_namedobject_2_sv( aTHX_ $arg, $var, PERL_CLASS ); O_WXOBJECT_NAMED_THR wxPli_namedobject_2_sv( aTHX_ $arg, $var, PERL_CLASS ); wxPli_thread_sv_register( aTHX_ PERL_CLASS, $var, $arg ); O_WXCLIENTDATACONTAINER wxPli_clientdatacontainer_2_sv( aTHX_ $arg, $var, PERL_CLASS ); O_WXCLIENTDATACONTAINER_THR_SV wxPli_clientdatacontainer_2_sv( aTHX_ $arg, $var, PERL_CLASS ); wxPli_thread_sv_register( aTHX_ PERL_CLASS, SvRV( $arg ), $arg ); O_NON_WXOBJECT wxPli_non_object_2_sv( aTHX_ $arg, $var, PERL_CLASS ); O_NON_WXOBJECT_THR wxPli_non_object_2_sv( aTHX_ $arg, $var, PERL_CLASS ); wxPli_thread_sv_register( aTHX_ PERL_CLASS, $var, $arg ); O_NON_WXOBJECT_THR_SV wxPli_non_object_2_sv( aTHX_ $arg, $var, PERL_CLASS ); wxPli_thread_sv_register( aTHX_ PERL_CLASS, SvRV( $arg ), $arg ); O_SIZE wxPli_non_object_2_sv( aTHX_ $arg, new $type($var), PERL_CLASS ); O_GBPOSITION wxPli_non_object_2_sv( aTHX_ $arg, new $type($var), PERL_CLASS ); O_GBSPAN wxPli_non_object_2_sv( aTHX_ $arg, new $type($var), PERL_CLASS ); O_POINT wxPli_non_object_2_sv( aTHX_ $arg, new $type($var), PERL_CLASS ); O_POSITION wxPli_non_object_2_sv( aTHX_ $arg, new $type($var), PERL_CLASS ); T_KEYCODE sv_setiv( $arg, $var ); T_UV sv_setuv( $arg, (UV)$var ); INPUT O_WXOBJECT $var = (CPP_CLASS) wxPli_sv_2_object( aTHX_ $arg, PERL_CLASS ); O_WXOBJECT_THR $var = (CPP_CLASS) wxPli_sv_2_object( aTHX_ $arg, PERL_CLASS ); O_WXEVTHANDLER $var = (CPP_CLASS) wxPli_sv_2_object( aTHX_ $arg, PERL_CLASS ); O_WXOBJECT_NAMED $var = (CPP_CLASS) wxPli_sv_2_object( aTHX_ $arg, PERL_CLASS ); O_WXOBJECT_NAMED_THR $var = (CPP_CLASS) wxPli_sv_2_object( aTHX_ $arg, PERL_CLASS ); O_WXCLIENTDATACONTAINER $var = (CPP_CLASS) wxPli_sv_2_object( aTHX_ $arg, PERL_CLASS ); O_WXCLIENTDATACONTAINER_THR_SV $var = (CPP_CLASS) wxPli_sv_2_object( aTHX_ $arg, PERL_CLASS ); O_NON_WXOBJECT $var = (CPP_CLASS) wxPli_sv_2_object( aTHX_ $arg, PERL_CLASS ); O_NON_WXOBJECT_VAL $var = *($type *) wxPli_sv_2_object( aTHX_ $arg, PERL_CLASS ); O_NON_WXOBJECT_THR $var = (CPP_CLASS) wxPli_sv_2_object( aTHX_ $arg, PERL_CLASS ); O_NON_WXOBJECT_THR_SV $var = (CPP_CLASS) wxPli_sv_2_object( aTHX_ $arg, PERL_CLASS ); O_POINT $var = wxPli_sv_2_wxpoint( aTHX_ $arg ); O_SIZE $var = wxPli_sv_2_wxsize( aTHX_ $arg ); O_POSITION $var = wxPli_sv_2_wxposition( aTHX_ $arg ); O_GBPOSITION $var = wxPli_sv_2_wxgbposition( aTHX_ $arg ); O_GBSPAN $var = wxPli_sv_2_wxgbspan( aTHX_ $arg ); T_KEYCODE $var = wxPli_sv_2_keycode( aTHX_ $arg ); T_UV $var = ($type)SvUV( $arg ); T_CLASSNAME $var = wxPli_get_class( aTHX_ $arg ); O_VARIANT $var = wxPli_sv_2_wxvariant( aTHX_ $arg ); # # Wx_UserData* # INPUT O_USERDATACD if( SvOK( $arg ) ) { $var = new wxPliUserDataCD( $arg ); } else $var = 0; O_USERDATAO if( SvOK( $arg ) ) { $var = new wxPliUserDataO( $arg ); } else $var = 0; OUTPUT O_USERDATACD $arg = ( $var == 0 ) ? &PL_sv_undef : $var->GetData(); SvREFCNT_inc( $arg ); // xsubpp mortalizes it... O_USERDATAO $arg = ( $var == 0 ) ? &PL_sv_undef : $var->GetData(); SvREFCNT_inc( $arg ); // xsubpp mortalizes it... # # Objects with a self reference # INPUT O_NON_WXOBJECT_SELF $var = (CPP_CLASS) wxPli_sv_2_object( aTHX_ $arg, PERL_CLASS ); OUTPUT O_NON_WXOBJECT_SELF $arg = ( $var == 0 ) ? &PL_sv_undef : $var->GetSelf(); SvREFCNT_inc( $arg ); // xsubpp mortalizes it... # # Non Objects handled by Wx::XSP::Virtual XS++ plugin # INPUT O_NON_WXOBJECT_VXSP $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); O_NON_WXOBJECT_VXSP_THR $var = (${(my $t=$type)=~s/^Wx_/wx/;\$t}) wxPli_sv_2_object( aTHX_ $arg, ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt} ); OUTPUT O_NON_WXOBJECT_VXSP if( $var == 0 ) { $arg = &PL_sv_undef; } else { SvSetSV_nosteal( $arg, $var->GetSelf() ); } O_NON_WXOBJECT_VXSP_THR if( $var == 0 ) { $arg = &PL_sv_undef; } else { SvSetSV_nosteal( $arg, $var->GetSelf() ); wxPli_thread_sv_register( aTHX_ ${(my $ntt=$ntype)=~s/^(?:const\s+)?(?:Wx_|wx|wxPl)(.*?)(?:Ptr)?$/$1/g;$ntt=qq{\"Wx::$ntt\"};\$ntt}, $var, $arg ); } # # SV_null # INPUT T_SV_NULL $var = SvOK( $arg ) ? $arg : 0; OUTPUT T_SV_NULL $arg = ( $var == 0 ) ? &PL_sv_undef : $var; SvREFCNT_inc( $arg ); // xsubpp mortalizes it... # # streams # TYPEMAP wxPliInputStream S_PL_ISTREAM wxPliOutputStream S_PL_OSTREAM wxInputStream * S_WX_ISTREAM wxOutputStream * S_WX_OSTREAM Wx_InputStream * O_NON_WXOBJECT Wx_OutputStream * O_NON_WXOBJECT INPUT S_PL_ISTREAM wxPli_sv_2_istream( aTHX_ $arg, $var ); S_PL_OSTREAM wxPli_sv_2_ostream( aTHX_ $arg, $var ); OUTPUT S_WX_ISTREAM wxPli_stream_2_sv( aTHX_ $arg, $var, "Wx::InputStream" ); S_WX_OSTREAM wxPli_stream_2_sv( aTHX_ $arg, $var, "Wx::OutputStream" ); # Unicode support TYPEMAP wxChar * T_WXCHAR const wxChar* T_CONST_WXCHAR wxString T_WXSTRING INPUT T_WXCHAR WXCHAR_INPUT( $var, wxChar*, $arg ); T_CONST_WXCHAR WXCHAR_INPUT( $var, wxChar*, $arg ); T_WXSTRING WXSTRING_INPUT( $var, $type, $arg ); OUTPUT T_WXCHAR WXCHAR_OUTPUT( $var, $arg ); T_CONST_WXCHAR WXCHAR_OUTPUT( $var, $arg ); T_WXSTRING WXSTRING_OUTPUT( $var, $arg ); # typemap for window ID INPUT T_WINDOWID $var = wxPli_get_wxwindowid( aTHX_ $arg ); OUTPUT T_WINDOWID sv_setiv($arg, (IV)$var); INPUT T_ARRAYSTRING wxPli_av_2_arraystring( aTHX_ $arg, & $var ); INPUT T_ARRAYINT wxPli_av_2_arrayint( aTHX_ $arg, & $var ); INPUT T_ARRAYUSERDATA wxPli_av_2_userdatacdarray( aTHX_ $arg, & $var ); wxPliArrayGuard guard_$var = $var;Wx-0.9923/typemap.xsp000664000000000000 1307112306612226 12716 0ustar00Mark000000000000############################################################################# ## Name: typemap.xsp ## Purpose: Main typemap file for xsubppp.pl ## Author: Mattia Barbon ## Modified by: ## Created: 01/03/2003 ## RCS-ID: $Id: typemap.xsp 3312 2012-07-13 02:02:29Z mdootson $ ## Copyright: (c) 2003-2011 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %typemap{void}{simple}; %typemap{bool}{simple}; %typemap{char}{simple}; %typemap{short}{simple}; %typemap{int}{simple}; %typemap{long}{simple}; %typemap{unsigned short}{simple}; %typemap{unsigned}{simple}; %typemap{unsigned int}{simple}; %typemap{unsigned long}{simple}; %typemap{float}{simple}; %typemap{double}{simple}; %typemap{wxChar}{simple}; %typemap{SV*}{simple}; %typemap{wxDouble}{simple}; %typemap{size_t}{simple}; %typemap{time_t}{simple}; %typemap{wxUint32}{simple}; %typemap{wxUIntPtr}{simple}; %typemap{wxIntPtr}{simple}; %typemap{wxByte}{simple}; %typemap{wxArrayString}{parsed}{ %cpp_type{%wxArrayString%}; %output_list{% PUTBACK; wxPli_stringarray_push( aTHX_ RETVAL ); SPAGAIN; %}; }; %typemap{wxArrayString*}{parsed}{ %cpp_type{%wxArrayString%}; %output_list{% PUTBACK; wxPli_stringarray_push( aTHX_ RETVAL ); SPAGAIN; %}; }; %typemap{wxArrayInt}{parsed}{ %output_list{% PUTBACK; wxPli_intarray_push( aTHX_ RETVAL ); SPAGAIN; %}; }; %typemap{const wxArrayString&}{parsed}{ %cpp_type{%wxArrayString%}; %output_list{% PUTBACK; wxPli_stringarray_push( aTHX_ RETVAL ); SPAGAIN; %}; }; %typemap{const wxArrayInt&}{parsed}{ %cpp_type{%wxArrayInt%}; %output_list{% PUTBACK; wxPli_intarray_push( aTHX_ RETVAL ); SPAGAIN; %}; }; %typemap{wxArrayInt&}{parsed}{%wxArrayInt%}; %typemap{wxWindowID}{simple}; %typemap{wxCoord}{simple}; %typemap{wxEventType}{simple}; %typemap{wxDirection}{simple}; %typemap{wxLayoutDirection}{simple}; %typemap{const wxChar*}{simple}; %typemap{PlClassName}{simple}; %typemap{wxPliUserDataCD*}{simple}; %typemap{wxPliUserDataCD**}{simple}; %typemap{wxString}{simple}; %typemap{wxString&}{parsed}{ %cpp_type{%wxString%}; }; %typemap{const wxString&}{parsed}{ %cpp_type{%wxString%}; }; %typemap{const wxRect&}{reference}; %typemap{const wxSize&}{parsed}{ %cpp_type{%wxSize%}; }; %typemap{const wxPoint&}{parsed}{ %cpp_type{%wxPoint%}; }; %typemap{const wxPosition&}{parsed}{ %cpp_type{%wxPosition%}; }; %typemap{wxSize}{parsed}{ %cpp_type{%wxSize%}; }; %typemap{wxPoint}{parsed}{ %cpp_type{%wxPoint%}; }; %typemap{wxPoint*}{simple}; %typemap{wxPosition}{parsed}{ %cpp_type{%wxPosition%}; }; %typemap{wxPosition*}{simple}; %typemap{const wxArtID&}{parsed}{ %cpp_type{%wxString%}; }; %typemap{const wxArtClient&}{parsed}{ %cpp_type{%wxString%}; }; %typemap{wxArtProvider*}{simple}; %typemap{wxArtProvider&}{reference}; %typemap{wxBitmap}{reference}; %typemap{const wxBitmap&}{reference}; %typemap{wxCursor}{reference}; %typemap{const wxCursor&}{reference}; %typemap{wxIcon}{reference}; %typemap{wxFont}{reference}; %typemap{wxFont*}{simple}; %typemap{wxAnimation*}{simple}; %typemap{wxAnimation&}{reference}; %typemap{const wxAnimation&}{reference}; %typemap{wxAnimationType}{simple}; %typemap{wxDC*}{simple}; %typemap{wxDC&}{reference}; %typemap{const wxDC&}{reference}; %typemap{wxWindowDC*}{simple}; %typemap{wxWindowDC&}{reference}; %typemap{const wxWindowDC&}{reference}; %typemap{wxMemoryDC*}{simple}; %typemap{wxMemoryDC&}{reference}; %typemap{const wxMemoryDC&}{reference}; %typemap{wxPrinterDC*}{simple}; %typemap{wxPrinterDC&}{reference}; %typemap{const wxPrinterDC&}{reference}; %typemap{const wxValidator&}{reference}; %typemap{const wxPen&}{reference}; %typemap{const wxBrush&}{reference}; %typemap{const wxFont&}{reference}; %typemap{wxDateTime*}{simple}; %typemap{wxDateTime&}{reference}; %typemap{const wxDateTime&}{reference}; %typemap{wxDateSpan*}{simple}; %typemap{wxDateSpan&}{reference}; %typemap{const wxDateSpan&}{reference}; %typemap{wxTimeSpan*}{simple}; %typemap{wxTimeSpan&}{reference}; %typemap{const wxTimeSpan&}{reference}; %typemap{wxObject*}{simple}; %typemap{wxEvtHandler*}{simple}; %typemap{wxSplitterWindow*}{simple}; %typemap{wxSplitterEvent*}{simple}; %typemap{wxWindow*}{simple}; %typemap{wxListView*}{simple}; %typemap{wxSizer*}{simple}; %typemap{wxIconBundle*}{simple}; %typemap{wxFrame*}{simple}; %typemap{wxDialog*}{simple}; %typemap{wxChoice*}{simple}; %typemap{wxTreeCtrl*}{simple}; %typemap{wxToolBarBase*}{simple}; %typemap{wxToolBar*}{simple}; %typemap{wxTextCtrl*}{simple}; %typemap{wxControl*}{simple}; %typemap{wxMenu*}{simple}; %typemap{wxKeyEvent&}{reference}; %typemap{wxColour}{reference}; %typemap{const wxColour&}{reference}; %typemap{const wxIcon&}{reference}; %typemap{const wxIconBundle&}{reference}; %typemap{const wxFont&}{reference}; %typemap{const wxRegion&}{reference}; %typemap{wxImageList*}{simple}; %typemap{wxImage*}{simple}; %typemap{wxImage&}{reference}; %typemap{wxPliInputStream}{simple}; %typemap{wxPliOutputStream}{simple}; %typemap{wxGraphicsContext*}{simple}; %typemap{wxGraphicsContext&}{reference}; %typemap{const wxGraphicsContext&}{reference}; %typemap{const wxGraphicsPath&}{reference}; %typemap{const wxGraphicsMatrix&}{reference}; %typemap{const wxGraphicsPen&}{reference}; %typemap{const wxGraphicsBrush&}{reference}; %typemap{const wxGraphicsFont&}{reference}; %typemap{wxVariant*}{simple}; %typemap{wxVariant&}{reference}; %typemap{const wxVariant&}{reference}; Wx-0.9923/Window.xs000664000000000000 5406212306612265 12336 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: Window.xs // Purpose: XS for Wx::Window // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: Window.xs 3503 2013-06-19 06:39:27Z mdootson $ // Copyright: (c) 2000-2002, 2004-2010 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #define PERL_NO_GET_CONTEXT #include "cpp/wxapi.h" #include #include #include #include "cpp/overload.h" #if wxPERL_USE_TOOLTIPS #include #endif #undef THIS #include "cpp/v_cback.h" #include "cpp/window.h" WXPLI_BOOT_ONCE(Wx_Win); #define boot_Wx_Win wxPli_boot_Wx_Win MODULE=Wx_Win PACKAGE=Wx PREFIX=wx wxPoint* wxGetMousePosition() PREINIT: int x, y; CODE: ::wxGetMousePosition( &x, &y ); RETVAL = new wxPoint( x, y ); OUTPUT: RETVAL void wxGetMousePositionXY() PREINIT: int x, y; PPCODE: ::wxGetMousePosition( &x, &y ); EXTEND( SP, 2 ); PUSHs( newSViv( x ) ); PUSHs( newSViv( y ) ); wxWindow* wxGetTopLevelParent( window ) wxWindow* window wxWindow* wxFindWindowAtPointer( pt ) wxPoint pt wxWindow* wxGetActiveWindow() MODULE=Wx_Win PACKAGE=Wx::Window #if WXPERL_W_VERSION_LT( 2, 9, 0 ) int NewControlId() CODE: RETVAL = wxWindowBase::NewControlId(); OUTPUT: RETVAL int NextControlId( winid ) int winid CODE: RETVAL = wxWindowBase::NextControlId( winid ); OUTPUT: RETVAL int PrevControlId( winid ) int winid CODE: RETVAL = wxWindowBase::PrevControlId( winid ); OUTPUT: RETVAL #else wxWindowID NewControlId( idcount = 1 ) int idcount CODE: RETVAL = wxWindowBase::NewControlId( idcount ); OUTPUT: RETVAL void UnreserveControlId( id, idcount = 1) wxWindowID id int idcount CODE: wxWindowBase::UnreserveControlId( id, idcount ); #endif void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Window::new" ) wxWindow* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxPliWindow( CLASS ); OUTPUT: RETVAL wxWindow* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = 0 , name = wxPanelNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxPliWindow( CLASS, parent, id, pos, size, style, name ); OUTPUT: RETVAL bool wxWindow::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = 0 , name = wxPanelNameStr) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name void wxWindow::CaptureMouse() #!sub Center void wxWindow::Centre( direction = wxBOTH ) int direction #!sub CenterOnparent void wxWindow::CentreOnParent( direction = wxBOTH ) int direction #if WXPERL_W_VERSION_GE( 2, 7, 0 ) #!sub CenterOnScreen void wxWindow::CentreOnScreen( direction = wxBOTH ) int direction CODE: THIS->Centre( direction | wxCENTER_ON_SCREEN ); #else void wxWindow::CentreOnScreen( direction = wxBOTH ) int direction #endif #if WXPERL_W_VERSION_GE( 2, 5, 1 ) void wxWindow::ClearBackground() #else void wxWindow::Clear() #endif void wxWindow::ClientToScreen( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n, ClientToScreenXY ) MATCH_REDISP( wxPliOvl_wpoi, ClientToScreenPoint ) END_OVERLOAD( Wx::Window::ClientToScreen ) wxPoint* wxWindow::ClientToScreenPoint( point ) wxPoint point CODE: RETVAL = new wxPoint( THIS->ClientToScreen( point ) ); OUTPUT: RETVAL void wxWindow::ClientToScreenXY( x, y ) int x int y PPCODE: THIS->ClientToScreen( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); bool wxWindow::Close( force = false ) bool force void wxWindow::ConvertDialogToPixels( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wpoi, ConvertDialogPointToPixels ) MATCH_REDISP( wxPliOvl_wsiz, ConvertDialogSizeToPixels ) END_OVERLOAD( Wx::Window::ConvertDialogToPixels ) wxPoint* wxWindow::ConvertDialogPointToPixels( point ) wxPoint point CODE: RETVAL = new wxPoint( THIS->ConvertDialogToPixels( point ) ); OUTPUT: RETVAL wxSize* wxWindow::ConvertDialogSizeToPixels( size ) wxSize size CODE: RETVAL = new wxSize( THIS->ConvertDialogToPixels( size ) ); OUTPUT: RETVAL void wxWindow::ConvertPixelsToDialog( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wpoi, ConvertPixelsPointToDialog ) MATCH_REDISP( wxPliOvl_wsiz, ConvertPixelsSizeToDialog ) END_OVERLOAD( Wx::Window::ConvertPixelsToDialog ) wxPoint* wxWindow::ConvertPixelsPointToDialog( point ) wxPoint point CODE: RETVAL = new wxPoint( THIS->ConvertPixelsToDialog( point ) ); OUTPUT: RETVAL wxSize* wxWindow::ConvertPixelsSizeToDialog( size ) wxSize size CODE: RETVAL = new wxSize( THIS->ConvertPixelsToDialog( size ) ); OUTPUT: RETVAL bool wxWindow::Destroy() #if defined( __WXMSW__ ) \ || ( WXPERL_W_VERSION_GE( 2, 9, 0 ) && !defined( __WXGTK__ ) ) void wxWindow::DragAcceptFiles( accept ) bool accept #endif void wxWindow::Enable( enable = true ) bool enable void wxWindow::Disable() wxWindow* FindFocus() CODE: RETVAL = wxWindow::FindFocus(); OUTPUT: RETVAL wxWindow* wxWindow::FindWindow( i ) SV* i CODE: if( looks_like_number( i ) ) { int id = SvIV( i ); RETVAL = THIS->FindWindow( id ); } else { wxString name; WXSTRING_INPUT( name, const char*, i ); RETVAL = THIS->FindWindow( name ); } OUTPUT: RETVAL wxWindow* FindWindowById( id, parent = NULL ) wxWindowID id wxWindow* parent CODE: RETVAL = wxWindow::FindWindowById( id, parent ); OUTPUT: RETVAL wxWindow* FindWindowByName( id, parent = NULL ) wxString id wxWindow* parent CODE: RETVAL = wxWindow::FindWindowByName( id, parent ); OUTPUT: RETVAL wxWindow* FindWindowByLabel( id, parent = NULL ) wxString id wxWindow* parent CODE: RETVAL = wxWindow::FindWindowByLabel( id, parent ); OUTPUT: RETVAL void wxWindow::Fit() void wxWindow::FitInside() void wxWindow::Freeze() #if WXPERL_W_VERSION_GE( 2, 7, 1 ) bool wxWindow::IsFrozen() #endif wxAcceleratorTable* wxWindow::GetAcceleratorTable() CODE: RETVAL = new wxAcceleratorTable( *THIS->GetAcceleratorTable() ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxBackgroundStyle wxWindow::GetBackgroundStyle() #endif wxColour* wxWindow::GetBackgroundColour() CODE: RETVAL = new wxColour( THIS->GetBackgroundColour() ); OUTPUT: RETVAL wxSize* wxWindow::GetBestSize() CODE: RETVAL = new wxSize( THIS->GetBestSize() ); OUTPUT: RETVAL wxCaret* wxWindow::GetCaret() int wxWindow::GetCharHeight() int wxWindow::GetCharWidth() void wxWindow::GetChildren() PPCODE: const wxWindowList& list = THIS->GetChildren(); wxWindowList::compatibility_iterator node; EXTEND( SP, (IV) list.GetCount() ); for( node = list.GetFirst(); node; node = node->GetNext() ) PUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), node->GetData() ) ); wxSize* wxWindow::GetClientSize() CODE: RETVAL = new wxSize( THIS->GetClientSize() ); OUTPUT: RETVAL void wxWindow::GetClientSizeXY() PREINIT: int x; int y; PPCODE: THIS->GetClientSize( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); wxSizer* wxWindow::GetContainingSizer() #if wxPERL_USE_DRAG_AND_DROP wxDropTarget* wxWindow::GetDropTarget() CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); #endif #if WXPERL_W_VERSION_LT( 2, 7, 0 ) wxWindow* wxWindow::GetDefaultItem() #endif wxEvtHandler* wxWindow::GetEventHandler() long wxWindow::GetExtraStyle() wxFont* wxWindow::GetFont() CODE: RETVAL = new wxFont( THIS->GetFont() ); OUTPUT: RETVAL wxColour* wxWindow::GetForegroundColour() CODE: RETVAL = new wxColour( THIS->GetForegroundColour() ); OUTPUT: RETVAL wxWindow* wxWindow::GetGrandParent() #if defined( __WXMSW__ ) wxWindow* wxWindow::CreateWindowFromHWND( parent, hWnd ) wxWindow* parent void* hWnd C_ARGS: parent, (WXHWND) hWnd #endif #if ( WXPERL_W_VERSION_GE( 2, 5, 1 ) && defined( __WXMSW__ ) ) \ || WXPERL_W_VERSION_GE( 2, 5, 4 ) void* wxWindow::GetHandle() #else IV wxWindow::GetHandle() CODE: #ifdef __WXMSW__ WXHWND handle = THIS->GetHandle(); RETVAL = handle; #else WXWidget handle = THIS->GetHandle(); RETVAL = PTR2IV(handle); #endif OUTPUT: RETVAL #endif wxString wxWindow::GetHelpText() int wxWindow::GetId() wxString wxWindow::GetLabel() wxLayoutConstraints* wxWindow::GetConstraints() #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxSize* wxWindow::GetMinSize() CODE: RETVAL = new wxSize( THIS->GetMinSize() ); OUTPUT: RETVAL wxSize* wxWindow::GetMaxSize() CODE: RETVAL = new wxSize( THIS->GetMaxSize() ); OUTPUT: RETVAL #endif wxString wxWindow::GetName() wxWindow* wxWindow::GetParent() wxPoint* wxWindow::GetPosition() CODE: RETVAL = new wxPoint( THIS->GetPosition() ); OUTPUT: RETVAL void wxWindow::GetPositionXY() PREINIT: int x; int y; PPCODE: THIS->GetPosition( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( (IV) x ) ) ); PUSHs( sv_2mortal( newSViv( (IV) y ) ) ); wxRect* wxWindow::GetRect() CODE: RETVAL = new wxRect( THIS->GetRect() ); OUTPUT: RETVAL int wxWindow::GetScrollThumb( orientation ) int orientation int wxWindow::GetScrollPos( orientation ) int orientation int wxWindow::GetScrollRange( orientation ) int orientation wxSize* wxWindow::GetSize() CODE: RETVAL = new wxSize( THIS->GetSize() ); OUTPUT: RETVAL wxSizer* wxWindow::GetSizer() void wxWindow::GetSizeWH() PREINIT: int x; int y; PPCODE: THIS->GetSize( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( (IV) x ) ) ); PUSHs( sv_2mortal( newSViv( (IV) y ) ) ); void wxWindow::GetTextExtent( string, font = 0 ) wxString string wxFont* font PREINIT: int x; int y; int descent; int externalLeading; PPCODE: THIS->GetTextExtent( string, &x, &y, &descent, &externalLeading, font ); EXTEND( SP, 4 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); PUSHs( sv_2mortal( newSViv( descent ) ) ); PUSHs( sv_2mortal( newSViv( externalLeading ) ) ); #if WXPERL_W_VERSION_GE( 2, 7, 0 ) wxString wxWindow::GetTitle() CODE: RETVAL = THIS->GetLabel(); OUTPUT: RETVAL #else wxString wxWindow::GetTitle() #endif #if wxPERL_USE_TOOLTIPS wxToolTip* wxWindow::GetToolTip() #endif wxRegion* wxWindow::GetUpdateRegion() CODE: RETVAL = new wxRegion( THIS->GetUpdateRegion() ); OUTPUT: RETVAL wxValidator* wxWindow::GetValidator() long wxWindow::GetWindowStyleFlag() #if WXPERL_W_VERSION_GE( 2, 8, 0 ) wxSize wxWindow::GetWindowBorderSize() #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxWindow::InvalidateBestSize() void wxWindow::InheritAttributes() #endif bool wxWindow::IsEnabled() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool wxWindow::IsThisEnabled() #endif void wxWindow::IsExposed( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wpoi, IsExposedPoint ) MATCH_REDISP( wxPliOvl_wrec, IsExposedRect ) MATCH_REDISP( wxPliOvl_n_n_n_n, IsExposedXYWH ) END_OVERLOAD( Wx::Window::IsExposed ) bool wxWindow::IsExposedXYWH( x, y, w = 0, h = 0 ) int x int y int w int h CODE: RETVAL = THIS->IsExposed( x, y, w, h ); OUTPUT: RETVAL bool wxWindow::IsExposedPoint( point ) wxPoint point CODE: RETVAL = THIS->IsExposed( point ); OUTPUT: RETVAL bool wxWindow::IsExposedRect( rect ) wxRect* rect CODE: RETVAL = THIS->IsExposed( *rect ); OUTPUT: RETVAL bool wxWindow::IsRetained() bool wxWindow::IsShown() bool wxWindow::IsTopLevel() #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool wxWindow::IsDoubleBuffered() bool wxWindow::IsShownOnScreen() #endif void wxWindow::Layout() void wxWindow::Lower() void wxWindow::MakeModal( flag ) bool flag void wxWindow::Move( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wpoi, MovePoint ) MATCH_REDISP( wxPliOvl_n_n, MoveXY ) END_OVERLOAD( Wx::Window::Move ) void wxWindow::MoveXY( x, y ) int x int y CODE: THIS->Move( x, y ); void wxWindow::MovePoint( point ) wxPoint point CODE: THIS->Move( point ); #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxWindow::MoveBeforeInTabOrder( window ) wxWindow* window void wxWindow::MoveAfterInTabOrder( window ) wxWindow* window #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) # wxNavigateBackward, wxNavigateForward, wxNavigateWinChange, wxNavigateFromTab bool wxWindow::NavigateIn( flags = wxNavigationKeyEvent::IsForward ) int flags #endif bool wxWindow::Navigate( flags = wxNavigationKeyEvent::IsForward ) int flags wxEvtHandler* wxWindow::PopEventHandler( deleteHandler ) bool deleteHandler void wxWindow::PopupMenu( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wmen_wpoi, PopupMenuPoint ) MATCH_REDISP( wxPliOvl_wmen_n_n, PopupMenuXY ) END_OVERLOAD( Wx::Window::PopupMenu ) bool wxWindow::PopupMenuPoint( menu, point ) wxMenu* menu wxPoint point CODE: RETVAL = THIS->PopupMenu( menu, point ); OUTPUT: RETVAL bool wxWindow::PopupMenuXY( menu, x, y ) wxMenu* menu int x int y CODE: RETVAL = THIS->PopupMenu( menu, x, y ); OUTPUT: RETVAL void wxWindow::PushEventHandler( handler ) wxEvtHandler* handler void wxWindow::Raise() void wxWindow::Refresh( eraseBackground = true, rect = 0 ) bool eraseBackground wxRect* rect void wxWindow::ReleaseMouse() bool wxWindow::RemoveEventHandler( handler ) wxEvtHandler* handler bool wxWindow::Reparent( newParent ) wxWindow* newParent void wxWindow::ScreenToClient( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n, ScreenToClientXY ) MATCH_REDISP( wxPliOvl_wpoi, ScreenToClientPoint ) END_OVERLOAD( Wx::Window::ScreenToClient ) wxPoint* wxWindow::ScreenToClientPoint( point ) wxPoint point CODE: RETVAL = new wxPoint( THIS->ScreenToClient( point ) ); OUTPUT: RETVAL void wxWindow::ScreenToClientXY( x, y ) int x int y PPCODE: THIS->ScreenToClient( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( (IV) x ) ) ); PUSHs( sv_2mortal( newSViv( (IV) y ) ) ); bool wxWindow::ScrollLines( lines ) int lines bool wxWindow::ScrollPages( lines ) int lines void wxWindow::ScrollWindow( x, y, rect = 0 ) int x int y wxRect* rect void wxWindow::SetAcceleratorTable( accel ) wxAcceleratorTable* accel C_ARGS: *accel void wxWindow::SetAutoLayout( autoLayout ) bool autoLayout #ifdef __WXGTK__ void wxWindow::SetThemeEnabled( themeEnabled ) bool themeEnabled #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) bool wxWindow::SetBackgroundStyle( style ) wxBackgroundStyle style #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxWindow::SetBestFittingSize( size = wxDefaultSize ) wxSize size CODE: #if WXPERL_W_VERSION_LT( 2, 7, 2 ) THIS->SetBestFittingSize( size ); #else THIS->SetInitialSize( size ); #endif #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void wxWindow::SetInitialSize( size = wxDefaultSize ) wxSize size #endif void wxWindow::SetCaret( caret ) wxCaret* caret void wxWindow::SetClientSize( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wsiz, SetClientSizeSize ) MATCH_REDISP( wxPliOvl_n_n, SetClientSizeWH ) END_OVERLOAD( Wx::Window::SetClientSize ) void wxWindow::SetClientSizeSize( size ) wxSize size CODE: THIS->SetClientSize( size ); void wxWindow::SetClientSizeWH( width, height ) int width int height CODE: THIS->SetClientSize( width, height ); void wxWindow::SetConstraints( constraints ) wxLayoutConstraints* constraints void wxWindow::SetContainingSizer( sizer ) wxSizer* sizer #if WXPERL_W_VERSION_LT( 2, 7, 0 ) wxWindow* wxWindow::SetDefaultItem( window ) wxWindow* window #endif #if wxPERL_USE_DRAG_AND_DROP void wxWindow::SetDropTarget( target ) wxDropTarget* target CODE: wxPli_object_set_deleteable( aTHX_ ST(1), false ); SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away THIS->SetDropTarget( target ); #endif void wxWindow::SetEventHandler( handler ) wxEvtHandler* handler void wxWindow::SetExtraStyle( style ) long style void wxWindow::SetFocus() void wxWindow::SetHelpText( text ) wxString text #if WXPERL_W_VERSION_LT( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 void wxWindow::SetHelpTextForId( text ) wxString text #endif void wxWindow::SetId( id ) int id void wxWindow::SetLabel( label ) wxString label void wxWindow::SetName( name ) wxString name void wxWindow::SetScrollbar( orientation, position, thumbSize, range, refresh = true ) int orientation int position int thumbSize int range bool refresh void wxWindow::SetScrollPos( orientation, position, refresh = true ) int orientation int position bool refresh #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxWindow::SetMinSize( size ) wxSize size void wxWindow::SetMaxSize( size ) wxSize size #endif void wxWindow::SetSize( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_n_n_n_n, SetSizeXYWHF, 4 ) MATCH_REDISP( wxPliOvl_n_n, SetSizeWH ) MATCH_REDISP( wxPliOvl_wsiz, SetSizeSize ) MATCH_REDISP( wxPliOvl_wrec, SetSizeRect ) END_OVERLOAD( Wx::Window::SetSize ) void wxWindow::SetSizeSize( size ) wxSize size CODE: THIS->SetSize( size ); void wxWindow::SetSizeRect( rect ) wxRect* rect CODE: THIS->SetSize( *rect ); void wxWindow::SetSizeWH( width, height ) int width int height CODE: THIS->SetSize( width, height ); void wxWindow::SetSizeXYWHF( x, y, width, height, flags = wxSIZE_AUTO ) int x int y int width int height int flags CODE: THIS->SetSize( x, y, width, height, flags ); void wxWindow::SetSizeHints( minW, minH, maxW = -1, maxH = -1, incW = -1, incH = -1 ) int minW int minH int maxW int maxH int incW int incH #if WXPERL_W_VERSION_LT( 2, 9, 0 ) void wxWindow::SetVirtualSizeHints( minW, minH, maxW = -1, maxH = -1 ) int minW int minH int maxW int maxH #endif void wxWindow::SetVirtualSize( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n, SetVirtualSizeXY ) MATCH_REDISP( wxPliOvl_wsiz, SetVirtualSizeSize ) END_OVERLOAD( Wx::Window::SetVirtualSize ) void wxWindow::SetVirtualSizeXY( width, height ) int width int height CODE: THIS->SetVirtualSize( width, height ); void wxWindow::SetVirtualSizeSize( size ) wxSize size CODE: THIS->SetVirtualSize( size ); void wxWindow::SetSizer( sizer, deleteOld = true ) wxSizer* sizer bool deleteOld void wxWindow::SetSizerAndFit( sizer, deleteOld = true ) wxSizer* sizer bool deleteOld #if WXPERL_W_VERSION_GE( 2, 7, 0 ) void wxWindow::SetTitle( title ) wxString title CODE: THIS->SetLabel( title ); #else void wxWindow::SetTitle( title ) wxString title #endif #if wxPERL_USE_TOOLTIPS void wxWindow::SetToolTip( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wtip, SetToolTipTip ) MATCH_REDISP( wxPliOvl_s, SetToolTipString ) END_OVERLOAD( Wx::Window::SetToolTip ) void wxWindow::SetToolTipTip( tooltip ) wxToolTip* tooltip CODE: THIS->SetToolTip( tooltip ); #endif #if wxPERL_USE_TOOLTIPS || WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxWindow::SetToolTipString( string ) wxString string CODE: THIS->SetToolTip( string ); #endif void wxWindow::SetValidator( validator ) wxValidator* validator CODE: THIS->SetValidator( *validator ); void wxWindow::SetWindowStyle( style ) long style void wxWindow::SetWindowStyleFlag( style ) long style #if WXPERL_W_VERSION_GE( 2, 5, 3 ) bool wxWindow::ShouldInheritColours() #endif bool wxWindow::Show( show = true ) bool show #if WXPERL_W_VERSION_GE( 2, 7, 0 ) bool wxWindow::HasMultiplePages() #endif bool wxWindow::Hide() void wxWindow::Thaw() bool wxWindow::TransferDataFromWindow() CODE: RETVAL = THIS->wxWindow::TransferDataFromWindow(); OUTPUT: RETVAL bool wxWindow::TransferDataToWindow() CODE: RETVAL = THIS->wxWindow::TransferDataToWindow(); OUTPUT: RETVAL bool wxWindow::Validate() CODE: RETVAL = THIS->wxWindow::Validate(); OUTPUT: RETVAL void wxWindow::Update() void wxWindow::InitDialog() #if WXPERL_W_VERSION_GE( 2, 6, 0 ) void wxWindow::UpdateWindowUI( flags = wxUPDATE_UI_NONE ) long flags #endif void wxWindow::RefreshRect( rect ) wxRect* rect CODE: THIS->RefreshRect( *rect ); void wxWindow::WarpPointer( x, y ) int x int y #if WXPERL_W_VERSION_GE( 2, 7, 1 ) wxLayoutDirection wxWindow::GetLayoutDirection() void wxWindow::SetLayoutDirection( direction ) wxLayoutDirection direction bool wxWindow::SetTransparent( alpha ) wxByte alpha bool wxWindow::CanSetTransparent() #endif INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/Window.xsp INCLUDE: XS/Accelerators.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/PlWindow.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/SplitterWindow.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/VScrolledWindow.xsp INCLUDE: XS/ScrolledWindow.xs INCLUDE: XS/Validators.xs INCLUDE: XS/Constraint.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/Sizer.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/GridBagSizer.xsp INCLUDE: XS/SashWindow.xs MODULE=Wx_Win PACKAGE=Wx::Window Wx-0.9923/Wx.pm000664000000000000 3051312306612266 11443 0ustar00Mark000000000000############################################################################# ## Name: Wx.pm ## Purpose: main wxPerl module ## Author: Mattia Barbon ## Modified by: ## Created: 01/10/2000 ## RCS-ID: $Id: Wx.pm 3502 2013-05-02 01:50:51Z mdootson $ ## Copyright: (c) 2000-2013 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# package Wx; use strict; require Exporter; use vars qw(@ISA $VERSION $XS_VERSION $AUTOLOAD @EXPORT_OK %EXPORT_TAGS $_platform $_universal $_msw $_gtk $_motif $_mac $_x11 $_static); $_msw = 1; $_gtk = 2; $_motif = 3; $_mac = 4; $_x11 = 5; @ISA = qw(Exporter); $VERSION = '0.9923'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; sub BEGIN{ @EXPORT_OK = qw(wxPOINT wxSIZE wxTheApp); %EXPORT_TAGS = ( ); } # # utility functions # sub wxPOINT { Wx::Point->new( $_[0], $_[1] ) } sub wxSIZE { Wx::Size->new( $_[0], $_[1] ) } sub wxTheApp { $Wx::wxTheApp } sub AUTOLOAD { my( $constname, $error ); ($constname = $AUTOLOAD) =~ s<^.*::>{}; return 0 if $constname eq 'wxVERSION'; my( $val ) = constant( $constname, 0, $error ); if( $error != 0 ) { # re-add this if need support for autosplitted subroutines # $AutoLoader::AUTOLOAD = $AUTOLOAD; # goto &AutoLoader::AUTOLOAD; Wx::_croak( "Error while autoloading '$AUTOLOAD'" ); } eval "sub $AUTOLOAD { $val }"; goto &$AUTOLOAD; } # handle :allclasses specially sub import { my $package = shift; my $count = 0; foreach ( @_ ) { m/^:/ or last; m/^:allclasses$/ and do { eval _get_packages(); die $@ if $@; splice @_, $count, 1; }; ++$count; } $package->export_to_level( 1, $package, @_ ); } sub END { UnLoad() if defined &UnLoad; } sub _match(\@$;$$) { &_xsmatch( [@{shift()}],@_ ) } sub _ovl_error { ( 'unable to resolve overloaded method for ', $_[0] || (caller(1))[3] ); } sub _croak { require Carp; goto &Carp::croak; } # Blech! (again...) # wxWidgets DLLs need to be installed in the same directory as Wx.dll, # but then LoadLibrary can't find them unless they are already loaded, # so we explicitly load them (on Win32 and wxWidgets 2.5.x+) just before # calling Wx::wx_boot. Finding the library requires determining the path # and the correct name use Wx::Mini; _start(); our( $wx_path ); our( $wx_binary_loader ); # back compat only sub _load_file { Wx::_load_plugin( $_[0] ); } sub load_dll { $wx_binary_loader->load_dll(@_); } sub unload_dll { $wx_binary_loader->unload_dll(@_); } END { unload_dll() } { _boot_Constant( 'Wx', $XS_VERSION ); _boot_Events( 'Wx', $XS_VERSION ); _boot_Window( 'Wx', $XS_VERSION ); _boot_Controls( 'Wx', $XS_VERSION ); _boot_Frames( 'Wx', $XS_VERSION ); _boot_GDI( 'Wx', $XS_VERSION ); } # # British vs. American spelling aliases # *Wx::Window::Center = \&Wx::Window::Centre; *Wx::Window::CenterOnParent = \&Wx::Window::CentreOnParent; *Wx::Window::CenterOnScreen = \&Wx::Window::CentreOnScreen; *Wx::ListCtrl::InsertStringImageItem = \&Wx::ListCtrl::InsertImageStringItem; no strict 'refs'; *{"Wx::Size::y"} = \&Wx::Size::height; # work around syntax highlighting use strict 'refs'; *Wx::Size::x = \&Wx::Size::width; *Wx::Window::GetClientSizeWH = \&Wx::Window::GetClientSizeXY; if( Load( 1 ) ) { SetConstants(); SetConstantsOnce(); SetOvlConstants(); SetEvents(); SetInheritance(); } sub END { UnsetConstants() if defined &UnsetConstants; } # # set up wxUNIVERSAL, wxGTK, wxMSW, etc # eval( "sub wxUNIVERSAL() { $_universal }" ); eval( "sub wxPL_STATIC() { $_static }" ); eval( "sub wxMOTIF() { $_platform == $_motif }" ); eval( "sub wxMSW() { $_platform == $_msw }" ); eval( "sub wxGTK() { $_platform == $_gtk }" ); eval( "sub wxMAC() { $_platform == $_mac }" ); eval( "sub wxX11() { $_platform == $_x11 }" ); require Wx::App; require Wx::Event; require Wx::Locale; require Wx::Menu; require Wx::RadioBox; require Wx::Timer; require Wx::Wx_Exp; # for Wx::Stream & co. require Tie::Handle; package Wx::GDIObject; # warning for non-existent package package Wx::Object; # likewise # # overloading for Wx::TreeItemId # package Wx; sub _string { overload::StrVal( $_[0] ) } sub _number { require Scalar::Util; Scalar::Util::refaddr( $_[0] ) } package Wx::TreeItemId; use overload '<=>' => \&tiid_spaceship, 'bool' => sub { $_[0]->IsOk }, '""' => \&Wx::_string, '0+' => \&Wx::_number, 'fallback' => 1; package Wx::Font; use overload '<=>' => \&font_spaceship, 'bool' => sub { $_[0]->IsOk }, '""' => \&Wx::_string, '0+' => \&Wx::_number, 'fallback' => 1; # # Various functions # package Wx; # easier to implement than to wrap sub GetMultipleChoices { my( $message, $caption, $choices, $parent, $x, $y, $centre, $width, $height ) = @_; my( $dialog ) = Wx::MultiChoiceDialog->new ( $parent, $message, $caption, $choices ); if( $dialog->ShowModal() == &Wx::wxID_OK ) { my( @s ) = $dialog->GetSelections(); $dialog->Destroy(); return @s; } $dialog->Destroy; return; } sub LogTrace { my( $t ) = sprintf( shift, @_ ); $t =~ s/\%/\%\%/g; wxLogTrace( $t ); } sub LogTraceMask { my( $m ) = shift; unless( @_ ) { require Carp; Carp::carp( "No message for $m" ); } my( $t ) = sprintf( shift, @_ ); $t =~ s/\%/\%\%/g; wxLogTraceMask( $m, $t ); } sub LogStatus { my( $t ); if( ref( $_[0] ) && $_[0]->isa( 'Wx::Frame' ) ) { my( $f ) = shift; $t = sprintf( shift, @_ ); $t =~ s/\%/\%\%/g; wxLogStatusFrame( $f, $t ); } else { $t = sprintf( shift, @_ ); $t =~ s/\%/\%\%/g; wxLogStatus( $t ); } } sub LogError { my( $t ) = sprintf( shift, @_ ); $t =~ s/\%/\%\%/g; wxLogError( $t ); } sub LogFatalError { my( $t ) = sprintf( shift, @_ ); $t =~ s/\%/\%\%/g; wxLogFatalError( $t ); } sub LogWarning { my( $t ) = sprintf( shift, @_ ); $t =~ s/\%/\%\%/g; wxLogWarning( $t ); } sub LogMessage { my( $t ) = sprintf( shift, @_ ); $t =~ s/\%/\%\%/g; wxLogMessage( $t ); } sub LogVerbose { my( $t ) = sprintf( shift, @_ ); $t =~ s/\%/\%\%/g; wxLogVerbose( $t ); } sub LogSysError { my( $t ) = sprintf( shift, @_ ); $t =~ s/\%/\%\%/g; wxLogSysError( $t ); } sub LogDebug { my( $t ) = sprintf( shift, @_ ); $t =~ s/\%/\%\%/g; wxLogDebug( $t ); } my $ts_buf; sub Wx::Log::SetTimestamp { Wx::Log::_SetTimestamp( $_[0], $ts_buf ); } package Wx::PlThreadEvent; our %stash : shared; SetStash( \%stash ); 1; __END__ =head1 NAME Wx - interface to the wxWidgets cross-platform GUI toolkit =head1 SYNOPSIS use Wx; my $app = Wx::SimpleApp->new; my $frame = Wx::Frame->new( undef, -1, 'Hello, world!' ); $frame->Show; $app->MainLoop; =head1 DESCRIPTION The Wx module is a wrapper for the wxWidgets (formerly known as wxWindows) GUI toolkit. This module comes with extensive documentation in HTML format; you can download it from http://wxperl.sourceforge.net/ =head1 INSTALLATION Please see F in source package. =head1 Runtime Assertions For wxWidgets 2.9.3 and greater, Wx can switch runtime assertions on and off. In wxWidgets 2.9.x and above, there are three levels of debuging 0 - No debug assertions 1 - Low cost debug assertions 2 - All debug assertions If you used Alien::wxWidgets 0.61 or greater to build your wxWidgets, then the libraries will be built using debug level 1. If you specified --wxWidgets-debug for a debug build, then debug level 2 will have been used. By default in Wx, debug assertions are switched off. However you may switch assertions on by using Wx::EnableDefaultAssertHandler(); you can switch assertions off again by using Wx::DisableAssertHandler(); You may also set en enviroment variable to cause all invocations of Wx to call Wx::EnableDefaultAssertHandler(). export WXPERL_OPTIONS=ENABLE_DEFAULT_ASSERT_HANDLER This may be useful during tests. The enviroment setting WXPERL_OPTIONS can contain multiple options. Options are checked for using a simple regex match. So export WXPERL_OPTIONS="ENABLE_DEFAULT_ASSERT_HANDLER SOME_OTHER_SETTING" would evaluate as ENABLE_DEFAULT_ASSERT_HANDLER being set. If you want to handle assert failures yourself you can override wxApp::OnAssertFailure in your Wx::App derived class. sub OnAssertFailure { my ( $self, $file, $line, $function, $condition, $msg ) = @_; ...... } For wxWidgets 2.8.x, the assert methods have no effect. You may however still usefully override wxApp::OnAssertFailure in a debug build. =head1 Running on Mac OSX From version 0.98 wxPerl no longer needs to use the special startup executable 'wxperl' to run scripts on the Mac. The ordinary perl interpreter now works without problems. This is because wxPerl now contains code that brings the running application to the front and gives it the focus. In a syntax checking editor you may prevent Wx code from being given focus as the front process by setting an environment variable export WXPERL_OPTIONS=NO_MAC_SETFRONTPROCESS or $ENV{WXPERL_OPTIONS} = 'NO_MAC_SETFRONTPROCESS'; The enviroment setting WXPERL_OPTIONS can contain multiple options. Options are checked for using a simple regex match. So export WXPERL_OPTIONS="NO_MAC_SETFRONTPROCESS SOME_OTHER_SETTING" would evaluate as NO_MAC_SETFRONTPROCESS being set. The code that makes the SetFrontProcess call is in Wx::Mini as Wx::MacSetFrontProcess(); so it is also straightforward to override this method if you wish. Finally, any code can force the running application to become the front process regardless of environment settings by calling the xs method directly. (Note the underscore in the method name). Wx::_MacSetFrontProcess(); =head1 Locale Behaviour Beginning with 2.9.0 wxWidgets sets the application locale to the current system locale. Formally in wxWidgets 2.8.x, the locale by default was 'C'. A problem arises because in addition to loading gettext translation files, this affects other C calls like printf, sprintf,... Perl makes calls to these functions when formatting numbers. Number formatting always uses underlying C library functions. The statements 'use locale', or 'no locale' make no difference here. So, if your locale is 'de' then when Wx starts, the C library locale gets set accordingly. use Wx; print 8.3 will output 8,3 to the terminal. Formatting uses ',' as the fractional separator. This, whilst possibly correct, isn't what most users will be expecting. If you want to set the locale to the system default you can do so explicitly. $app->{locale} = Wx::Locale->new( &Wx::wxLANGUAGE_DEFAULT ); You can then also reset just the locale for number formatting to 'C' if that is what you require use POSIX qw( setlocale LC_NUMERIC ); setlocale( LC_NUMERIC, C ); This code applies equally regardless of which wxWidgets version is being used. =head1 Windows XP look For standalone (packed using PAR, Perl2Exe, Perl2App, ...) applications to get Windows XP look, a file named C (assuming the program is named C) and containing the text below must either be placed in the same directory as the executable file or compiled into the file itself. The module Win32::Exe can place a manifest in an executable file Super wxPerl Application =head1 AUTHOR Mattia Barbon =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut # Local variables: # # mode: cperl # # End: # Wx-0.9923/Wx.rc000664000000000000 115512306612265 11412 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: Wx.rc // Purpose: wxPerl resource file // Author: Mattia Barbon // Modified by: // Created: 29/10/2000 // RCS-ID: $Id: Wx.rc,v 1.7 2004/12/21 21:12:19 mbarbon Exp $ // Copyright: (c) 2000-2002, 2004 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #include wxplicon ICON "wxpl.ico" #include Wx-0.9923/Wx.xs000664000000000000 4742312306612226 11465 0ustar00Mark000000000000///////////////////////////////////////////////////////////////////////////// // Name: Wx.xs // Purpose: main XS module // Author: Mattia Barbon // Modified by: // Created: 01/10/2000 // RCS-ID: $Id: Wx.xs 3486 2013-04-16 17:39:27Z mdootson $ // Copyright: (c) 2000-2002, 2004-2013 Mattia Barbon // Licence: This program is free software; you can redistribute it and/or // modify it under the same terms as Perl itself ///////////////////////////////////////////////////////////////////////////// #undef bool #define PERL_NO_GET_CONTEXT #include #include "cpp/compat.h" // THIS IS AN HACK! #if defined(_MSC_VER) #define STRICT #endif #include "cpp/wxapi.h" #include #include #include // FIXME hack #if WXPERL_W_VERSION_GE( 2, 5, 2 ) \ && defined(__DARWIN__) #define HACK #include #if wxUSE_MEDIACTRL #include #endif #endif #if defined(__WXMSW__) #include #endif #if defined(__WXMAC__) #include #endif #if WXPERL_W_VERSION_GE( 2, 5, 1 ) #include #else #if defined(__WXGTK__) int WXDLLEXPORT wxEntryStart( int& argc, char** argv ); #else int WXDLLEXPORT wxEntryStart( int argc, char** argv ); #endif int WXDLLEXPORT wxEntryInitGui(); void WXDLLEXPORT wxEntryCleanup(); #endif #include "cpp/v_cback.h" // to declare wxPliUserDataCD #include "cpp/helpers.h" #include "cpp/helpers.cpp" #include "cpp/v_cback.cpp" #include "cpp/overload.cpp" #include "cpp/ovl_const.cpp" // // our App // #include #include "cpp/app.h" IMPLEMENT_APP_NO_MAIN(wxPliApp); static bool wxPerlAppCreated = false; static bool wxPerlInitialized = false; #if !wxUSE_UNICODE bool wxPli_always_utf8; #endif #undef THIS #ifdef __cplusplus extern "C" { #endif XS( boot_Wx_Const ); XS( boot_Wx_Ctrl ); XS( boot_Wx_Evt ); XS( boot_Wx_Win ); XS( boot_Wx_Wnd ); XS( boot_Wx_GDI ); #if defined( WXPL_STATIC ) XS( boot_Wx__DocView ); #if wxPERL_USE_STC XS( boot_Wx__STC ); #endif #if wxPERL_USE_XRC XS( boot_Wx__XRC ); #endif XS( boot_Wx__Print ); XS( boot_Wx__MDI ); XS( boot_Wx__Html ); XS( boot_Wx__Help ); XS( boot_Wx__Grid ); XS( boot_Wx__FS ); XS( boot_Wx__DND ); #endif #ifdef __cplusplus } #endif extern void SetConstants(); extern void SetConstantsOnce(); static int call_oninit( pTHX_ SV* This, SV* sub ) { dSP; ENTER; SAVETMPS; PUSHMARK( SP ); XPUSHs( This ); PUTBACK; int count = call_sv( sub, G_SCALAR|G_EVAL ); int retval = 0; SPAGAIN; if( SvTRUE( ERRSV ) ) { croak( Nullch ); } else if( count == 1 ) { retval = POPi; } PUTBACK; FREETMPS; LEAVE; return retval; } #if defined(__WXMOTIF__) && WXPERL_W_VERSION_LT( 2, 5, 1 ) #include #include int wxEntryStart( int argc, char** argv ) { // This seems to be necessary since there are 'rogue' // objects present at this point (perhaps global objects?) // Setting a checkpoint will ignore them as far as the // memory checking facility is concerned. // Of course you may argue that memory allocated in globals should be // checked, but this is a reasonable compromise. #if WXPERL_W_VERSION_GE( 2, 9, 3 ) #if ( ( wxDEBUG_LEVEL > 1 ) && wxUSE_MEMORY_TRACING ) || wxUSE_DEBUG_CONTEXT wxDebugContext::SetCheckpoint(); #endif #else #if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING ) || wxUSE_DEBUG_CONTEXT wxDebugContext::SetCheckpoint(); #endif #endif if (!wxApp::Initialize()) return -1; return 0; } int wxEntryInitGui() { int retValue = 0; // GUI-specific initialization, such as creating an app context. if( !wxTheApp->OnInitGui() ) retValue = -1; return retValue; } void wxEntryCleanup() { #if wxUSE_LOG // flush the logged messages if any wxLog *pLog = wxLog::GetActiveTarget(); if ( pLog != NULL && pLog->HasPendingMessages() ) pLog->Flush(); delete wxLog::SetActiveTarget(new wxLogStderr); // So dialog boxes aren't used // for further messages #endif wxApp::CleanUp(); // some code moved to _wxApp destructor // since at this point the app is already destroyed } #endif DEFINE_PLI_HELPERS( st_wxPliHelpers ); #include typedef wxConfigBase::EntryType EntryType; WXPLI_BOOT_ONCE_EXP(Wx); #define boot_Wx wxPli_boot_Wx extern bool Wx_booted, Wx_Const_booted, Wx_Ctrl_booted, Wx_Evt_booted, Wx_Wnd_booted, Wx_GDI_booted, Wx_Win_booted; #if WXPERL_W_VERSION_LT( 2, 9, 0 ) typedef int wxPolygonFillMode; #endif MODULE=Wx PACKAGE=Wx BOOT: newXSproto( "Wx::_boot_Constant", boot_Wx_Const, file, "$$" ); newXSproto( "Wx::_boot_Controls", boot_Wx_Ctrl, file, "$$" ); newXSproto( "Wx::_boot_Events", boot_Wx_Evt, file, "$$" ); newXSproto( "Wx::_boot_Window", boot_Wx_Win, file, "$$" ); newXSproto( "Wx::_boot_Frames", boot_Wx_Wnd, file, "$$" ); newXSproto( "Wx::_boot_GDI", boot_Wx_GDI, file, "$$" ); #if defined( WXPL_STATIC ) newXSproto( "Wx::_boot_Wx__DocView", boot_Wx__DocView, file, "$$" ); #if wxPERL_USE_STC newXSproto( "Wx::_boot_Wx__STC", boot_Wx__STC, file, "$$" ); #endif #if wxPERL_USE_XRC newXSproto( "Wx::_boot_Wx__XRC", boot_Wx__XRC, file, "$$" ); #endif newXSproto( "Wx::_boot_Wx__Print", boot_Wx__Print, file, "$$" ); newXSproto( "Wx::_boot_Wx__MDI", boot_Wx__MDI, file, "$$" ); newXSproto( "Wx::_boot_Wx__Html", boot_Wx__Html, file, "$$" ); newXSproto( "Wx::_boot_Wx__Help", boot_Wx__Help, file, "$$" ); newXSproto( "Wx::_boot_Wx__Grid", boot_Wx__Grid, file, "$$" ); newXSproto( "Wx::_boot_Wx__FS", boot_Wx__FS, file, "$$" ); newXSproto( "Wx::_boot_Wx__DND", boot_Wx__DND, file, "$$" ); #endif SV* tmp = get_sv( "Wx::_exports", 1 ); sv_setiv( tmp, (IV)(void*)&st_wxPliHelpers ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) #define wxPliEntryStart( argc, argv ) wxEntryStart( (argc), (argv) ) #else #define wxPliEntryStart( argc, argv ) ( wxEntryStart( (argc), (argv) ) == 0 ) #endif bool EnableDefaultAssertHandler() CODE: #if WXPERL_W_VERSION_GE( 2, 9, 3 ) wxSetDefaultAssertHandler(); RETVAL = 1; #else RETVAL = 0; #endif OUTPUT: RETVAL bool DisableAssertHandler() CODE: #if WXPERL_W_VERSION_GE( 2, 9, 3 ) wxDisableAsserts(); RETVAL = 1; #else RETVAL = 0; #endif OUTPUT: RETVAL ##// bool ##// EnableCustomAssertHandler( handler ) ##// SV* handler ##// CODE: ##// #if WXPERL_W_VERSION_GE( 2, 9, 3 ) ##// RETVAL = 1; ##// #else ##// RETVAL = 0; ##// #endif ##// OUTPUT: RETVAL bool Load( bool croak_on_error = false ) CODE: wxPerlAppCreated = wxTheApp != NULL; if( wxPerlInitialized ) XSRETURN( true ); wxPerlInitialized = true; NV ver = wxMAJOR_VERSION + wxMINOR_VERSION / 1000.0 + wxRELEASE_NUMBER / 1000000.0; // set up version as soon as possible SV* tmp = get_sv( "Wx::_wx_version", 1 ); sv_setnv( tmp, ver ); tmp = get_sv( "Wx::wxVERSION", 1 ); sv_setnv( tmp, ver ); int platform; // change App.pm whenever these change #if defined(__WXMSW__) platform = 1; #elif defined(__WXGTK__) platform = 2; #elif defined(__WXMOTIF__) platform = 3; #elif defined(__WXMAC__) platform = 4; #elif defined(__WXX11__) platform = 5; #else #error must add case #endif tmp = get_sv( "Wx::_platform", 1 ); sv_setiv( tmp, platform ); if( wxPerlAppCreated || wxTopLevelWindows.GetCount() > 0 ) XSRETURN( true ); #if defined(DEBUGGING) && !defined(PERL_USE_SAFE_PUTENV) // avoid crash on exit in Fedora (and other DEBUGGING Perls) PL_use_safe_putenv = 1; #endif int argc = 0; #if wxUSE_UNICODE && WXPERL_W_VERSION_GE( 2, 5, 3 ) wxChar** argv = 0; argc = wxPli_get_args_argc_argv( (void***) &argv, 1 ); wxPerlInitialized = wxPliEntryStart( argc, argv ); #if WXPERL_W_VERSION_LE( 2, 5, 2 ) wxPli_delete_argv( (void***) &argv, 1 ); #endif #else char** argv = 0; argc = wxPli_get_args_argc_argv( (void***) &argv, 0 ); wxPerlInitialized = wxPliEntryStart( argc, argv ); #if WXPERL_W_VERSION_LE( 2, 5, 2 ) wxPli_delete_argv( (void***) &argv, 0 ); #endif #endif RETVAL = wxPerlInitialized; if( !RETVAL && croak_on_error ) { #if wxUSE_LOG wxLog::FlushActive(); #endif require_pv( "Carp.pm" ); const char* argv[2] = { "Failed to initialize wxWidgets", NULL }; call_argv( "Carp::croak", G_VOID|G_DISCARD, (char**) argv ); } OUTPUT: RETVAL #if defined(__WXMAC__) void _MacSetFrontProcess() CODE: ProcessSerialNumber kCurrentPSN = { 0, kCurrentProcess }; TransformProcessType( &kCurrentPSN, kProcessTransformToForegroundApplication ); SetFrontProcess( &kCurrentPSN ); #endif void SetConstants() CODE: // this is after wxEntryStart, since // wxInitializeStockObjects needs to be called // (for colours, cursors, pens, etc...) SetConstants(); void SetConstantsOnce() void SetOvlConstants() void UnLoad() CODE: wxPerlAppCreated = wxTheApp != NULL; Wx_booted = Wx_Const_booted = Wx_Ctrl_booted = Wx_Evt_booted = Wx_Wnd_booted = Wx_GDI_booted = Wx_Win_booted = false; if( wxPerlInitialized && !wxPerlAppCreated ) wxEntryCleanup(); wxPerlInitialized = false; void SetAlwaysUTF8( always_utf8 = true ) bool always_utf8 CODE: #if !wxUSE_UNICODE wxPli_always_utf8 = always_utf8; #endif #if WXPERL_W_VERSION_GE( 2, 5, 1 ) #include ## this has the same interface as DynaLoader::dl_load_files, but since ## internally it uses wxPluginModule, it ensures proper initialization for ## wxModule, wxRTTI and (hopefully) any other internal wxWidgets' data structure IV _load_plugin( string, int flags = 0 /* to be compatible with dl_load_file */ ) wxString string CODE: #ifdef HACK delete new wxHtmlWindow(); #if wxUSE_MEDIACTRL delete new wxMediaCtrl(); #endif #endif wxDynamicLibrary *lib = wxPluginManager::LoadLibrary( string, wxDL_VERBATIM ); RETVAL = PTR2IV( lib->GetLibHandle() ); OUTPUT: RETVAL bool _unload_plugin( string ) wxString string CODE: RETVAL = wxPluginManager::UnloadLibrary( string ); OUTPUT: RETVAL #endif bool _xsmatch( avref, proto, required = -1, allowmore = false ) SV* avref SV* proto int required bool allowmore PREINIT: AV* av; wxPliPrototype* prototype; int n, len; PROTOTYPE: \@$;$$ CODE: av = wxPli_avref_2_av( avref ); if( !av ) croak( "first parameter must be an ARRAY reference" ); prototype = INT2PTR( wxPliPrototype*, SvIV( proto ) ); len = av_len( av ) + 1; EXTEND(SP, len); PUSHMARK(SP); for( int i = 0; i < len; ++i ) PUSHs( *av_fetch( av, i, 0 ) ); PUTBACK; RETVAL = wxPli_match_arguments( aTHX_ *prototype, required, allowmore ); SPAGAIN; POPMARK; // wxPli_match_* does a PUSHMARK OUTPUT: RETVAL ## // Optional Modules Included bool _wx_optmod_ribbon() CODE: #if wxPERL_USE_RIBBON && wxUSE_RIBBON && WXPERL_W_VERSION_GE( 2, 9, 3 ) RETVAL = TRUE; #else RETVAL = FALSE; #endif OUTPUT: RETVAL bool _wx_optmod_propgrid() CODE: #if wxPERL_USE_PROPGRID && wxUSE_PROPGRID && WXPERL_W_VERSION_GE( 2, 9, 3 ) RETVAL = TRUE; #else RETVAL = FALSE; #endif OUTPUT: RETVAL bool _wx_optmod_media() CODE: #if wxPERL_USE_MEDIA && wxUSE_MEDIACTRL RETVAL = TRUE; #else RETVAL = FALSE; #endif OUTPUT: RETVAL bool _wx_optmod_webview() CODE: #if wxPERL_USE_WEBVIEW && wxUSE_WEBVIEW && WXPERL_W_VERSION_GE( 2, 9, 3 ) RETVAL = TRUE; #else RETVAL = FALSE; #endif OUTPUT: RETVAL bool _wx_optmod_ipc() CODE: #if wxPERL_USE_IPC && wxUSE_IPC RETVAL = TRUE; #else RETVAL = FALSE; #endif OUTPUT: RETVAL I32 looks_like_number( sval ) SV* sval CODE: RETVAL = my_looks_like_number( aTHX_ sval ); OUTPUT: RETVAL void CLONE( CLASS ) char* CLASS CODE: SetConstants(); INCLUDE: XS/App.xs INCLUDE: XS/Caret.xs INCLUDE: XS/Geom.xs INCLUDE: XS/Menu.xs INCLUDE: XS/Log.xs INCLUDE: XS/ToolTip.xs INCLUDE: XS/Locale.xs INCLUDE: XS/Utils.xs INCLUDE: XS/Timer.xs INCLUDE: XS/Stream.xs INCLUDE: XS/TaskBarIcon.xs INCLUDE: XS/Config.xs INCLUDE: XS/Process.xs INCLUDE: XS/FontMapper.xs INCLUDE: XS/Wave.xs INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/FontEnumerator.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/ArtProvider.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/MimeTypes.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/Sound.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/Power.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/ClassInfo.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/Display.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/StandardPaths.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/Variant.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/NotificationMessage.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/EventFilter.xsp INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp interface/wx/uiaction.h ## //FIXME// tricky ##if defined(__WXMSW__) ##undef XS ##define XS( name ) WXXS( name ) ##endif MODULE=Wx PACKAGE=Wx #!irrelevant class wxArray #!irrelevant class wxArray #!irrelevant class wxArrayString #!irrelevant class wxObjArray #!irrelevant class wxBrushList #!irrelevant class wxClientData #!irrelevant class wxClientDataContainer #!irrelevant class wxCondition #!irrelevant class wxCriticalSection #!irrelevant class wxCriticalSectionLocker #!irrelevant class wxDebugContext #!irrelevant class wxDebugStreamBuf #!irrelevant class wxDynamicLibrary #!irrelevant class wxDynamicLibraryDetails #!irrelevant class wxFFile #!irrelevant class wxFFileInputStream #!irrelevant class wxFFileOutputStream #!irrelevant class wxFFileStream #!irrelevant class wxFile #!irrelevant class wxFileInputStream #!irrelevant class wxFileOutputStream #!irrelevant class wxFileStream #!irrelevant class wxFilterClassFactory #!irrelevant class wxFontList #!irrelevant class wxHashMap #!irrelevant class wxHashSet #!irrelevant class wxHashTable #!irrelevant class wxList #!irrelevant class wxLongLong #!irrelevant class wxMemoryBuffer #!irrelevant class wxModule #!irrelevant class wxMutex #!irrelevant class wxMutexLocker #!irrelevant class wxNode #!irrelevant class wxObjectRefData #!irrelevant class wxPathList #!irrelevant class wxPenList #!irrelevant class wxProtocol #!irrelevant class wxRecursionGuard #!irrelevant class wxRecursionGuardFlag #!irrelevant class wxScopedArray #!irrelevant class wxScopedPtr #!irrelevant class wxScopedTiedPtr #!irrelevant class wxSemaphore #!irrelevant class wxString #!irrelevant class wxStringBuffer #!irrelevant class wxStringBufferLength #!irrelevant class wxStringClientData #!irrelevant class wxStringTokenizer #!irrelevant class wxThreadHelper #!equivalent class wxThread to Perl modules thread, thread::shared #!equivalent class wxArchiveClassFactory to Perl modules Archive::Any, Archive::Zip, Archive::Tar #!equivalent class wxArchiveEntry to Perl modules Archive::Any, Archive::Zip, Archive::Tar #!equivalent class wxArchiveInputStream to Perl modules Archive::Any, Archive::Zip, Archive::Tar #!equivalent class wxArchiveIterator to Perl modules Archive::Any, Archive::Zip, Archive::Tar #!equivalent class wxArchiveNotifier to Perl modules Archive::Any, Archive::Zip, Archive::Tar #!equivalent class wxArchiveOutputStream to Perl modules Archive::Any, Archive::Zip, Archive::Tar #!equivalent class wxAutomationObject to perl module Win32::OLE #!equivalent class wxCSConv to Perl module Encode #!equivalent class wxEncodingConverter to Perl module Encode #!equivalent class wxMBConv to Perl module Encode #!equivalent class wxMBConvFile to Perl module Encode #!equivalent class wxMBConvUTF16 to Perl module Encode #!equivalent class wxMBConvUTF32 to Perl module Encode #!equivalent class wxMBConvUTF7 to Perl module Encode #!equivalent class wxMBConvUTF8 to Perl module Encode #!equivalent class wxDb to Perl module DBI #!equivalent class wxDbColDataPtr to Perl module DBI #!equivalent class wxDbColDef to Perl module DBI #!equivalent class wxDbColFor to Perl module DBI #!equivalent class wxDbColInf to Perl module DBI #!equivalent class wxDbConnectInf to Perl module DBI #!irrelevant class wxDbGridColInfo #!equivalent class wxDbIdxDef to Perl module DBI #!equivalent class wxDbInf to Perl module DBI #!equivalent class wxDbTable to Perl module DBI #!equivalent class wxDbTableInf to Perl module DBI #!equivalent class wxDir to opendir/readdir and to Perl modules File::Find, File::Find::Rule #!equivalent class wxDirTraverser to Perl modules File::Find, File::Find::Rule #!equivalent class wxFileName to File::Spec, Path::Class #!equivalent class wxFTP to Perl modules Net::FTP, LWP::UserAgent #!equivalent class wxHTTP to Perl modules Net::HTTP, LWP::UserAgent #!equivalent class wxRegEx to a Perl regular expression #!equivalent class wxRegKey to Perl module Win32::Registry #!equivalent class wxTarClassFactory to Perl module Archive::Tar #!equivalent class wxTarEntry to Perl module Archive::Tar #!equivalent class wxTarInputStream to Perl module Archive::Tar #!equivalent class wxTarOutputStream to Perl module Archive::Tar #!equivalent class wxTempFile to Perl module File::Temp #!equivalent class wxTempFileOutputStream to Perl module File::Temp #!equivalent class wxTextValidator to Perl module Wx::Perl::TextValidator #!equivalent class wxURI to Perl module URI #!equivalent class wxURL to Perl module URI::URL #!equivalent class wxZipClassFactory to Perl module Archive::Zip #!equivalent class wxZipEntry to Perl module Archive::Zip #!equivalent class wxZipInputStream to Perl module Archive::Zip #!equivalent class wxZipNotifier to Perl module Archive::Zip #!equivalent class wxZipOutputStream to Perl module Archive::Zip #!equivalent class wxZlibInputStream to Perl module Compress::Zlib, IO::Zlib #!equivalent class wxZlibOutputStream to Perl module Compress::Zlib, IO::Zlib #!equivalent class wxBufferedInputStream to Perl input/output #!equivalent class wxBufferedOutputStream to Perl input/output #!equivalent class wxCountingOutputStream to Perl input/output #!equivalent class wxCountingOutputStream to Perl input/output #!equivalent class wxDataInputStream to Perl module Storable #!equivalent class wxDataOutputStream to Perl module Storable #!equivalent class wxFilterInputStream to Perl module PerlIO::via #!equivalent class wxFilterOutputStream to Perl module PerlIO::via #!equivalent class wxMemoryInputStream to Perl module PerlIO::scalar #!equivalent class wxMemoryOutputStream to Perl module PerlIO::scalar #!equivalent class wxSocketInputStream to Perl modules IO::Socket::* #!equivalent class wxSocketOutputStream to Perl modules IO::Socket::* #!equivalent class wxStreamBase to Perl input/output #!equivalent class wxStreamBase to Perl input/output #!equivalent class wxStreamBuffer to Perl input/output #!equivalent class wxStringInputStream to Perl module PerlIO::scalar #!equivalent class wxStringOutputStream to Perl module PerlIO::scalar #!equivalent class wxTextFile to Perl input/output #!equivalent class wxTextInputStream to Perl input/output #!equivalent class wxTextOutputStream to Perl input/output #!equivalent class wxMetafile to Perl module Wx::Metafile #!equivalent class wxDialUpEvent to Perl module Wx::DialUpEvent #!equivalent class wxDialUpManager to Perl module Wx::DialUpManager #!equivalent class wxGLCanvas to Perl module Wx::GLCanvas #!equivalent class wxGLContext to Perl module Wx::GLCanvas #!equivalent class wxDateTime to perl module DateTime, Date::Calc, Date::Manip, Time::Piece #!equivalent class wxDateSpan to perl module DateTime, Date::Calc, Date::Manip, Time::Piece #!equivalent class wxTimeSpan to perl module DateTime, Date::Calc, Date::Manip, Time::Piece Wx-0.9923/wxpl.ico000664000000000000 206612306612265 12156 0ustar00Mark000000000000(& èN( À€€€€€€€€€ÀÀÀ€€€ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðû»»»ðÿÿÿû»ðÌÌÌû»ðÌÌÌû»ðÌÌÌû»ðÿÌÌÌû»ðŸÿÿÿû»ð™™û»»»ð™™û»»»ð™™ÿÿÿÿð™™™™Ÿ™™™™Ÿÿÿÿÿÿÿÿüüàààà€€€€€€€€ÿÿ( @€€€€€€€€€€ÀÀÀ€€€ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ»»»»»»»¿»»»»»»»¿ÿÿÿÿÿÿÿû»»¿ÌÌÌÌÌÌÌû»»¿ÌÌÌÌÌÌÌû»»¿ÌÌÌÌÌÌÌû»»¿ÌÌÌÌÌÌÌû»»¿ÌÌÌÌÌÌÌû»»¿ÌÌÌÌÌÌÌû»»¿ÿÿÿÌÌÌÌÌÌÌû»»¿ù™ŸÌÌÌÌÌÌÌû»»¿ù™ŸÌÌÌÌÌÌÌû»»¿ù™ŸÌÌÌÌÌÌÌû»»¿ù™Ÿÿÿÿÿÿÿÿû»»¿ù™™™™Ÿ»»»»»»»¿ù™™™™Ÿ»»»»»»»¿ù™™™™Ÿ»»»»»»»¿ù™™™™Ÿ»»»»»»»¿ù™™™™Ÿÿÿÿÿÿÿÿÿù™™™™™™™™™ðù™™™™™™™™™ðù™™™™™™™™™ðù™™™™™™™™™ðù™™™™™™™™™ðù™™™™™™™™™ðÿÿÿÿÿÿÿÿÿÿðÿÿÿÿÿÿÿÿÿÿÿÿÿøÿøÿøþþþþþþþÀÀÀÀÀÀÀÀÀÀÀÿÀÿÀÿÀÿÀÿÀÿÀÿÿÿÿÿÿÿÿÿWx-0.9923/wxpl.xpm000664000000000000 327312306612233 12204 0ustar00Mark000000000000/* XPM */ static const char * wxpl16_xpm[] = { "16 16 5 1", " c None", ". c Gray100", "X c Red", "o c Yellow", "O c Blue", " ", " ........... ", " .XXXXXXXXX. ", " .XXXXXXXXX. ", " .XXXX......... ", " .XXXX.ooooooo. ", " .XXXX.ooooooo. ", " .X........ooo. ", " ...OOOOOO.ooo. ", " .OOOOOO.ooo. ", " .OOOOOO.ooo. ", " .OOOOOO.ooo. ", " ........ooo. ", " .ooooooo. ", " ......... ", " "}; /* XPM */ static const char * wxpl32_xpm[] = { "32 32 5 1", " c None", ". c Gray100", "X c Red", "o c Yellow", "O c Blue", " ", " ", " ..................... ", " .XXXXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXX................. ", " .XXXXXXXXXX.ooooooooooooooo. ", " .XXXXXXXXXX.ooooooooooooooo. ", " .XXXXXXXXXX.ooooooooooooooo. ", " .XXXXXXXXXX.ooooooooooooooo. ", " .XXXX................oooooo. ", " .XXXX.OOOOOOOOOOOOOO.oooooo. ", " .XXXX.OOOOOOOOOOOOOO.oooooo. ", " .XXXX.OOOOOOOOOOOOOO.oooooo. ", " ......OOOOOOOOOOOOOO.oooooo. ", " .OOOOOOOOOOOOOO.oooooo. ", " .OOOOOOOOOOOOOO.oooooo. ", " .OOOOOOOOOOOOOO.oooooo. ", " .OOOOOOOOOOOOOO.oooooo. ", " .OOOOOOOOOOOOOO.oooooo. ", " .OOOOOOOOOOOOOO.oooooo. ", " ................oooooo. ", " .ooooooooooooooo. ", " .ooooooooooooooo. ", " ................. ", " ", " ", " "}; Wx-0.9923/XS/000775000000000000 012316265011 10730 5ustar00Mark000000000000Wx-0.9923/XS/AboutDialog.xsp000664000000000000 475012306612233 13745 0ustar00Mark000000000000############################################################################# ## Name: XS/AboutDialog.xsp ## Purpose: XS+++ for Wx::AboutBox ## Author: Mattia Barbon ## Modified by: ## Created: 01/11/2006 ## RCS-ID: $Id: AboutDialog.xsp 3479 2013-04-16 10:32:16Z mdootson $ ## Copyright: (c) 2006-2007 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}; %typemap{wxAboutDialogInfo*}{simple}; %typemap{const wxAboutDialogInfo&}{reference}; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) #include %name{Wx::AboutDialogInfo} class wxAboutDialogInfo { wxAboutDialogInfo(); void SetName( const wxString& name ); wxString GetName() const; void SetVersion( const wxString& version ); bool HasVersion() const; wxString GetVersion() const; void SetDescription( const wxString& desc ); bool HasDescription() const; wxString GetDescription() const; void SetCopyright( const wxString& copyright ); bool HasCopyright() const; wxString GetCopyright() const; void SetLicence( const wxString& licence ); void SetLicense( const wxString& licence ); bool HasLicence() const; wxString GetLicence() const; void SetIcon( const wxIcon& icon ); bool HasIcon() const; wxIcon GetIcon() const; void SetWebSite( const wxString& url, const wxString& desc = wxEmptyString ); bool HasWebSite() const; wxString GetWebSiteURL() const; wxString GetWebSiteDescription() const; void SetDevelopers( const wxArrayString& developers ); void AddDeveloper( const wxString& developer ); bool HasDevelopers() const; const wxArrayString& GetDevelopers() const; void SetDocWriters( const wxArrayString& docwriters ); void AddDocWriter( const wxString& docwriter ); bool HasDocWriters() const; const wxArrayString& GetDocWriters() const; void SetArtists( const wxArrayString& artists ); void AddArtist( const wxString& artist ); bool HasArtists() const; const wxArrayString& GetArtists() const; void SetTranslators( const wxArrayString& translators ); void AddTranslator( const wxString& translator ); bool HasTranslators() const; const wxArrayString& GetTranslators() const; }; %name{Wx::AboutBox} void wxAboutBox( const wxAboutDialogInfo& info ); #endif Wx-0.9923/XS/Accelerators.xs000664000000000000 731212306612233 13777 0ustar00Mark000000000000############################################################################# ## Name: XS/Accelerators.xs ## Purpose: XS for Wx::AcceleratorTable, Wx::AcceleratorEntry ## Author: Mattia Barbon ## Modified by: ## Created: 13/02/2001 ## RCS-ID: $Id: Accelerators.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2002, 2004, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::AcceleratorEntry wxAcceleratorEntry* wxAcceleratorEntry::new( flags, code, cmd ) int flags wxKeyCode code int cmd #if WXPERL_W_VERSION_GE( 2, 7, 1 ) wxAcceleratorEntry* Create( str ) wxString str; CODE: RETVAL = wxAcceleratorEntry::Create( str ); OUTPUT: RETVAL #endif static void wxAcceleratorEntry::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxAcceleratorEntry::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::AcceleratorEntry", THIS, ST(0) ); delete THIS; int wxAcceleratorEntry::GetCommand() int wxAcceleratorEntry::GetFlags() ## wxKeyCode int wxAcceleratorEntry::GetKeyCode() void wxAcceleratorEntry::Set( flags, code, cmd ) int flags wxKeyCode code int cmd MODULE=Wx PACKAGE=Wx::AcceleratorTable wxAcceleratorTable* wxAcceleratorTable::new( ... ) CODE: if( items == 1 ) { RETVAL = new wxAcceleratorTable; } else { int num = items - 1; wxAcceleratorEntry* entries = new wxAcceleratorEntry[ num ]; for( int i = 0; i < num; ++i ) { SV* rv = ST( i + 1 ); if( SvROK( rv ) ) { if( sv_derived_from( rv, CHAR_P "Wx::AcceleratorEntry" ) ) { entries[i] = *(wxAcceleratorEntry*) wxPli_sv_2_object( aTHX_ rv, "Wx::AcceleratorEntry" ); } else if( SvTYPE( SvRV( rv ) ) == SVt_PVAV ) { AV* av = (AV*) SvRV( rv ); I32 len = av_len( av ) + 1; if( len != 3 ) { delete[] entries; croak( "the %d-th value does not have three" " elements", i + 1 ); } entries[i].Set( SvIV( *av_fetch( av, 0, 0 ) ), wxPli_sv_2_keycode( aTHX_ *av_fetch( av, 1, 0 ) ), SvIV( *av_fetch( av, 2, 0 ) ) ); } else { delete[] entries; croak( "the %d-th value is not an object" " or array reference", i + 1 ); } } else { delete[] entries; croak( "the %d-th value is not an object" " or array reference", i + 1 ); } } RETVAL = new wxAcceleratorTable( num, entries ); delete[] entries; } OUTPUT: RETVAL static void wxAcceleratorTable::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxAcceleratorTable::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::AcceleratorTable", THIS, ST(0) ); delete THIS; bool wxAcceleratorTable::Ok() #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool wxAcceleratorTable::IsOk() #endif Wx-0.9923/XS/Animation.xsp000664000000000000 274012306612233 13467 0ustar00Mark000000000000############################################################################# ## Name: XS/Animation.xsp ## Purpose: XS+++ for Wx::Animation ## Author: Mattia Barbon ## Modified by: ## Created: 18/08/2007 ## RCS-ID: $Id: Animation.xsp 3454 2013-04-02 23:11:55Z mdootson $ ## Copyright: (c) 2007, 2009 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}; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) #include %name{Wx::Animation} class wxAnimation { wxAnimation(); ## wxAnimation( const wxString& name, ## wxAnimationType type = wxANIMATION_TYPE_ANY ); %{ static void wxAnimation::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxAnimation() %code{% wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; %}; bool IsOk() const; int GetDelay( unsigned int frame ); unsigned int GetFrameCount(); wxImage& GetFrame( unsigned int frame ); wxSize GetSize() const; bool LoadFile( const wxString& name, wxAnimationType type = wxANIMATION_TYPE_ANY ); bool Load( wxPliInputStream stream, wxAnimationType type = wxANIMATION_TYPE_ANY ); }; #endif Wx-0.9923/XS/AnimationCtrl.xsp000664000000000000 425312306612233 14315 0ustar00Mark000000000000############################################################################# ## Name: XS/AnimationCtrl.xsp ## Purpose: XS+++ for Wx::AnimationCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 18/08/2007 ## RCS-ID: $Id: AnimationCtrl.xsp 2179 2007-08-18 20:26:47Z mbarbon $ ## Copyright: (c) 2007 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}; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) %typemap{wxAnimationCtrl*}{simple}; #include %name{Wx::AnimationCtrl} class wxAnimationCtrl { %name{newDefault} wxAnimationCtrl() %code{% RETVAL = new wxAnimationCtrl(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; wxAnimationCtrl( wxWindow *parent, wxWindowID id, const wxAnimation& anim = wxNullAnimationPtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAC_DEFAULT_STYLE, const wxString& name = wxAnimationCtrlNameStr ) %code{% RETVAL = new wxAnimationCtrl( parent, id, *anim, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id, const wxAnimation& anim = wxNullAnimationPtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAC_DEFAULT_STYLE, const wxString& name = wxAnimationCtrlNameStr ); bool LoadFile( const wxString& filename, wxAnimationType type = wxANIMATION_TYPE_ANY ); void SetAnimation( const wxAnimation &anim ); wxAnimation& GetAnimation() const; bool Play(); void Stop(); bool IsPlaying() const; void SetInactiveBitmap( const wxBitmap &bmp ); const wxBitmap& GetInactiveBitmap() const; }; #endif Wx-0.9923/XS/App.xs000664000000000000 1336212306612233 12132 0ustar00Mark000000000000############################################################################# ## Name: XS/App.xs ## Purpose: XS for Wx::_App and Wx::App ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: App.xs 3376 2012-09-26 13:38:47Z mdootson $ ## Copyright: (c) 2000-2007, 2010-2011 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include ##include "cpp/app.h" #include MODULE=Wx PACKAGE=Wx PREFIX=wx void wxPostEvent( evthnd, event ) wxEvtHandler* evthnd wxEvent* event CODE: wxPostEvent( evthnd, *event ); void wxWakeUpIdle() MODULE=Wx PACKAGE=Wx::_App int Start( app, sub ) wxApp* app SV* sub CODE: // for Wx::Perl::SplashFast if( !SvROK( sub ) || SvTYPE( SvRV( sub ) ) != SVt_PVCV ) croak( "sub must be a CODE reference" ); #if WXPERL_W_VERSION_LE( 2, 5, 1 ) app->argc = wxPli_get_args_argc_argv( (void***) &app->argv, 1 ); #endif #ifdef __WXMOTIF__ app->SetClassName( app->argv[0] ); app->SetAppName( app->argv[0] ); #endif #if WXPERL_W_VERSION_LE( 2, 5, 0 ) if( !wxPerlAppCreated ) wxEntryInitGui(); #endif PUTBACK; RETVAL = call_oninit( aTHX_ ST(0), sub ); SPAGAIN; OUTPUT: RETVAL wxApp* wxApp::new() CODE: if( !wxTheApp ) #if WXPERL_W_VERSION_LT( 2, 5, 1 ) wxTheApp = new wxPliApp(); #else wxAppConsole::SetInstance( new wxPliApp() ); #endif RETVAL = wxTheApp; OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::App # unimplemented # virtual void OnFatalException() # too low level void wxApp::Dispatch() wxString wxApp::GetAppName() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxString wxApp::GetAppDisplayName() #endif #if defined( __WXMSW__ ) && WXPERL_W_VERSION_LT( 2, 5, 1 ) bool wxApp::GetAuto3D() #endif wxString wxApp::GetClassName() bool wxApp::GetExitOnFrameDelete() wxIcon* wxApp::GetStdIcon( which ) int which CODE: wxString id; switch( which ) { case wxICON_EXCLAMATION: id = wxART_WARNING; break; case wxICON_HAND: id = wxART_ERROR; break; case wxICON_QUESTION: id = wxART_QUESTION; break; case wxICON_INFORMATION: id = wxART_INFORMATION; break; }; RETVAL = new wxIcon( wxArtProvider::GetIcon( id, wxART_MESSAGE_BOX ) ); OUTPUT: RETVAL wxWindow* wxApp::GetTopWindow() bool wxApp::GetUseBestVisual() wxString wxApp::GetVendorName() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxString wxApp::GetVendorDisplayName() #endif void wxApp::ExitMainLoop() #if WXPERL_W_VERSION_LT( 2, 7, 0 ) bool wxApp::Initialized() #endif int wxApp::MainLoop() CODE: RETVAL = THIS->MainLoop(); // hack for embedded case... #if defined( __WXMSW__ ) && WXPERL_W_VERSION_LT( 2, 5, 0 ) wxPliApp::SetKeepGoing( (wxPliApp*) THIS, true ); #endif wxPliApp::DeletePendingObjects( THIS ); OUTPUT: RETVAL bool wxApp::Pending() void wxApp::ProcessPendingEvents() void wxApp::SetAppName( name ) wxString name #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void wxApp::SetAppDisplayName( name ) wxString name #endif #if defined( __WXMSW__ ) && WXPERL_W_VERSION_LT( 2, 5, 0 ) void wxApp::SetAuto3D( auto3d ) bool auto3d #endif void wxApp::SetClassName( name ) wxString name void wxApp::SetExitOnFrameDelete( flag ) bool flag void wxApp::SetTopWindow( window ) wxWindow* window void wxApp::SetVendorName( name ) wxString name #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void wxApp::SetVendorDisplayName( name ) wxString name #endif void wxApp::SetUseBestVisual( flag ) bool flag void wxApp::Yield( onlyifneeded = false ) bool onlyifneeded CODE: THIS->wxApp::Yield( onlyifneeded ); #if defined( __WXMSW__ ) && WXPERL_W_VERSION_GE( 2, 5, 0 ) int GetComCtl32Version() CODE: RETVAL = wxApp::GetComCtl32Version(); OUTPUT: RETVAL #endif #if WXPERL_W_VERSION_GE( 2, 5, 2 ) void wxApp::Exit() bool wxApp::ProcessIdle() #if WXPERL_W_VERSION_LT( 2, 9, 2 ) bool wxApp::SendIdleEvents( window, event ) wxWindow* window wxIdleEvent* event C_ARGS: window, *event #endif bool wxApp::IsActive() #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) wxLayoutDirection wxApp::GetLayoutDirection() #endif wxApp* GetInstance() CODE: RETVAL = (wxApp*)wxApp::GetInstance(); OUTPUT: RETVAL void SetInstance( app ) wxApp* app CODE: wxApp::SetInstance( app ); bool wxApp::IsMainLoopRunning() #if ( WXPERL_W_VERSION_GE( 2, 9, 1 ) && wxDEBUG_LEVEL > 0 ) || ( WXPERL_W_VERSION_LE( 2, 9, 0) && defined(__WXDEBUG__) ) void wxApp::OnAssertFailure(file, line, func, cond, msg) wxChar* file int line wxChar* func wxChar* cond wxChar* msg CODE: THIS->wxApp::OnAssertFailure( file, line, func, cond, msg ); #endif #if ( WXPERL_W_VERSION_GE( 2, 9, 4 ) ) bool wxApp::HasPendingEvents() bool wxApp::IsScheduledForDestruction( obj ) wxObject* obj void wxApp::ResumeProcessingOfPendingEvents() void wxApp::SuspendProcessingOfPendingEvents() void wxApp::ScheduleForDestruction( obj ) wxObject* obj bool wxApp::SafeYield( win, onlyIfNeeded ) wxWindow* win bool onlyIfNeeded bool wxApp::SafeYieldFor( win, eventsToProcess ); wxWindow* win long eventsToProcess bool wxApp::SetNativeTheme( theme ) wxString theme #if defined(__WXOSX_COCOA__) void wxApp::MacOpenFiles( fileNames ) ; wxArrayString fileNames void wxApp::MacOpenFile( fileName ) wxString fileName void wxApp::MacOpenURL( url ) wxString url void wxApp::MacPrintFile( fileName ) wxString fileName void wxApp::MacNewFile() void wxApp::MacReopenApp() void wxApp::MacHideApp() #endif #endif Wx-0.9923/XS/ArtProvider.xsp000664000000000000 1363212306612233 14033 0ustar00Mark000000000000############################################################################# ## Name: XS/ArtProvider.xsp ## Purpose: XS++ for wxArtProvider class ## Author: Matthew "Cheetah" Gabeler-Lee ## Modified by: ## Created: 10/01/2005 ## RCS-ID: $Id: ArtProvider.xsp 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2005-2008, 2010 Matthew Gabeler-Lee ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %module{Wx}; %typemap{wxPlArtProvider*}{simple}; %file{xspp/artprov.h}; %{ #include "cpp/v_cback.h" #define DEC_V_CBACK_WXBITMAP__WXARTID_WXARTCLIENT_WXSIZE_pure( METHOD ) \ wxBitmap METHOD( const wxArtID& id, const wxArtClient& client, const wxSize& size ) #define DEF_V_CBACK_WXBITMAP__WXARTID_WXARTCLIENT_WXSIZE_pure( CLASS, BASE, METHOD ) \ wxBitmap CLASS::METHOD( const wxArtID& id, const wxArtClient& client, \ const wxSize& size ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, \ G_SCALAR, "PPo", &id, &client, \ new wxSize( size ), "Wx::Size" ) ); \ return *(wxBitmap*)wxPli_sv_2_object( aTHX_ ret, "Wx::Bitmap" ); \ } else \ return wxNullBitmap; \ } #define DEC_V_CBACK_WXICONBUNDLE__WXARTID_WXARTCLIENT_pure( METHOD ) \ wxIconBundle METHOD( const wxArtID& id, const wxArtClient& client ) #define DEF_V_CBACK_WXICONBUNDLE__WXARTID_WXARTCLIENT_pure( CLASS, BASE, METHOD ) \ wxIconBundle CLASS::METHOD( const wxArtID& id, const wxArtClient& client ) \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, \ G_SCALAR, "PP", &id, &client ) ); \ return *(wxIconBundle*)wxPli_sv_2_object( aTHX_ ret, "Wx::IconBundle" ); \ } else \ return wxNullIconBundle; \ } class wxPlArtProvider : public wxArtProvider { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlArtProvider ); WXPLI_DECLARE_V_CBACK(); public: wxPlArtProvider( const char* package ) : m_callback( "Wx::ArtProvider" ) { m_callback.SetSelf( wxPli_make_object( this, package ), true ); } DEC_V_CBACK_WXBITMAP__WXARTID_WXARTCLIENT_WXSIZE_pure( CreateBitmap ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEC_V_CBACK_WXICONBUNDLE__WXARTID_WXARTCLIENT_pure( CreateIconBundle ); #endif }; DEF_V_CBACK_WXBITMAP__WXARTID_WXARTCLIENT_WXSIZE_pure( wxPlArtProvider, wxArtProvider, CreateBitmap ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEF_V_CBACK_WXICONBUNDLE__WXARTID_WXARTCLIENT_pure( wxPlArtProvider, wxArtProvider, CreateIconBundle ); #endif #if WXPERL_W_VERSION_GE( 2, 5, 1 ) WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlArtProvider, wxArtProvider ); #else WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlArtProvider, wxObject ); #endif %} %file{-}; %{ #if WXPERL_W_VERSION_GE( 2, 5, 2 ) #include #include "xspp/artprov.h" MODULE=Wx PACKAGE=Wx::ArtProvider #!sub CreateBitmap #!sub CreateIconBundle wxBitmap* GetBitmap( id, client = wxART_OTHER, size = wxDefaultSize ) wxString id wxString client wxSize size CODE: RETVAL = new wxBitmap( wxArtProvider::GetBitmap( id, client, size ) ); OUTPUT: RETVAL wxIcon* GetIcon( id, client = wxART_OTHER, size = wxDefaultSize ) wxString id wxString client wxSize size CODE: RETVAL = new wxIcon( wxArtProvider::GetIcon( id, client, size ) ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxIconBundle* GetIconBundle( id, client = wxART_OTHER ) wxString id wxString client CODE: RETVAL = new wxIconBundle( wxArtProvider::GetIconBundle( id, client ) ); OUTPUT: RETVAL #endif bool PopProvider() CODE: #if WXPERL_W_VERSION_GE( 2, 7, 1 ) RETVAL = wxArtProvider::Pop(); #else RETVAL = wxArtProvider::PopProvider(); #endif OUTPUT: RETVAL void PushProvider( provider ) wxArtProvider* provider CODE: #if WXPERL_W_VERSION_GE( 2, 7, 1 ) wxArtProvider::Push( provider); #else wxArtProvider::PushProvider( provider); #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) void InsertProvider( provider ) wxArtProvider* provider CODE: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxArtProvider::PushBack( provider); #else wxArtProvider::Insert( provider); #endif #endif bool RemoveProvider( provider ) wxArtProvider* provider CODE: #if WXPERL_W_VERSION_GE( 2, 7, 1 ) RETVAL = wxArtProvider::Remove( provider ); #else RETVAL = wxArtProvider::RemoveProvider( provider ); #endif OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool DeleteProvider( provider ) wxArtProvider* provider CODE: RETVAL = wxArtProvider::Delete( provider ); OUTPUT: RETVAL #endif MODULE=Wx PACKAGE=Wx::PlArtProvider wxPlArtProvider* wxPlArtProvider::new() CODE: RETVAL = new wxPlArtProvider( CLASS ); OUTPUT: RETVAL %} %name{Wx::PlArtProvider} class wxPlArtProvider { wxBitmap CreateBitmap( const wxArtID& id, const wxArtClient& client, const wxSize& size ); }; #endif Wx-0.9923/XS/Bitmap.xs000664000000000000 1610012306612233 12617 0ustar00Mark000000000000############################################################################# ## Name: XS/Bitmap.xs ## Purpose: XS for Wx::Bitmap and Wx::Mask ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Bitmap.xs 2069 2007-07-08 15:33:40Z mbarbon $ ## Copyright: (c) 2000-2002, 2005-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::Mask void wxMask::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wbmp_wcol, newBitmapColour ) MATCH_REDISP( wxPliOvl_wbmp_n, newBitmapIndex ) MATCH_REDISP( wxPliOvl_wbmp, newBitmap ) END_OVERLOAD( Wx::Mask::new ) wxMask* newBitmap( CLASS, bitmap ) SV* CLASS wxBitmap* bitmap CODE: RETVAL = new wxMask( *bitmap ); OUTPUT: RETVAL wxMask* newBitmapColour( CLASS, bitmap, colour ) SV* CLASS wxBitmap* bitmap wxColour* colour CODE: RETVAL = new wxMask( *bitmap, *colour ); OUTPUT: RETVAL wxMask* newBitmapIndex( CLASS, bitmap, index ) SV* CLASS wxBitmap* bitmap int index CODE: RETVAL = new wxMask( *bitmap, index ); OUTPUT: RETVAL void wxMask::Destroy() CODE: delete THIS; MODULE=Wx PACKAGE=Wx::Bitmap #if 0 int bmp_spaceship( bmp1, bmp2, ... ) SV* bmp1 SV* bmp2 CODE: // this is not a proper spaceship method // it just allows autogeneration of != and == // anyway, comparing bitmaps is just useless RETVAL = -1; if( SvROK( bmp1 ) && SvROK( bmp2 ) && sv_derived_from( bmp1, "Wx::Bitmap" ) && sv_derived_from( bmp2, "Wx::Bitmap" ) ) { wxBitmap* bitmap1 = (wxBitmap*)_sv_2_object( bmp1, "Wx::Bitmap" ); wxBitmap* bitmap2 = (wxBitmap*)_sv_2_object( bmp2, "Wx::Bitmap" ); RETVAL = *bitmap1 == *bitmap2 ? 0 : 1; } else RETVAL = 1; OUTPUT: RETVAL #endif void wxBitmap::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_n_n, newEmpty, 2 ) MATCH_REDISP( wxPliOvl_s_n, newFile ) MATCH_REDISP( wxPliOvl_wico, newIcon ) MATCH_REDISP( wxPliOvl_wimg, newImage ) END_OVERLOAD( Wx::Bitmap::new ) wxBitmap* newEmpty( CLASS, width, height, depth = -1 ) SV* CLASS int width int height int depth CODE: RETVAL = new wxBitmap( width, height, depth ); OUTPUT: RETVAL wxBitmap* newFile( CLASS, name, type ) SV* CLASS wxString name long type CODE: #if WXPERL_W_VERSION_GE( 2, 5, 0 ) RETVAL = new wxBitmap( name, wxBitmapType(type) ); #else RETVAL = new wxBitmap( name, type ); #endif OUTPUT: RETVAL wxBitmap* newIcon( CLASS, icon ) SV* CLASS wxIcon* icon CODE: RETVAL = new wxBitmap( *icon ); OUTPUT: RETVAL wxBitmap* newFromBits( CLASS, bits, width, height, depth = 1 ) SV* CLASS SV* bits int width int height int depth PREINIT: char* buffer = SvPV_nolen( bits ); CODE: RETVAL = new wxBitmap( buffer, width, height, depth ); OUTPUT: RETVAL wxBitmap* newFromXPM( CLASS, data ) SV* CLASS SV* data PREINIT: char** xpm_data; size_t i, n = wxPli_av_2_charparray( aTHX_ data, &xpm_data ); CODE: RETVAL = new wxBitmap( xpm_data ); for( i = 0; i < n; ++i ) free( xpm_data[i] ); OUTPUT: RETVAL wxBitmap* newImage( CLASS, image ) SV* CLASS wxImage* image CODE: RETVAL = new wxBitmap( *image ); OUTPUT: RETVAL static void wxBitmap::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxBitmap::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Bitmap", THIS, ST(0) ); delete THIS; wxImage* wxBitmap::ConvertToImage() CODE: RETVAL = new wxImage( THIS->ConvertToImage() ); OUTPUT: RETVAL void wxBitmap::CopyFromIcon( icon ) wxIcon* icon CODE: THIS->CopyFromIcon( *icon ); #if defined( __WXMOTIF__ ) || \ defined( __WXMSW__ ) || \ defined( __WXPERL_FORCE__ ) void AddHandler( handler ) wxBitmapHandler* handler CODE: wxBitmap::AddHandler( handler ); # void # CleanUpHandlers() # CODE: # wxBitmap::CleanUpHandlers(); #endif #if defined( __WXMOTIF__ ) || defined( __WXPERL_FORCE__ ) wxBitmapHandler* FindHandlerName( name ) wxString name CODE: RETVAL = wxBitmap::FindHandler( name ); OUTPUT: RETVAL wxBitmapHandler* FindHandlerExtType( extension, type ) wxString extension long type CODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) && defined(__WXMOTIF__) RETVAL = wxBitmap::FindHandler( extension, wxBitmapType(type) ); #else RETVAL = wxBitmap::FindHandler( extension, type ); #endif OUTPUT: RETVAL wxBitmapHandler* FindHandlerType( type ) long type CODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) && defined(__WXMOTIF__) RETVAL = wxBitmap::FindHandler( wxBitmapType(type) ); #else RETVAL = wxBitmap::FindHandler( type ); #endif OUTPUT: RETVAL #endif int wxBitmap::GetDepth() #if defined( __WXMOTIF__ ) || defined( __WXMSW__ ) \ || defined( __WXPERL_FORCE__ ) void GetHandlers() PPCODE: const wxList& list = wxBitmap::GetHandlers(); wxNode* node; EXTEND( SP, list.GetCount() ); for( node = list.GetFirst(); node; node = node->GetNext() ) PUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), node->GetData() ) ); #endif int wxBitmap::GetHeight() wxPalette* wxBitmap::GetPalette() CODE: RETVAL = new wxPalette( *THIS->GetPalette() ); OUTPUT: RETVAL wxMask* wxBitmap::GetMask() int wxBitmap::GetWidth() wxBitmap* wxBitmap::GetSubBitmap( rect ) wxRect* rect CODE: RETVAL = new wxBitmap( THIS->GetSubBitmap( *rect ) ); OUTPUT: RETVAL #if defined( __WXMOTIF__ ) || defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) void InitStandardHandlers() CODE: wxBitmap::InitStandardHandlers(); void InsertHandler( handler ) wxBitmapHandler* handler CODE: wxBitmap::InsertHandler( handler ); #endif #if WXPERL_W_VERSION_GE( 2, 3, 1 ) bool wxBitmap::LoadFile( name, type ) wxString name wxBitmapType type #else bool wxBitmap::LoadFile( name, type ) wxString name long type #endif bool wxBitmap::Ok() #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool wxBitmap::IsOk() #endif #if defined( __WXMOTIF__ ) || defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) bool RemoveHandler( name ) wxString name CODE: RETVAL = wxBitmap::RemoveHandler( name ); OUTPUT: RETVAL #endif bool wxBitmap::SaveFile( name, type, palette = 0 ) wxString name wxBitmapType type wxPalette* palette void wxBitmap::SetDepth( depth ) int depth void wxBitmap::SetHeight( height ) int height void wxBitmap::SetMask( mask ) wxMask* mask CODE: THIS->SetMask( mask ); #if defined( __WXMOTIF__ ) || defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) void wxBitmap::SetPalette( palette ) wxPalette* palette CODE: THIS->SetPalette( *palette ); #endif void wxBitmap::SetWidth( width ) int width Wx-0.9923/XS/BitmapComboBox.xsp000664000000000000 717512306612233 14424 0ustar00Mark000000000000############################################################################# ## Name: XS/BitmapComboBox.xsp ## Purpose: XS++ for Wx::BitmapComboBox ## Author: Mattia Barbon ## Modified by: ## Created: 18/08/2007 ## RCS-ID: $Id: BitmapComboBox.xsp 2406 2008-06-29 18:47:50Z mbarbon $ ## Copyright: (c) 2007-2008 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}; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) #include %typemap{wxBitmapComboBox*}{simple}; %name{Wx::BitmapComboBox} class wxBitmapComboBox { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::BitmapComboBox::new" ) %} %name{newDefault} wxBitmapComboBox() %code{% RETVAL = new wxBitmapComboBox(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxBitmapComboBox( wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices, long style = 0, const wxValidator& val = wxDefaultValidatorPtr, const wxString& name = wxBitmapComboBoxNameStr ) %code{% RETVAL = new wxBitmapComboBox( parent, id, value, pos, size, choices, style, *val, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices, long style = 0, const wxValidator& val = wxDefaultValidatorPtr, const wxString& name = wxBitmapComboBoxNameStr ); %{ void wxBitmapComboBox::Append( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_wbmp_s, AppendData ) MATCH_REDISP( wxPliOvl_s_wbmp, AppendString ) END_OVERLOAD( Wx::BitmapComboBox::Append ) %} %name{AppendString} void Append( const wxString& item, const wxBitmap& bitmap = wxNullBitmapPtr ); %name{AppendData} void Append( const wxString& item, const wxBitmap& bitmap, wxPliUserDataCD* data ); %{ void wxBitmapComboBox::Insert( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s_wbmp_n_s, InsertData ) MATCH_REDISP( wxPliOvl_s_wbmp_n, InsertString ) END_OVERLOAD( Wx::BitmapComboBox::Insert ) %} %name{InsertString} void Insert( const wxString& item, const wxBitmap& bitmap, unsigned int pos ); %name{InsertData} void Insert( const wxString& item, const wxBitmap& bitmap, unsigned int pos, wxPliUserDataCD* data ); wxBitmap GetItemBitmap( unsigned int n ) const; void SetItemBitmap( unsigned int n, const wxBitmap& bitmap ); wxSize GetBitmapSize() const; }; #endif Wx-0.9923/XS/BookCtrl.xsp000664000000000000 545712306612233 13277 0ustar00Mark000000000000############################################################################# ## Name: XS/BookCtrl.xsp ## Purpose: XS+++ for Wx::BookCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 06/12/2003 ## RCS-ID: $Id: BookCtrl.xsp 2071 2007-07-08 15:39:02Z mbarbon $ ## Copyright: (c) 2003, 2006-2007 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}; %{ #if WXPERL_W_VERSION_GE( 2, 5, 1 ) #include #include %} %name{Wx::BookCtrl} class wxBookCtrl { size_t GetPageCount() const; wxWindow *GetPage(size_t n); int GetSelection() const; bool SetPageText(size_t n, const wxString& strText); wxString GetPageText(size_t n) const; void SetImageList(wxImageList *imageList); ## void AssignImageList(wxImageList *imageList) ## wxImageList* GetImageList() const; int GetPageImage(size_t n) const; bool SetPageImage(size_t n, int imageId); void SetPageSize(const wxSize& size); wxSize CalcSizeFromPage(const wxSize& sizePage) const; #if WXPERL_W_VERSION_GE( 2, 7, 0 ) unsigned int GetInternalBorder(); void SetInternalBorder( unsigned int border ); bool IsVertical(); void SetFitToCurrentPage( bool fit ); bool GetFitToCurrentPage(); wxSizer* GetControlSizer(); #endif bool DeletePage(size_t n); bool RemovePage(size_t n); bool DeleteAllPages(); bool AddPage(wxWindow *page, const wxString& text, bool bSelect = false, int imageId = -1 ); bool InsertPage(size_t n, wxWindow *page, const wxString& text, bool bSelect = false, int imageId = -1 ); int SetSelection(size_t n); void AdvanceSelection(bool forward = true); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) int ChangeSelection(size_t n); #endif #if WXPERL_W_VERSION_GE( 2, 6, 0 ) wxWindow* GetCurrentPage(); #endif }; %{ void wxBookCtrl::AssignImageList( imagelist ) wxImageList* imagelist CODE: wxPli_object_set_deleteable( aTHX_ ST(1), false ); THIS->AssignImageList( imagelist ); wxImageList* wxBookCtrl::GetImageList() OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); #if WXPERL_W_VERSION_GE( 2, 7, 0 ) void wxBookCtrl::HitTest( point ) wxPoint point PREINIT: long flags; int item; PPCODE: item = THIS->HitTest( point, &flags ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( item ) ) ); PUSHs( sv_2mortal( newSViv( flags ) ) ); #endif %} %name{Wx::BookCtrlEvent} class wxBookCtrlEvent { int GetSelection() const; void SetSelection(int nSel); int GetOldSelection() const; void SetOldSelection(int nOldSel); }; %{ #endif %}Wx-0.9923/XS/Brush.xsp000664000000000000 373212306612233 12635 0ustar00Mark000000000000############################################################################# ## Name: XS/Brush.xsp ## Purpose: XS for Wx::Brush ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2000 ## RCS-ID: $Id: Brush.xsp 2933 2010-06-20 14:48:07Z mbarbon $ ## Copyright: (c) 2000-2004, 2006-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 ############################################################################# #include #include #include %module{Wx}; %loadplugin{build::Wx::XSP::Overload}; %typemap{wxBrushStyle}{simple}; %name{Wx::Brush} class wxBrush : public %name{Wx::GDIObject} wxGDIObject { %name{newColour} wxBrush( const wxColour& colour, wxBrushStyle style ) %Overload; %name{newBitmap} wxBrush( const wxBitmap& stipple ) %Overload; %name{newName} wxBrush( const wxString& colour, wxBrushStyle style ) %Overload; %{ static void wxBrush::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxBrush::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Brush", THIS, ST(0) ); delete THIS; %} wxColour GetColour() const; const wxBitmap& GetStipple() const %code{% RETVAL = new wxBitmap( *THIS->GetStipple() ); %}; wxBrushStyle GetStyle() const; bool Ok() const; #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool IsOk() const; #endif #if WXPERL_W_VERSION_GE( 2, 6, 0 ) bool IsHatch() const; #endif %name{SetColourColour} void SetColour( const wxColour& colour ) %Overload; %name{SetColourName} void SetColour( const wxString& name ) %Overload; %name{SetColourRGB} void SetColour( int r, int g, int b ) %Overload; void SetStipple( const wxBitmap& stipple ); void SetStyle( wxBrushStyle style ); }; Wx-0.9923/XS/Caret.xs000664000000000000 677512306612233 12442 0ustar00Mark000000000000############################################################################# ## Name: XS/Caret.xs ## Purpose: XS for Wx::Caret ## Author: Mattia Barbon ## Modified by: ## Created: 29/12/2000 ## RCS-ID: $Id: Caret.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2002, 2004, 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::Caret void wxCaret::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wwin_n_n, newWH ) MATCH_REDISP( wxPliOvl_wwin_wsiz, newSize ) MATCH_VOIDM_REDISP( newDefault ) END_OVERLOAD( Wx::Caret::new ) wxCaret* newDefault( CLASS, window, width, height ) SV* CLASS CODE: RETVAL = new wxCaret(); OUTPUT: RETVAL wxCaret* newSize( CLASS, window, size ) SV* CLASS wxWindow* window wxSize size CODE: RETVAL = new wxCaret( window, size ); OUTPUT: RETVAL wxCaret* newWH( CLASS, window, width, height ) SV* CLASS wxWindow* window int width int height CODE: RETVAL = new wxCaret( window, width, height ); OUTPUT: RETVAL void wxCaret::Create( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wwin_n_n, CreateWH ) MATCH_REDISP( wxPliOvl_wwin_wsiz, CreateSize ) END_OVERLOAD( Wx::Caret::Create ) bool wxCaret::CreateSize( window, size ) wxWindow* window wxSize size CODE: RETVAL = THIS->Create( window, size ); OUTPUT: RETVAL bool wxCaret::CreateWH( window, width, height ) wxWindow* window int width int height CODE: RETVAL = THIS->Create( window, width, height ); OUTPUT: RETVAL void wxCaret::Destroy() CODE: delete THIS; int GetBlinkTime() CODE: RETVAL = wxCaret::GetBlinkTime(); OUTPUT: RETVAL void wxCaret::GetSizeWH() PREINIT: int w; int h; PPCODE: THIS->GetPosition( &w, &h ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( w ) ) ); PUSHs( sv_2mortal( newSViv( h ) ) ); wxSize* wxCaret::GetSize() CODE: RETVAL = new wxSize( THIS->GetSize() ); OUTPUT: RETVAL void wxCaret::GetPositionXY() PREINIT: int x; int y; PPCODE: THIS->GetPosition( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); wxPoint* wxCaret::GetPosition() CODE: RETVAL = new wxPoint( THIS->GetPosition() ); OUTPUT: RETVAL wxWindow* wxCaret::GetWindow() void wxCaret::Hide() bool wxCaret::IsOk() bool wxCaret::IsVisible() void wxCaret::Move( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wpoi, MovePoint ) MATCH_REDISP( wxPliOvl_n_n, MoveXY ) END_OVERLOAD( Wx::Caret::Move ) void wxCaret::MovePoint( point ) wxPoint point CODE: THIS->Move( point ); void wxCaret::MoveXY( x, y ) int x int y CODE: THIS->Move( x, y ); void SetBlinkTime( milliseconds ) int milliseconds CODE: wxCaret::SetBlinkTime( milliseconds ); void wxCaret::SetSize( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wsiz, SetSizeSize ) MATCH_REDISP( wxPliOvl_n_n, SetSizeWH ) END_OVERLOAD( Wx::Caret::SetSize ) void wxCaret::SetSizeSize( size ) wxSize size CODE: THIS->SetSize( size ); void wxCaret::SetSizeWH( w, h ) int w int h CODE: THIS->SetSize( w, h ); void wxCaret::Show( show = true ) bool show Wx-0.9923/XS/CheckBox.xs000664000000000000 422212306612233 13053 0ustar00Mark000000000000############################################################################# ## Name: XS/CheckBox.xs ## Purpose: XS for Wx::CheckBox ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2000 ## RCS-ID: $Id: CheckBox.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2004 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 PACKAGE=Wx::CheckBox #include void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::CheckBox::new" ) wxCheckBox* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxCheckBox(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxCheckBox* newFull( CLASS, parent, id, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxCheckBoxNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxString label wxPoint pos wxSize size long style wxValidator* validator wxString name CODE: RETVAL = new wxCheckBox( parent, id, label, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxCheckBox::Create( parent, id, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxCheckBoxNameStr ) wxWindow* parent wxWindowID id wxString label wxPoint pos wxSize size long style wxValidator* validator wxString name C_ARGS: parent, id, label, pos, size, style, *validator, name bool wxCheckBox::GetValue() #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxCheckBoxState wxCheckBox::Get3StateValue() void wxCheckBox::Set3StateValue(state) wxCheckBoxState state bool wxCheckBox::Is3State() bool wxCheckBox::Is3rdStateAllowedForUser() #endif void wxCheckBox::SetValue( state ) bool state bool wxCheckBox::IsChecked() Wx-0.9923/XS/CheckListBox.xs000664000000000000 476012306612233 13716 0ustar00Mark000000000000############################################################################# ## Name: XS/CheckListBox.xs ## Purpose: XS for Wx::CheckListBox ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2000 ## RCS-ID: $Id: CheckListBox.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2004, 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 MODULE=Wx PACKAGE=Wx::CheckListBox void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::CheckListBox::new" ) wxCheckListBox* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxCheckListBox(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxCheckListBox* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxListBoxNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size SV* choices long style wxValidator* validator wxString name PREINIT: wxString* chs; int n; CODE: if( choices ) n = wxPli_av_2_stringarray( aTHX_ choices, &chs ); else { n = 0; chs = 0; } RETVAL = new wxCheckListBox( parent, id, pos, size, n, chs, style|wxLB_OWNERDRAW, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); delete[] chs; OUTPUT: RETVAL bool wxCheckListBox::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxListBoxNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size SV* choices long style wxValidator* validator wxString name PREINIT: wxString* chs; int n; CODE: if( choices ) n = wxPli_av_2_stringarray( aTHX_ choices, &chs ); else { n = 0; chs = 0; } RETVAL = THIS->Create( parent, id, pos, size, n, chs, style|wxLB_OWNERDRAW, *validator, name ); delete[] chs; OUTPUT: RETVAL void wxCheckListBox::Check( item, check = false ) int item bool check bool wxCheckListBox::IsChecked( item ) int item Wx-0.9923/XS/Choice.xs000664000000000000 501712306612233 12562 0ustar00Mark000000000000############################################################################# ## Name: XS/Choice.xs ## Purpose: XS for Wx::Choice ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2000 ## RCS-ID: $Id: Choice.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2003, 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 MODULE=Wx PACKAGE=Wx::Choice void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Choice::new" ) wxChoice* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxChoice(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxChoice* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxChoiceNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size SV* choices long style wxValidator* validator wxString name PREINIT: int n = 0; wxString *chs = 0; CODE: if( choices ) n = wxPli_av_2_stringarray( aTHX_ choices, &chs ); RETVAL = new wxChoice( parent, id, pos, size, n, chs, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); delete[] chs; OUTPUT: RETVAL bool wxChoice::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxChoiceNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size SV* choices long style wxValidator* validator wxString name PREINIT: int n = 0; wxString *chs = 0; CODE: if( choices ) n = wxPli_av_2_stringarray( aTHX_ choices, &chs ); RETVAL = THIS->Create( parent, id, pos, size, n, chs, style, *validator, name ); delete[] chs; OUTPUT: RETVAL void wxChoice::Clear() void wxChoice::Delete( n ) int n #if !defined(__WXUNIVERSAL__) int wxChoice::GetColumns() void wxChoice::SetColumns( n = 1 ) int n #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) int wxChoice::GetCurrentSelection() #endif void wxChoice::SetSelection( n ) int n void wxChoice::SetStringSelection( string ) wxString string Wx-0.9923/XS/Choicebook.xsp000664000000000000 365712306612233 13625 0ustar00Mark000000000000############################################################################# ## Name: XS/Choicebook.xsp ## Purpose: XS++ for Wx::Choicebook ## Author: Mattia Barbon ## Modified by: ## Created: 04/01/2005 ## RCS-ID: $Id: Choicebook.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2005, 2006 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}; %typemap{wxChoicebook*}{simple}; %{ #if WXPERL_W_VERSION_GE( 2, 5, 3 ) #include #include %} %name{Wx::Choicebook} class wxChoicebook { %name{newDefault} wxChoicebook() %code{% RETVAL = new wxChoicebook(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxChoicebook(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxEmptyString) %code{% RETVAL = new wxChoicebook( parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxEmptyString); bool IsVertical(); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) wxChoice* GetChoiceCtrl() const; #endif }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Choicebook::new" ) %} %{ #endif %} Wx-0.9923/XS/ClassInfo.xsp000664000000000000 572712306612233 13441 0ustar00Mark000000000000############################################################################# ## Name: XS/ClassInfo.xsp ## Purpose: XS for Wx::ClassInfo the CLASSINFO macro ## Author: Mattia Barbon ## Modified by: ## Created: 20/11/2000 ## RCS-ID: $Id: ClassInfo.xsp 3356 2012-09-20 23:15:44Z mdootson $ ## Copyright: (c) 2000-2001, 2004, 2007, 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}; %typemap{wxClassInfo*}{simple}; %typemap{const wxClassInfo*}{simple}; %typemap{wxPropertyInfo*}{simple}; %typemap{const wxPropertyInfo*}{simple}; %typemap{const wxTypeInfo*}{simple}; %typemap{wxPropertyAccessor*}{simple}; %typemap{wxTypeKind}{simple}; %typemap{wxPropertyInfoFlags}{simple}; %{ MODULE=Wx PACKAGE=Wx::ClassInfo wxClassInfo* FindClass( name ) wxString name CODE: RETVAL = wxClassInfo::FindClass( name ); OUTPUT: RETVAL const wxChar* wxClassInfo::GetBaseClassName1() const wxChar* wxClassInfo::GetBaseClassName2() const wxChar* wxClassInfo::GetClassName() wxClassInfo* wxClassInfo::GetNext() CODE: RETVAL = (wxClassInfo*)THIS->GetNext(); OUTPUT: RETVAL wxClassInfo* GetFirst() CODE: RETVAL = (wxClassInfo*)wxClassInfo::GetFirst(); OUTPUT: RETVAL %} #if wxUSE_EXTENDED_RTTI %name{Wx::ClassInfo} class wxClassInfo { %{ void wxClassInfo::GetParents() PPCODE: const wxClassInfo** parents = THIS->GetParents(); while( *parents ) XPUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), *parents, "Wx::ClassInfo" ) ); %} const wxPropertyInfo* GetFirstProperty(); const wxPropertyInfo* FindPropertyInfo( const wxChar* name ); const wxPropertyInfo* FindPropertyInfoInThisClass( const wxChar* name ); ## void GetProperties( wxPropertyInfoMap &map ) const; }; %name{Wx::PropertyInfo} class wxPropertyInfo { const wxClassInfo* GetDeclaringClass() const; const wxString& GetName() const; wxPropertyInfoFlags GetFlags() const; const wxString& GetHelpString() const; const wxString& GetGroupString() const; const wxTypeInfo * GetCollectionElementTypeInfo() const; const wxTypeInfo * GetTypeInfo() const; wxPropertyAccessor* GetAccessor() const; wxPropertyInfo* GetNext() const; }; %name{Wx::TypeInfo} class wxTypeInfo { wxTypeKind GetKind() const; const wxString& GetTypeName() const; bool IsDelegateType() const; bool IsCustomType() const; bool IsObjectType() const; }; %name{Wx::PropertyAccessor} class wxPropertyAccessor { bool HasSetter() const; bool HasCollectionGetter() const; bool HasGetter() const; bool HasAdder() const; const wxString& GetCollectionGetterName() const; const wxString& GetGetterName() const; const wxString& GetSetterName() const; const wxString& GetAdderName() const; }; #endif Wx-0.9923/XS/CollapsiblePane.xsp000664000000000000 521512306612233 14605 0ustar00Mark000000000000############################################################################# ## Name: XS/CollapsiblePane.xsp ## Purpose: XS++ for Wx::CollapsiblePane ## Author: Mattia Barbon ## Modified by: ## Created: 17/08/2007 ## RCS-ID: $Id: CollapsiblePane.xsp 2171 2007-08-17 22:55:20Z mbarbon $ ## Copyright: (c) 2007 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}; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) #include %typemap{wxCollapsiblePane*}{simple}; %typemap{wxCollapsiblePaneEvent*}{simple}; %name{Wx::CollapsiblePaneEvent} class wxCollapsiblePaneEvent { wxCollapsiblePaneEvent( wxObject *generator, int id, bool collapsed ); bool GetCollapsed() const; void SetCollapsed( bool c ); }; %name{Wx::CollapsiblePane} class wxCollapsiblePane { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::CollapsiblePane::new" ) %} %name{newDefault} wxCollapsiblePane() %code{% RETVAL = new wxCollapsiblePane(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxCollapsiblePane( wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCP_DEFAULT_STYLE, const wxValidator& val = wxDefaultValidatorPtr, const wxString& name = wxCollapsiblePaneNameStr ) %code{% RETVAL = new wxCollapsiblePane( parent, id, label, pos, size, style, *val, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCP_DEFAULT_STYLE, const wxValidator& val = wxDefaultValidatorPtr, const wxString& name = wxCollapsiblePaneNameStr ); void Collapse( bool collapse = true ); void Expand(); bool IsCollapsed() const; bool IsExpanded() const; wxWindow* GetPane() const; }; #endif Wx-0.9923/XS/Colour.xs000664000000000000 450012306612233 12627 0ustar00Mark000000000000############################################################################# ## Name: XS/Colour.xs ## Purpose: XS for Wx::Colour ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Colour.xs 2285 2007-11-11 21:31:54Z mbarbon $ ## Copyright: (c) 2000-2002, 2004, 2006-2007 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 PACKAGE=Wx::Colour void wxColour::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n_n_n, newRGBA ) MATCH_REDISP( wxPliOvl_n_n_n, newRGB ) MATCH_REDISP( wxPliOvl_s, newName ) END_OVERLOAD( Wx::Colour::new ) #if WXPERL_W_VERSION_GE( 2, 7, 1 ) wxColour* newRGBA( CLASS, red, green, blue, alpha = wxALPHA_OPAQUE ) SV* CLASS unsigned char red unsigned char green unsigned char blue unsigned char alpha CODE: RETVAL = new wxColour( red, green, blue, alpha ); OUTPUT: RETVAL #endif wxColour* newRGB( CLASS, red, green, blue ) SV* CLASS unsigned char red unsigned char green unsigned char blue CODE: RETVAL = new wxColour( red, green, blue ); OUTPUT: RETVAL wxColour* newName( CLASS, name ) SV* CLASS wxString name CODE: RETVAL = new wxColour( name ); OUTPUT: RETVAL static void wxColour::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxColour::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Colour", THIS, ST(0) ); delete THIS; unsigned char wxColour::Blue() unsigned char wxColour::Green() bool wxColour::Ok() #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool wxColour::IsOk() #endif unsigned char wxColour::Red() #if WXPERL_W_VERSION_GE( 2, 7, 1 ) unsigned char wxColour::Alpha() void wxColour::Set( red, green, blue, alpha ) unsigned char red unsigned char green unsigned char blue unsigned char alpha #else void wxColour::Set( red, green, blue ) unsigned char red unsigned char green unsigned char blue #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxString wxColour::GetAsString( long flags ) #endif #if !defined(__WXMAC__) long wxColour::GetPixel() #endif Wx-0.9923/XS/ColourDatabase.xs000664000000000000 201712306612233 14255 0ustar00Mark000000000000############################################################################# ## Name: XS/ColourDatabase.xs ## Purpose: XS for Wx::ColourDatabase ## Author: Mark Dootson ## Modified by: ## Created: 14/09/2007 ## RCS-ID: $Id: ColourDatabase.xs 2282 2007-11-11 13:48:28Z mbarbon $ ## Copyright: (c) 2007 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 PACKAGE=Wx::ColourDatabase void AddColour( colourname, colour ) wxString colourname wxColour* colour CODE: wxTheColourDatabase->AddColour( colourname, *colour ); wxColour* Find( colourname ) wxString colourname CODE: RETVAL = new wxColour( wxTheColourDatabase->Find( colourname ) ); OUTPUT: RETVAL wxString FindName( colour ) wxColour* colour CODE: RETVAL = wxTheColourDatabase->FindName( *colour ); OUTPUT: RETVAL Wx-0.9923/XS/ColourDialog.xs000664000000000000 372412306612233 13756 0ustar00Mark000000000000############################################################################# ## Name: XS/ColourDialog.xs ## Purpose: XS for Wx::ColourDialog ## Author: Mattia Barbon ## Modified by: ## Created: 27/11/2000 ## RCS-ID: $Id: ColourDialog.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2001, 2003, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::ColourDialog wxColourDialog* wxColourDialog::new( parent, data = 0 ) wxWindow* parent wxColourData* data wxColourData* wxColourDialog::GetColourData() CODE: RETVAL = new wxColourData( THIS->GetColourData() ); OUTPUT: RETVAL int wxColourDialog::ShowModal() MODULE=Wx PACKAGE=Wx::ColourData wxColourData* wxColourData::new() static void wxColourData::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxColourData::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::ColourData", THIS, ST(0) ); delete THIS; bool wxColourData::GetChooseFull() wxColour* wxColourData::GetColour() CODE: RETVAL = new wxColour( THIS->GetColour() ); OUTPUT: RETVAL wxColour* wxColourData::GetCustomColour( i ) int i CODE: RETVAL = new wxColour( THIS->GetCustomColour( i ) ); OUTPUT: RETVAL void wxColourData::SetChooseFull( flag ) bool flag void wxColourData::SetColour( colour ) wxColour* colour C_ARGS: *colour void wxColourData::SetCustomColour( i, colour ) int i wxColour* colour C_ARGS: i, *colour MODULE=Wx PACKAGE=Wx PREFIX=wx wxColour* wxGetColourFromUser( parent, colInit = (wxColour*)&wxNullColour ) wxWindow* parent wxColour* colInit CODE: RETVAL = new wxColour( wxGetColourFromUser( parent, *colInit ) ); OUTPUT: RETVAL Wx-0.9923/XS/ColourPickerCtrl.xsp000664000000000000 557412306612233 15006 0ustar00Mark000000000000############################################################################# ## Name: XS/ColourPickerCtrl.xsp ## Purpose: XS+++ for Wx::ColourPickerCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 01/11/2006 ## RCS-ID: $Id: ColourPickerCtrl.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2006 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}; %{ #if WXPERL_W_VERSION_GE( 2, 7, 0 ) #include %} %typemap{wxColourPickerCtrl*}{simple}; %typemap{wxColourPickerEvent *}{simple}; %name{Wx::ColourPickerCtrl} class wxColourPickerCtrl { %name{newDefault} wxColourPickerCtrl() %code{% RETVAL = new wxColourPickerCtrl; wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxColourPickerCtrl( wxWindow *parent, wxWindowID id = wxID_ANY, const wxColour& col = wxBLACKPtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxButtonNameStr ) %code{% RETVAL = new wxColourPickerCtrl( parent, id, *col, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxColour& col = wxBLACKPtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxButtonNameStr ); wxColour GetColour() const; %name{SetColourColour} void SetColour( const wxColour& col ); %name{SetColourString} bool SetColour( const wxString& text ); }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::ColourPickerCtrl::new" ) void SetColour( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wcol, SetColourColour ) MATCH_REDISP( wxPliOvl_s, SetColourString ) END_OVERLOAD( Wx::ColourPickerCtrl::SetColour ) %} %name{Wx::ColourPickerEvent} class wxColourPickerEvent { wxColour GetColour() const; void SetColour( const wxColour& colour ); }; %{ #endif %} Wx-0.9923/XS/ComboBox.xs000664000000000000 1107512313722275 13127 0ustar00Mark000000000000############################################################################# ## Name: XS/ComboBox.xs ## Purpose: XS for Wx::ComboBox ## Author: Mattia Barbon ## Modified by: ## Created: 31/10/2000 ## RCS-ID: $Id: ComboBox.xs 3504 2013-06-28 04:18:43Z mdootson $ ## Copyright: (c) 2000-2004, 2006-2008, 2010-2011 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include #include "cpp/overload.h" MODULE=Wx PACKAGE=Wx::ComboBox void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::ComboBox::new" ) wxComboBox* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxComboBox(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxComboBox* newFull( CLASS, parent, id = wxID_ANY, value = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxComboBoxNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxString value wxPoint pos wxSize size SV* choices long style wxValidator* validator wxString name PREINIT: wxString* chs = 0; int n = 0; CODE: if( choices != 0 ) n = wxPli_av_2_stringarray( aTHX_ choices, &chs ); RETVAL = new wxComboBox( parent, id, value, pos, size, n, chs, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); delete[] chs; OUTPUT: RETVAL bool wxComboBox::Create( parent, id = wxID_ANY, value = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxComboBoxNameStr ) wxWindow* parent wxWindowID id wxString value wxPoint pos wxSize size SV* choices long style wxValidator* validator wxString name PREINIT: wxString* chs = 0; int n = 0; CODE: if( choices != 0 ) n = wxPli_av_2_stringarray( aTHX_ choices, &chs ); RETVAL = THIS->Create( parent, id, value, pos, size, n, chs, style, *validator, name ); delete[] chs; OUTPUT: RETVAL #if defined( __WXMAC__ ) || ( defined( __WXGTK__ ) && WXPERL_W_VERSION_LT( 2, 9, 0 ) ) #define WXPERL_IN_COMBOBOX INCLUDE_COMMAND: $^X -pe "s/ItemContainerImmutable/ComboBox/g" XS/ItemContainerImmutable.xs # the second regex is an horrible hack to solve ambiguity; # see also OwnerDrawnComboBox.xsp INCLUDE_COMMAND: $^X -pe "s/ItemContainer/ComboBox/g;s/->(?=[SG]etClientObject)/->wxItemContainer::/" XS/ItemContainer.xs #undef WXPERL_IN_COMBOBOX int wxComboBox::GetCurrentSelection() #endif void wxComboBox::SetEditable( bool editable ) #if WXPERL_W_VERSION_GE( 2, 9, 3 ) bool wxComboBox::IsListEmpty() bool wxComboBox::IsTextEmpty() #endif void wxComboBox::Copy() void wxComboBox::Cut() bool wxComboBox::CanCopy() bool wxComboBox::CanCut() bool wxComboBox::CanPaste() void wxComboBox::Undo() void wxComboBox::Redo() bool wxComboBox::CanUndo() bool wxComboBox::CanRedo() long wxComboBox::GetInsertionPoint() wxTextPos wxComboBox::GetLastPosition() wxString wxComboBox::GetValue() void wxComboBox::Paste() #if WXPERL_W_VERSION_GE( 2, 9, 1 ) void wxComboBox::Popup() void wxComboBox::Dismiss() #endif void wxComboBox::Replace( from, to, text ) long from long to wxString text void wxComboBox::Remove( from ,to ) long from long to void wxComboBox::SetInsertionPoint( pos ) long pos void wxComboBox::SetInsertionPointEnd() void wxComboBox::GetSelection() PREINIT: long from; long to; int selindex; PPCODE: if( GIMME_V == G_ARRAY ) { THIS->GetSelection( &from, &to ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( from ) ) ); PUSHs( sv_2mortal( newSViv( to ) ) ); } else { selindex = THIS->GetSelection(); EXTEND( SP, 1 ); PUSHs( sv_2mortal( newSViv( selindex ) ) ); } void wxComboBox::SetSelection( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n, SetMark ) MATCH_REDISP( wxPliOvl_n, SetSelectionN ) END_OVERLOAD( Wx::ComboBox::SetSelection ) void wxComboBox::SetSelectionN( n ) int n CODE: THIS->SetSelection( n ); void wxComboBox::SetMark( from, to ) long from long to CODE: THIS->SetSelection( from, to ); void wxComboBox::SetValue( string ) wxString string Wx-0.9923/XS/ComboCtrl.xsp000664000000000000 1027512306612233 13456 0ustar00Mark000000000000############################################################################# ## Name: XS/ComboCtrl.xsp ## Purpose: XS++ for Wx::ComboCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 12/08/2007 ## RCS-ID: $Id: ComboCtrl.xsp 2626 2009-10-18 22:48:17Z mbarbon $ ## Copyright: (c) 2007, 2009 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}; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) #include %typemap{wxComboPopup*}{simple}; %typemap{wxComboCtrl*}{simple}; %name{Wx::ComboCtrl} class wxComboCtrl { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::ComboCtrl::new" ) %} %name{newDefault} wxComboCtrl() %code{% RETVAL = new wxComboCtrl(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxComboCtrl( wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxEmptyString) %code{% RETVAL = new wxComboCtrl( parent, id, value, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxEmptyString ); void ShowPopup(); void HidePopup(); ## virtual void OnButtonClick(); bool IsPopupShown() const; void SetPopupControl( wxComboPopup* popup ); wxComboPopup* GetPopupControl(); wxWindow *GetPopupWindow() const; wxTextCtrl *GetTextCtrl() const; wxWindow *GetButton() const; wxString GetValue() const; void SetValue( const wxString& value ); void Copy(); void Cut(); void Paste(); void SetInsertionPoint( long pos ); void SetInsertionPointEnd(); long GetInsertionPoint() const; long GetLastPosition() const; void Replace( long from, long to, const wxString& value ); void Remove( long from, long to ); void SetSelection( long from, long to ); void Undo(); void SetText( const wxString& value ); void SetPopupMinWidth( int width ); void SetPopupMaxHeight( int height ); void SetPopupExtents( int extLeft, int extRight ); void SetCustomPaintWidth( int width ); int GetCustomPaintWidth() const; void SetPopupAnchor( int anchorSide ); void SetButtonPosition( int width = -1, int height = -1, int side = wxRIGHT, int spacingX = 0 ); wxSize GetButtonSize(); void SetButtonBitmaps( const wxBitmap& bmpNormal, bool pushButtonBg = false, const wxBitmap& bmpPressed = wxNullBitmapPtr, const wxBitmap& bmpHover = wxNullBitmapPtr, const wxBitmap& bmpDisabled = wxNullBitmapPtr ); #if WXPERL_W_VERSION_LT( 2, 7, 0 ) || WXWIN_COMPATIBILITY_2_6 void SetTextIndent( int indent ); wxCoord GetTextIndent() const; #endif const wxRect& GetTextRect() const; void UseAltPopupWindow( bool enable = true ); void EnablePopupAnimation( bool enable = true ); const wxBitmap& GetBitmapNormal() const; const wxBitmap& GetBitmapPressed() const; const wxBitmap& GetBitmapHover() const; const wxBitmap& GetBitmapDisabled() const; }; #endif Wx-0.9923/XS/ComboPopup.xsp000664000000000000 1470312306612233 13655 0ustar00Mark000000000000############################################################################# ## Name: XS/ComboPopup.xsp ## Purpose: XS++ for Wx::ComboPopup ## Author: Mattia Barbon ## Modified by: ## Created: 12/08/2007 ## RCS-ID: $Id: ComboPopup.xsp 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2007, 2009-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}; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) %typemap{wxComboCtrlBase*}{simple}; %typemap{wxComboCtrl*}{simple}; %typemap{wxComboPopup*}{simple}; %typemap{wxPlComboPopup*}{simple}; %file{xspp/combopopup.h}; %{ #include #include "cpp/v_cback.h" // wxSize METH( int, int, int ) #define DEC_V_CBACK_WXSIZE__INT_INT_INT( METHOD ) \ DEC_V_CBACK_ANY__INT_INT_INT_( wxSize, METHOD, wxPli_NOCONST ) #define DEC_V_CBACK_WXSIZE__INT_INT_INT_const( METHOD ) \ DEC_V_CBACK_ANY__INT_INT_INT_( wxSize, METHOD, wxPli_CONST ) #define DEF_V_CBACK_WXSIZE__INT_INT_INT( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__INT_INT_INT_( wxSize, wxPli_sv_2_wxsize( aTHX_ ret ), CLASS, return BASE::METHOD(p1,p2,p3), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_WXSIZE__INT_INT_INT_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__INT_INT_INT_( wxSize, wxPli_sv_2_wxsize( aTHX_ ret ), CLASS, return wxSize(), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_WXSIZE__INT_INT_INT_const( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__INT_INT_INT_( wxSize, wxPli_sv_2_wxsize( aTHX_ ret ), CLASS, return BASE::METHOD(p1,p2,p3), METHOD, wxPli_CONST ) // void METH(wxDC&, const wxRect&) #define DEC_V_CBACK_VOID__WXDC_WXRECT( METHOD ) \ void METHOD( wxDC& p1, const wxRect& p2 ) #define DEF_V_CBACK_VOID__WXDC_WXRECT( CLASS, BASE, METHOD ) \ void CLASS::METHOD( wxDC& p1, const wxRect& p2 ) \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, \ G_SCALAR|G_DISCARD, \ "QoL", &p1, \ new wxRect( p2 ), "Wx::Rect") );\ return; \ } else \ return; \ } // void METH(wxKeyEvent&) #define DEC_V_CBACK_VOID__WXKEYEVENT( METHOD ) \ DEC_V_CBACK_ANY__WXKEYEVENT_( void, METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__WXKEYEVENT( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__WXKEYEVENT_( void, ;, CLASS, BASE::METHOD(p1), METHOD, wxPli_NOCONST ) class wxPlComboPopup : public wxComboPopup { // WXPLI_DECLARE_DYNAMIC_CLASS( wxPlComboPopup ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPlComboPopup, "Wx::ComboPopup", true ); void base_OnPopup() { wxComboPopup::OnPopup(); } void base_OnDismiss() { wxComboPopup::OnDismiss(); } void base_SetStringValue( const wxString& value ) { wxComboPopup::SetStringValue( value ); } void base_PaintComboControl( wxDC& dc, const wxRect& rect ) { wxComboPopup::PaintComboControl( dc, rect ); } void base_OnComboKeyEvent( wxKeyEvent& event ) { wxComboPopup::OnComboKeyEvent( event ); } void base_OnComboDoubleClick() { wxComboPopup::OnComboDoubleClick(); } wxSize base_GetAdjustedSize( int minWidth, int prefHeight, int maxHeight ) { return wxComboPopup::GetAdjustedSize( minWidth, prefHeight, maxHeight ); } bool base_LazyCreate() { return wxComboPopup::LazyCreate(); } wxComboCtrlBase* GetComboCtrl() { return m_combo; } DEC_V_CBACK_VOID__VOID( Init ); DEC_V_CBACK_BOOL__WXWINDOW( Create ); DEC_V_CBACK_WXWINDOW__VOID( GetControl ); DEC_V_CBACK_VOID__VOID( OnPopup ); DEC_V_CBACK_VOID__VOID( OnDismiss ); DEC_V_CBACK_VOID__WXSTRING( SetStringValue ); DEC_V_CBACK_WXSTRING__VOID_const( GetStringValue ); DEC_V_CBACK_VOID__WXDC_WXRECT( PaintComboControl ); DEC_V_CBACK_VOID__WXKEYEVENT( OnComboKeyEvent ); DEC_V_CBACK_VOID__VOID( OnComboDoubleClick ); DEC_V_CBACK_WXSIZE__INT_INT_INT( GetAdjustedSize ); DEC_V_CBACK_BOOL__VOID( LazyCreate ); }; DEF_V_CBACK_VOID__VOID( wxPlComboPopup, wxComboPopup, Init ); DEF_V_CBACK_BOOL__WXWINDOW_pure( wxPlComboPopup, wxComboPopup, Create ); DEF_V_CBACK_WXWINDOW__VOID_pure( wxPlComboPopup, wxComboPopup, GetControl ); DEF_V_CBACK_VOID__VOID( wxPlComboPopup, wxComboPopup, OnPopup ); DEF_V_CBACK_VOID__VOID( wxPlComboPopup, wxComboPopup, OnDismiss ); DEF_V_CBACK_VOID__WXSTRING( wxPlComboPopup, wxComboPopup, SetStringValue ); DEF_V_CBACK_WXSTRING__VOID_const_pure( wxPlComboPopup, wxComboPopup, GetStringValue ); DEF_V_CBACK_VOID__WXDC_WXRECT( wxPlComboPopup, wxComboPopup, PaintComboControl ); DEF_V_CBACK_VOID__WXKEYEVENT( wxPlComboPopup, wxComboPopup, OnComboKeyEvent ); DEF_V_CBACK_VOID__VOID( wxPlComboPopup, wxComboPopup, OnComboDoubleClick ); DEF_V_CBACK_WXSIZE__INT_INT_INT( wxPlComboPopup, wxComboPopup, GetAdjustedSize ); DEF_V_CBACK_BOOL__VOID( wxPlComboPopup, wxComboPopup, LazyCreate ); %} %file{-}; #include "xspp/combopopup.h" %name{Wx::ComboPopup} class wxPlComboPopup { wxPlComboPopup() %code{% RETVAL = new wxPlComboPopup( CLASS ); %}; %name{OnPopup} void base_OnPopup(); %name{OnDismiss} void base_OnDismiss(); %name{SetStringValue} void base_SetStringValue( const wxString& value ); %name{PaintComboControl} void base_PaintComboControl( wxDC& dc, const wxRect& rect ); %name{OnComboKeyEvent} void base_OnComboKeyEvent( wxKeyEvent& event ); %name{OnComboDoubleClick} void base_OnComboDoubleClick(); %name{GetAdjustedSize} wxSize base_GetAdjustedSize( int minWidth, int prefHeight, int maxHeight ); %name{LazyCreate} bool base_LazyCreate(); void Dismiss(); bool IsCreated() const; wxComboCtrlBase* GetComboCtrl(); #!sub Create #!sub GetControl #!sub GetStringValue #!sub Init }; #endif Wx-0.9923/XS/Config.xs000664000000000000 1422312306612233 12614 0ustar00Mark000000000000############################################################################# ## Name: XS/Config.xs ## Purpose: XS for Wx::*Config* ## Author: Mattia Barbon ## Modified by: ## Created: 13/12/2001 ## RCS-ID: $Id: Config.xs 2299 2007-11-25 17:30:04Z mbarbon $ ## Copyright: (c) 2001-2002, 2004, 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::ConfigBase void wxConfigBase::Destroy() CODE: delete THIS; wxConfigBase* Create() CODE: RETVAL = wxConfigBase::Create(); OUTPUT: RETVAL void DontCreateOnDemand() CODE: wxConfigBase::DontCreateOnDemand(); bool wxConfigBase::DeleteAll() bool wxConfigBase::DeleteEntry( key, deleteGroupIfEmpty = true ) wxString key bool deleteGroupIfEmpty bool wxConfigBase::DeleteGroup( key ) wxString key bool wxConfigBase::Exists( key ) wxString key bool wxConfigBase::Flush( currentOnly = false ) bool currentOnly wxConfigBase* Get( createOnDemand = true ) bool createOnDemand CODE: RETVAL = wxConfigBase::Get( createOnDemand ); OUTPUT: RETVAL wxString wxConfigBase::GetAppName() EntryType wxConfigBase::GetEntryType( name ) wxString name void wxConfigBase::GetFirstEntry() PREINIT: wxString name; long index; bool ret; PPCODE: ret = THIS->GetFirstEntry( name, index ); EXTEND( SP, 3 ); PUSHs( sv_2mortal( newSViv( ret ) ) ); SV* tmp = newSViv( 0 ); WXSTRING_OUTPUT( name, tmp ); PUSHs( sv_2mortal( tmp ) ); PUSHs( sv_2mortal( newSViv( index ) ) ); void wxConfigBase::GetFirstGroup() PREINIT: wxString name; long index; bool ret; PPCODE: ret = THIS->GetFirstGroup( name, index ); EXTEND( SP, 3 ); PUSHs( sv_2mortal( newSViv( ret ) ) ); SV* tmp = newSViv( 0 ); WXSTRING_OUTPUT( name, tmp ); PUSHs( sv_2mortal( tmp ) ); PUSHs( sv_2mortal( newSViv( index ) ) ); void wxConfigBase::GetNextEntry( index ) long index PREINIT: wxString name; bool ret; PPCODE: ret = THIS->GetNextEntry( name, index ); EXTEND( SP, 3 ); PUSHs( sv_2mortal( newSViv( ret ) ) ); SV* tmp = newSViv( 0 ); WXSTRING_OUTPUT( name, tmp ); PUSHs( sv_2mortal( tmp ) ); PUSHs( sv_2mortal( newSViv( index ) ) ); void wxConfigBase::GetNextGroup( index ) long index PREINIT: wxString name; bool ret; PPCODE: ret = THIS->GetNextGroup( name, index ); EXTEND( SP, 3 ); PUSHs( sv_2mortal( newSViv( ret ) ) ); SV* tmp = newSViv( 0 ); WXSTRING_OUTPUT( name, tmp ); PUSHs( sv_2mortal( tmp ) ); PUSHs( sv_2mortal( newSViv( index ) ) ); unsigned int wxConfigBase::GetNumberOfEntries( recursive = false ) bool recursive unsigned int wxConfigBase::GetNumberOfGroups( recursive = false ) bool recursive wxString wxConfigBase::GetPath() wxString wxConfigBase::GetVendorName() bool wxConfigBase::HasEntry( name ) wxString name bool wxConfigBase::HasGroup( name ) wxString name bool wxConfigBase::IsExpandingEnvVars() bool wxConfigBase::IsRecordingDefaults() wxString wxConfigBase::Read( key, def = wxEmptyString ) wxString key wxString def CODE: THIS->Read( key, &RETVAL, def ); OUTPUT: RETVAL long wxConfigBase::ReadInt( key, def = 0 ) wxString key long def CODE: THIS->Read( key, &RETVAL, def ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 9, 0 ) long wxConfigBase::ReadLong( key, def = 0 ) wxString key long def double wxConfigBase::ReadDouble( key, def = 0.0 ) wxString key double def bool wxConfigBase::ReadBool( key, def = false ) wxString key bool def #else bool wxConfigBase::ReadBool( key, def = false ) wxString key bool def CODE: THIS->Read( key, &RETVAL, def ); OUTPUT: RETVAL #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) && wxUSE_BASE64 SV* wxConfigBase::ReadBinary( key ) wxString key CODE: wxMemoryBuffer data; THIS->Read( key, &data ); RETVAL = newSVpvn( (const char*)data.GetData(), data.GetDataLen() ); OUTPUT: RETVAL #endif bool wxConfigBase::RenameEntry( oldName, newName ) wxString oldName wxString newName bool wxConfigBase::RenameGroup( oldName, newName ) wxString oldName wxString newName void Set( config ) wxConfigBase* config CODE: wxConfigBase::Set( config ); void wxConfigBase::SetExpandEnvVars( doIt = true ) bool doIt void wxConfigBase::SetPath( path ) wxString path void wxConfigBase::SetRecordDefaults( doIt = true ) bool doIt void wxConfigBase::Write( key, value ) wxString key wxString value CODE: THIS->Write( key, value ); void wxConfigBase::WriteInt( key, value ) wxString key long value CODE: THIS->Write( key, value ); void wxConfigBase::WriteFloat( key, value ) wxString key double value CODE: THIS->Write( key, value ); void wxConfigBase::WriteBool( key, value ) wxString key bool value CODE: THIS->Write( key, value ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) && wxUSE_BASE64 void wxConfigBase::WriteBinary( key, value ) wxString key SV* value CODE: STRLEN len; char* buffer = SvPV( value, len ); wxMemoryBuffer data( len ); data.SetDataLen( len ); memcpy( data.GetData(), buffer, len ); THIS->Write( key, data ); #endif MODULE=Wx PACKAGE=Wx::RegConfig #if defined(__WXMSW__) #include wxConfigBase* wxRegConfig::new( appName = wxEmptyString, vendorName = wxEmptyString, localFilename = wxEmptyString, globalFilename = wxEmptyString, style = 0 ) wxString appName wxString vendorName wxString localFilename wxString globalFilename long style #endif MODULE=Wx PACKAGE=Wx::FileConfig #include wxConfigBase* wxFileConfig::new( appName = wxEmptyString, vendorName = wxEmptyString, localFilename = wxEmptyString, globalFilename = wxEmptyString, style = 0 ) wxString appName wxString vendorName wxString localFilename wxString globalFilename long style void wxFileConfig::SetUmask( mode ) int mode Wx-0.9923/XS/Constraint.xs000664000000000000 517212306612233 13516 0ustar00Mark000000000000############################################################################# ## Name: XS/Constraint.xs ## Purpose: XS for Wx::LayoutConstraints ## Author: Mattia Barbon ## Modified by: ## Created: 31/10/2000 ## RCS-ID: $Id: Constraint.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2001, 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 MODULE=Wx PACKAGE=Wx::IndividualLayoutConstraint void wxIndividualLayoutConstraint::Above( otherWin, margin = 0 ) wxWindow* otherWin int margin void wxIndividualLayoutConstraint::Absolute( value ) int value void wxIndividualLayoutConstraint::AsIs() void wxIndividualLayoutConstraint::Below( otherWin, margin = 0 ) wxWindow* otherWin int margin void wxIndividualLayoutConstraint::Unconstrained() void wxIndividualLayoutConstraint::LeftOf( otherWin, margin = 0 ) wxWindow* otherWin int margin void wxIndividualLayoutConstraint::PercentOf( otherWin, edge, per ) wxWindow* otherWin wxEdge edge int per void wxIndividualLayoutConstraint::RightOf( otherWin, margin = 0 ) wxWindow* otherWin int margin void wxIndividualLayoutConstraint::SameAs( otherWin, edge, margin = 0 ) wxWindow* otherWin wxEdge edge int margin void wxIndividualLayoutConstraint::Set( rel, otherWin, otherEdge, value = 0, margin = 0 ) wxRelationship rel wxWindow* otherWin wxEdge otherEdge int value int margin MODULE=Wx PACKAGE=Wx::LayoutConstraints wxLayoutConstraints* wxLayoutConstraints::new() wxIndividualLayoutConstraint* wxLayoutConstraints::bottom() CODE: RETVAL = &THIS->bottom; OUTPUT: RETVAL wxIndividualLayoutConstraint* wxLayoutConstraints::centreX() CODE: RETVAL = &THIS->centreX; OUTPUT: RETVAL wxIndividualLayoutConstraint* wxLayoutConstraints::centreY() CODE: RETVAL = &THIS->centreY; OUTPUT: RETVAL wxIndividualLayoutConstraint* wxLayoutConstraints::height() CODE: RETVAL = &THIS->height; OUTPUT: RETVAL wxIndividualLayoutConstraint* wxLayoutConstraints::left() CODE: RETVAL = &THIS->left; OUTPUT: RETVAL wxIndividualLayoutConstraint* wxLayoutConstraints::right() CODE: RETVAL = &THIS->right; OUTPUT: RETVAL wxIndividualLayoutConstraint* wxLayoutConstraints::top() CODE: RETVAL = &THIS->top; OUTPUT: RETVAL wxIndividualLayoutConstraint* wxLayoutConstraints::width() CODE: RETVAL = &THIS->width; OUTPUT: RETVAL Wx-0.9923/XS/ControlWithItems.xsp000664000000000000 155212306612233 15026 0ustar00Mark000000000000############################################################################# ## Name: XS/ControlWithItems.xsp ## Purpose: XS for Wx::ControlWithItems ## Author: Mattia Barbon ## Modified by: ## Created: 14/08/2007 ## RCS-ID: $Id: ControlWithItems.xsp 2757 2010-01-17 10:26:27Z mbarbon $ ## Copyright: (c) 2007, 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}; %typemap{wxControlWithItems*}{simple}; %name{Wx::ControlWithItems} class wxControlWithItems { }; INCLUDE_COMMAND: $^X -pe "s/ItemContainerImmutable/ControlWithItems/g" XS/ItemContainerImmutable.xs INCLUDE_COMMAND: $^X -pe "s/ItemContainer/ControlWithItems/g" XS/ItemContainer.xs Wx-0.9923/XS/Cursor.xs000664000000000000 477412306612233 12656 0ustar00Mark000000000000############################################################################# ## Name: XS/Cursor.xs ## Purpose: XS for Wx::Cursor ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Cursor.xs 3070 2011-06-13 02:57:21Z mdootson $ ## Copyright: (c) 2000-2004, 2006-2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::Cursor void wxCursor::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n, newId ) MATCH_REDISP( wxPliOvl_wimg, newImage ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n_n_n, newFile, 2 ) END_OVERLOAD( Wx::Cursor::new ) #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) #if WXPERL_W_VERSION_LT( 2, 9, 0 ) wxCursor* newFile( CLASS, name, type, hsx = -1, hsy = -1 ) SV* CLASS wxString name long type int hsx int hsy CODE: RETVAL = new wxCursor( name, type, hsx, hsy ); OUTPUT: RETVAL #else wxCursor* newFile( CLASS, name, type, hsx = -1, hsy = -1 ) SV* CLASS wxString name wxBitmapType type int hsx int hsy CODE: RETVAL = new wxCursor( name, type, hsx, hsy ); OUTPUT: RETVAL #endif #endif wxCursor* newId( CLASS, id ) SV* CLASS wxStockCursor id CODE: RETVAL = new wxCursor( id ); OUTPUT: RETVAL #if !defined(__WXMAC__) wxCursor* newImage( CLASS, img ) SV* CLASS wxImage* img CODE: RETVAL = new wxCursor( *img ); OUTPUT: RETVAL #endif #if !defined( __WXGTK__ ) && !defined(__WXMAC__) \ && WXPERL_W_VERSION_LT( 2, 9, 0 ) wxCursor* newData( CLASS, bits, width, height, hotSpotX = -1, hotSpotY = -1, maskBits = 0 ) SV* CLASS SV* bits int width int height int hotSpotX int hotSpotY SV* maskBits PREINIT: char* data = SvPV_nolen( bits ); char* mask = maskBits ? SvPV_nolen( maskBits ) : 0; CODE: RETVAL = new wxCursor( data, width, height, hotSpotX, hotSpotY, mask ); OUTPUT: RETVAL #endif static void wxCursor::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxCursor::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Cursor", THIS, ST(0) ); delete THIS; bool wxCursor::Ok() #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool wxCursor::IsOk() #endif Wx-0.9923/XS/DC.xsp000664000000000000 5070112306612233 12056 0ustar00Mark000000000000############################################################################# ## Name: XS/DC.xsp ## Purpose: XS for Wx::DC and derived classes ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: DC.xsp 3044 2011-03-24 16:19:55Z mdootson $ ## Copyright: (c) 2000-2007, 2009-2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %{ #include #include #include #include #include #include #if wxUSE_GRAPHICS_CONTEXT && WXPERL_W_VERSION_GE( 2, 8, 8 ) #include #endif #define wxNullBitmapPtr (wxBitmap*) &wxNullBitmap MODULE=Wx PACKAGE=Wx::DC static void wxDC::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxDC::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; #if ( WXPERL_W_VERSION_LT( 2, 7, 0 ) || WXWIN_COMPATIBILITY_2_6 ) && \ !WXPERL_W_VERSION_GE( 2, 9, 1 ) void wxDC::BeginDrawing() #endif bool wxDC::Blit( xdest, ydest, width, height, source, xsrc, ysrc, logicalFunc = wxCOPY, useMask = false ) wxCoord xdest wxCoord ydest wxCoord width wxCoord height wxDC* source wxCoord xsrc wxCoord ysrc wxRasterOperationMode logicalFunc bool useMask #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool wxDC::StretchBlit( xdest, ydest, wdest, hdest, source, xsrc, ysrc, wsrc, hsrc, logicalFunc = wxCOPY, useMask = false, xsrcmask = -1, ysrcmask = -1 ) wxCoord xdest wxCoord ydest wxCoord wdest wxCoord hdest wxDC* source wxCoord xsrc wxCoord ysrc wxCoord wsrc wxCoord hsrc wxRasterOperationMode logicalFunc bool useMask wxCoord xsrcmask wxCoord ysrcmask #endif void wxDC::CalcBoundingBox( x, y ) wxCoord x wxCoord y void wxDC::Clear() void wxDC::CrossHair( x, y ) wxCoord x wxCoord y void wxDC::DestroyClippingRegion() wxCoord wxDC::DeviceToLogicalX( x ) wxCoord x wxCoord wxDC::DeviceToLogicalXRel( x ) wxCoord x wxCoord wxDC::DeviceToLogicalY( y ) wxCoord y wxCoord wxDC::DeviceToLogicalYRel( y ) wxCoord y void wxDC::DrawArc( x1, y1, x2, y2, xc, yc ) wxCoord x1 wxCoord y1 wxCoord x2 wxCoord y2 wxCoord xc wxCoord yc void wxDC::DrawBitmap( bitmap, x, y, transparent ) wxBitmap* bitmap wxCoord x wxCoord y bool transparent CODE: THIS->DrawBitmap( *bitmap, x, y, transparent ); void wxDC::DrawCheckMark( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n_n_n, DrawCheckMarkXYWH ) MATCH_REDISP( wxPliOvl_wrec, DrawCheckMarkRect ) END_OVERLOAD( Wx::DC::DrawCheckMark ) void wxDC::DrawCheckMarkXYWH( x, y, width, height ) wxCoord x wxCoord y wxCoord width wxCoord height CODE: THIS->DrawCheckMark( x, y, width, height ); void wxDC::DrawCheckMarkRect( rect ) wxRect* rect CODE: THIS->DrawCheckMark( *rect ); void wxDC::DrawCircle( x, y, radius ) wxCoord x wxCoord y wxCoord radius void wxDC::DrawEllipse( x, y, width, height ) wxCoord x wxCoord y wxCoord width wxCoord height void wxDC::DrawEllipticArc( x, y, width, height, start, end ) wxCoord x wxCoord y wxCoord width wxCoord height double start double end void wxDC::DrawIcon( icon, x, y ) wxIcon* icon wxCoord x wxCoord y CODE: THIS->DrawIcon( *icon, x, y ); void wxDC::DrawLine( x1, y1, x2, y2 ) wxCoord x1 wxCoord y1 wxCoord x2 wxCoord y2 void wxDC::DrawLines( list, xoffset = 0, yoffset = 0 ) SV* list wxCoord xoffset wxCoord yoffset PREINIT: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxPointList points; #else wxList points; #endif wxPliArrayGuard pts; CODE: wxPli_av_2_pointlist( aTHX_ list, &points, pts.lvalue() ); THIS->DrawLines( &points, xoffset, yoffset ); void wxDC::DrawPoint( x, y ) wxCoord x wxCoord y void wxDC::DrawPolygon( list, xoffset, yoffset, fill_style = wxODDEVEN_RULE ) SV* list wxCoord xoffset wxCoord yoffset wxPolygonFillMode fill_style PREINIT: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxPointList points; #else wxList points; #endif wxPliArrayGuard pts; CODE: wxPli_av_2_pointlist( aTHX_ list, &points, pts.lvalue() ); THIS->DrawPolygon( &points, xoffset, yoffset, fill_style ); void wxDC::DrawRectangle( x, y, width, height ) wxCoord x wxCoord y wxCoord width wxCoord height void wxDC::DrawRotatedText( text, x, y, angle ) wxString text wxCoord x wxCoord y double angle void wxDC::DrawRoundedRectangle( x, y, width, height, radius = 20 ) wxCoord x wxCoord y wxCoord width wxCoord height wxCoord radius void wxDC::DrawSpline( list ) SV* list PREINIT: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxPointList points; #else wxList points; #endif wxPliArrayGuard pts; CODE: wxPli_av_2_pointlist( aTHX_ list, &points, pts.lvalue() ); THIS->DrawSpline( &points ); void wxDC::DrawText( text, x, y ) wxString text wxCoord x wxCoord y void wxDC::EndDoc() #if ( WXPERL_W_VERSION_LT( 2, 7, 0 ) || WXWIN_COMPATIBILITY_2_6 ) && \ !WXPERL_W_VERSION_GE( 2, 9, 1 ) void wxDC::EndDrawing() #endif void wxDC::EndPage() void wxDC::FloodFill( x, y, colour, style = wxFLOOD_SURFACE ) wxCoord x wxCoord y wxColour* colour wxFloodFillStyle style CODE: THIS->FloodFill( x, y, *colour, style ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxBitmap* wxDC::GetAsBitmap( wxRect* subrect = NULL ) CODE: RETVAL = new wxBitmap( THIS->GetAsBitmap( subrect ) ); OUTPUT: RETVAL #endif wxBrush* wxDC::GetBackground() CODE: RETVAL = new wxBrush( THIS->GetBackground() ); OUTPUT: RETVAL int wxDC::GetBackgroundMode() wxBrush* wxDC::GetBrush() CODE: RETVAL = new wxBrush( THIS->GetBrush() ); OUTPUT: RETVAL wxCoord wxDC::GetCharHeight() wxCoord wxDC::GetCharWidth() void wxDC::GetClippingBox() PREINIT: wxCoord x, y, width, height; PPCODE: THIS->GetClippingBox( &x, &y, &width, &height ); EXTEND( SP, 4 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); PUSHs( sv_2mortal( newSViv( width ) ) ); PUSHs( sv_2mortal( newSViv( height ) ) ); wxFont* wxDC::GetFont() CODE: RETVAL = new wxFont( THIS->GetFont() ); OUTPUT: RETVAL wxRasterOperationMode wxDC::GetLogicalFunction() wxMappingMode wxDC::GetMapMode() #if !defined( __WXMAC__ ) && WXPERL_W_VERSION_LE( 2, 5, 3 ) bool wxDC::GetOptimization() #endif wxPen* wxDC::GetPen() CODE: RETVAL = new wxPen( THIS->GetPen() ); OUTPUT: RETVAL wxColour* wxDC::GetPixel( x, y ) wxCoord x wxCoord y PREINIT: wxColour c; CODE: THIS->GetPixel( x, y, &c ); RETVAL = new wxColour( c ); OUTPUT: RETVAL wxSize* wxDC::GetSize() CODE: RETVAL = new wxSize( THIS->GetSize() ); OUTPUT: RETVAL void wxDC::GetSizeWH() PREINIT: wxCoord x, y; PPCODE: THIS->GetSize( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); wxSize* wxDC::GetSizeMM() CODE: RETVAL = new wxSize( THIS->GetSizeMM() ); OUTPUT: RETVAL void wxDC::GetSizeMMWH() PREINIT: wxCoord x, y; PPCODE: THIS->GetSizeMM( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); wxSize* wxDC::GetPPI() CODE: RETVAL = new wxSize( THIS->GetPPI() ); OUTPUT: RETVAL wxColour* wxDC::GetTextBackground() CODE: RETVAL = new wxColour( THIS->GetTextBackground() ); OUTPUT: RETVAL void wxDC::GetTextExtent( string, font = NULL ) wxString string wxFont* font PREINIT: wxCoord x, y, descent, externalLeading; PPCODE: THIS->GetTextExtent( string, &x, &y, &descent, &externalLeading, font ); EXTEND( SP, 4 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); PUSHs( sv_2mortal( newSViv( descent ) ) ); PUSHs( sv_2mortal( newSViv( externalLeading ) ) ); void wxDC::GetPartialTextExtents( string ) wxString string PREINIT: wxArrayInt widths; PPCODE: bool ok = THIS->GetPartialTextExtents( string, widths ); if( ok ) { PUTBACK; wxPli_intarray_push( aTHX_ widths ); SPAGAIN; } else XSRETURN_EMPTY; void wxDC::GetMultiLineTextExtent( string, font = NULL ) wxString string wxFont* font PREINIT: wxCoord w, h, hLine; PPCODE: THIS->GetMultiLineTextExtent( string, &w, &h, &hLine, font ); EXTEND( SP, 3 ); PUSHs( sv_2mortal( newSViv( w ) ) ); PUSHs( sv_2mortal( newSViv( h ) ) ); PUSHs( sv_2mortal( newSViv( hLine ) ) ); wxColour* wxDC::GetTextForeground() CODE: RETVAL = new wxColour( THIS->GetTextForeground() ); OUTPUT: RETVAL void wxDC::GetUserScale() PREINIT: double x, y; PPCODE: THIS->GetUserScale( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSVnv( x ) ) ); PUSHs( sv_2mortal( newSVnv( y ) ) ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void wxDC::GradientFillLinear( rect, initialColour, destColour, direction = wxEAST ) wxRect* rect wxColour initialColour wxColour destColour wxDirection direction C_ARGS: *rect, initialColour, destColour, direction #endif wxCoord wxDC::LogicalToDeviceX( x ) wxCoord x wxCoord wxDC::LogicalToDeviceXRel( x ) wxCoord x wxCoord wxDC::LogicalToDeviceY( y ) wxCoord y wxCoord wxDC::LogicalToDeviceYRel( y ) wxCoord y wxCoord wxDC::MaxX() wxCoord wxDC::MaxY() wxCoord wxDC::MinX() wxCoord wxDC::MinY() #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool wxDC::IsOk() bool wxDC::Ok() CODE: RETVAL = THIS->IsOk(); OUTPUT: RETVAL #else bool wxDC::Ok() #endif void wxDC::ResetBoundingBox() void wxDC::SetAxisOrientation( xLeftRight, yBottomUp ) bool xLeftRight bool yBottomUp int wxDC::GetDepth() wxPoint* wxDC::GetDeviceOrigin() CODE: RETVAL = new wxPoint( THIS->GetDeviceOrigin() ); OUTPUT: RETVAL void wxDC::SetDeviceOrigin( x, y ) wxCoord x wxCoord y void wxDC::SetBackground( brush ) wxBrush* brush CODE: THIS->SetBackground( *brush ); void wxDC::SetBackgroundMode( mode ) int mode void wxDC::SetBrush( brush ) wxBrush* brush CODE: THIS->SetBrush( *brush ); void wxDC::SetClippingRegion( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n_n_n, SetClippingRegionXYWH ) MATCH_REDISP( wxPliOvl_wreg, SetClippingRegionRegion ) END_OVERLOAD( Wx::DC::SetClippingRegion ) void wxDC::SetClippingRegionXYWH( x, y, w, h ) wxCoord x wxCoord y wxCoord w wxCoord h CODE: THIS->SetClippingRegion( x, y, w, h ); void wxDC::SetClippingRegionRegion( region ) wxRegion* region CODE: THIS->SetClippingRegion( *region ); void wxDC::SetFont( font ) wxFont* font CODE: THIS->SetFont( *font ); void wxDC::SetLogicalFunction( function ) wxRasterOperationMode function void wxDC::SetMapMode( mode ) wxMappingMode mode #if !defined( __WXMAC__ ) && WXPERL_W_VERSION_LE( 2, 5, 3 ) void wxDC::SetOptimization( optimize ) bool optimize #endif void wxDC::SetPalette( palette ) wxPalette* palette CODE: THIS->SetPalette( *palette ); void wxDC::SetPen( pen ) wxPen* pen CODE: THIS->SetPen( *pen ); void wxDC::SetTextBackground( colour ) wxColour* colour CODE: THIS->SetTextBackground( *colour ); void wxDC::SetTextForeground( colour ) wxColour* colour CODE: THIS->SetTextForeground( *colour ); void wxDC::SetUserScale( xScale, yScale ) double xScale double yScale bool wxDC::StartDoc( message ) wxString message void wxDC::StartPage() void wxDC::GetLogicalScale() PREINIT: double x, y; PPCODE: THIS->GetLogicalScale( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSVnv( x ) ) ); PUSHs( sv_2mortal( newSVnv( y ) ) ); void wxDC::SetLogicalScale( double x, double y ); #if WXPERL_W_VERSION_GE( 2, 7, 1 ) wxLayoutDirection wxDC::GetLayoutDirection() void wxDC::SetLayoutDirection( wxLayoutDirection dir ) #endif #if WXPERL_W_VERSION_GE( 2, 8, 0 ) void wxDC::GradientFillConcentric( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wrec_wcol_wcol_wpoi, GradientFillConcentricPoint ) MATCH_REDISP( wxPliOvl_wrec_wcol_wcol, GradientFillConcentricNoPoint ) END_OVERLOAD( Wx::DC::GradientFillConcentric ) void wxDC::GradientFillConcentricPoint(rect, initialColour, destColour, circleCentre) wxRect* rect wxColour initialColour wxColour destColour wxPoint circleCentre CODE: THIS->GradientFillConcentric( *rect, initialColour, destColour, circleCentre ); void wxDC::GradientFillConcentricNoPoint(rect, initialColour, destColour) wxRect* rect wxColour initialColour wxColour destColour CODE: THIS->GradientFillConcentric( *rect, initialColour, destColour ); void wxDC::DrawLabel( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_wbmp_wrec_n_n_wrec, DrawLabelBitmap, 3 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_wrec_n_n, DrawLabelNoBitmap, 2 ) END_OVERLOAD( Wx::DC::DrawLabel ) wxRect* wxDC::DrawLabelBitmap(text, image, rect, alignment = wxALIGN_LEFT | wxALIGN_TOP, indexAccel = -1 ); wxString text wxBitmap* image wxRect* rect int alignment int indexAccel CODE: wxRect* newrect = new wxRect(1,1,1,1); THIS->DrawLabel( text, *image, *rect, alignment, indexAccel, newrect ); RETVAL = newrect; OUTPUT: RETVAL void wxDC::DrawLabelNoBitmap(text, rect, alignment = wxALIGN_LEFT | wxALIGN_TOP, indexAccel = -1) wxString text wxRect* rect int alignment int indexAccel CODE: THIS->DrawLabel( text, *rect, alignment, indexAccel ); #endif #if wxUSE_GRAPHICS_CONTEXT && WXPERL_W_VERSION_GE( 2, 8, 8 ) && WXPERL_W_VERSION_LT( 2, 9, 0 ) && defined( __WXMAC__ ) wxGraphicsContext* wxDC::GetGraphicsContext() CODE: RETVAL = THIS->GetGraphicsContext(); OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); #endif #if wxUSE_GRAPHICS_CONTEXT && WXPERL_W_VERSION_GE( 2, 8, 8 ) # DECLARE_OVERLOAD( wmdc, Wx::MemoryDC ) # DECLARE_OVERLOAD( wwdc, Wx::WindowDC ) MODULE=Wx PACKAGE=Wx::GCDC void wxGCDC::new( ... ) PPCODE: BEGIN_OVERLOAD() #if defined( __WXMSW__ ) MATCH_REDISP( wxPliOvl_wmdc, newMemoryDC ) #endif MATCH_REDISP( wxPliOvl_wwdc, newWindowDC ) END_OVERLOAD( "Wx::GCDC::new" ) #if defined( __WXMSW__ ) wxGCDC* newMemoryDC( CLASS, dc ) SV* CLASS wxMemoryDC* dc CODE: RETVAL = new wxGCDC( *dc ); OUTPUT: RETVAL #endif wxGCDC* newWindowDC( CLASS, dc ) SV* CLASS wxWindowDC* dc CODE: RETVAL = new wxGCDC( *dc ); OUTPUT: RETVAL #if !defined( __WXMAC__ ) || WXPERL_W_VERSION_GE( 2, 9, 0 ) wxGraphicsContext* wxGCDC::GetGraphicsContext() CODE: RETVAL = THIS->GetGraphicsContext(); OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); void wxGCDC::SetGraphicsContext( ctx ) wxGraphicsContext* ctx CODE: wxPli_object_set_deleteable( aTHX_ ST(1), false ); THIS->SetGraphicsContext( ctx ); #endif #endif MODULE=Wx PACKAGE=Wx::ScreenDC wxScreenDC* wxScreenDC::new() bool wxScreenDC::EndDrawingOnTop() void wxScreenDC::StartDrawingOnTop( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wwin, StartDrawingOnTopWindow ) MATCH_REDISP( wxPliOvl_wrec, StartDrawingOnTopRect ) END_OVERLOAD( Wx::ScreenDC::StartDrawingOnTop ) bool wxScreenDC::StartDrawingOnTopWindow( window ) wxWindow* window CODE: RETVAL = THIS->StartDrawingOnTop( window ); OUTPUT: RETVAL bool wxScreenDC::StartDrawingOnTopRect( rect ) wxRect* rect CODE: RETVAL = THIS->StartDrawingOnTop( rect ); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::WindowDC wxWindowDC* wxWindowDC::new( window ) wxWindow* window MODULE=Wx PACKAGE=Wx::PaintDC wxPaintDC* wxPaintDC::new( window ) wxWindow* window MODULE=Wx PACKAGE=Wx::MemoryDC wxMemoryDC* wxMemoryDC::new() void wxMemoryDC::SelectObject( bitmap ) wxBitmap* bitmap C_ARGS: *bitmap #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void wxMemoryDC::SelectObjectAsSource( bitmap ) wxBitmap* bitmap C_ARGS: *bitmap #endif MODULE=Wx PACKAGE=Wx::ClientDC wxClientDC* wxClientDC::new( window ) wxWindow* window %} %module{Wx}; %typemap{wxBufferedDC*}{simple}; %typemap{wxBufferedPaintDC*}{simple}; %typemap{wxAutoBufferedPaintDC*}{simple}; %typemap{wxMirrorDC*}{simple}; %typemap{wxDCClipper*}{simple}; %name{Wx::BufferedDC} class wxBufferedDC { %name{newDefault} wxBufferedDC(); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) %name{newBitmap} wxBufferedDC( wxDC *dc, const wxBitmap &buffer = wxNullBitmapPtr, int style = wxBUFFER_CLIENT_AREA ); %name{newSize} wxBufferedDC( wxDC *dc, const wxSize &area, int style = wxBUFFER_CLIENT_AREA ); %name{InitBitmap} void Init( wxDC *dc, const wxBitmap &buffer = wxNullBitmapPtr, int style = wxBUFFER_CLIENT_AREA ); %name{InitSize} void Init( wxDC *dc, const wxSize &area, int style = wxBUFFER_CLIENT_AREA ); #else %name{newBitmap} wxBufferedDC( wxDC *dc, const wxBitmap &buffer = wxNullBitmapPtr ); %name{newSize} wxBufferedDC( wxDC *dc, const wxSize &area ); %name{InitBitmap} void Init( wxDC *dc, const wxBitmap &buffer = wxNullBitmapPtr ); %name{InitSize} void Init( wxDC *dc, const wxSize &area ); #endif %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wdc_wsiz_n, newSize, 2 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wdc_wbmp_n, newBitmap, 1 ) END_OVERLOAD( "Wx::BufferedDC::new" ) void Init( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wdc_wsiz_n, InitSize, 2 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wdc_wbmp_n, InitBitmap, 1 ) END_OVERLOAD( "Wx::BufferedDC::Init" ) %} void UnMask(); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) void SetStyle( int style ); int GetStyle(); #endif }; %name{Wx::BufferedPaintDC} class wxBufferedPaintDC { #if WXPERL_W_VERSION_GE( 2, 5, 5 ) %name{newBitmap} wxBufferedPaintDC( wxWindow* window, const wxBitmap& buffer, int style = wxBUFFER_CLIENT_AREA ); %name{newWindow} wxBufferedPaintDC( wxWindow* window, int style = wxBUFFER_CLIENT_AREA ); #else %name{newBitmap} wxBufferedPaintDC( wxWindow* window, const wxBitmap& buffer ); %name{newWindow} wxBufferedPaintDC( wxWindow* window ); #endif %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wdc_wbmp_n, newBitmap, 2 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wdc_n, newBitmap, 1 ) END_OVERLOAD( "Wx::BufferedPaintDC::new" ) %} }; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) %name{Wx::AutoBufferedPaintDC} class wxAutoBufferedPaintDC { wxAutoBufferedPaintDC( wxWindow* win ); }; %{ MODULE=Wx PACKAGE=Wx PREFIX=wx %} wxDC* wxAutoBufferedPaintDCFactory( wxWindow* window ); #include %name{Wx::MirrorDC} class wxMirrorDC { wxMirrorDCC( wxDC& dc, bool mirror ); }; %name{Wx::DCClipper} class wxDCClipper { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wdc_wreg, newRegion ) MATCH_REDISP( wxPliOvl_wdc_wrec, newRect ) MATCH_REDISP( wxPliOvl_wdc_n_n_n_n, newXYWH ) END_OVERLOAD( Wx::DCClipper::new ) %} %name{newRegion} wxDCClipper( wxDC& dc, const wxRegion& region ); %name{newRect} wxDCClipper( wxDC& dc, const wxRect& rect ); %name{newXYWH} wxDCClipper( wxDC& dc, int x, int y, int w, int h ); %{ static void wxDCClipper::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxDCClipper() %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::DCClipper", THIS, ST(0) ); delete THIS; %}; }; #endif Wx-0.9923/XS/Dialog.xsp000664000000000000 1014412306612233 12764 0ustar00Mark000000000000############################################################################# ## Name: XS/Dialog.xsp ## Purpose: XS for Wx::Dialog ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Dialog.xsp 2938 2010-07-04 12:56:48Z mbarbon $ ## Copyright: (c) 2000-2001, 2003-2004, 2006-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 #include #include #include "cpp/dialog.h" #include "cpp/overload.h" %typemap{wxDialogLayoutAdaptationMode}{simple}; %name{Wx::Dialog} class wxDialog { #if WXPERL_W_VERSION_GE( 2, 6, 3 ) void SetAffirmativeId( int affirmativeId ); int GetAffirmativeId(); int GetEscapeId() const; #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) void SetEscapeId( int escapeId ); #endif wxSizer* CreateTextSizer( const wxString &message ); wxSizer* CreateButtonSizer( long flags ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxSizer* CreateSeparatedButtonSizer( long flags ); #endif #if WXPERL_W_VERSION_GE( 2, 6, 0 ) wxSizer* CreateStdDialogButtonSizer( long flags ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void AddMainButtonId( wxWindowID id ); bool IsMainButtonId( wxWindowID id ) const; %{ void wxDialog::GetMainButtonIds() PPCODE: PUTBACK; wxPli_intarray_push( aTHX_ THIS->GetMainButtonIds() ); SPAGAIN; %} bool CanDoLayoutAdaptation(); package_static bool IsLayoutAdaptationEnabled(); package_static void EnableLayoutAdaptation( bool enable ); wxWindow* GetContentWindow(); void SetLayoutAdaptationLevel( int level ); int GetLayoutAdaptationLevel() const; void SetLayoutAdaptationMode( wxDialogLayoutAdaptationMode mode ); wxDialogLayoutAdaptationMode GetLayoutAdaptationMode() const; void SetLayoutAdaptationDone( bool adaptationDone ); bool GetLayoutAdaptationDone() const; #if defined(__WXMSW__) && defined(__POCKETPC__) wxToolBar* GetToolBar() const; #endif #endif }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Dialog::new" ) wxDialog* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxPliDialog( CLASS ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxDialog* newFull( CLASS, parent, id = wxID_ANY, title = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_DIALOG_STYLE, name = wxDialogNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxString title wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxPliDialog( CLASS, parent, id, title, pos, size, style, name ); OUTPUT: RETVAL bool wxDialog::Create( parent, id = wxID_ANY, title = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_DIALOG_STYLE, name = wxDialogNameStr ) wxWindow* parent wxWindowID id wxString title wxPoint pos wxSize size long style wxString name void wxDialog::EndModal( retCode ) int retCode int wxDialog::GetReturnCode() wxString wxDialog::GetTitle() bool wxDialog::IsModal() # void # wxDialog::SetModal( flag ) # bool flag void wxDialog::SetIcon( icon ) wxIcon* icon C_ARGS: *icon void wxDialog::SetIcons( icons ) wxIconBundle* icons C_ARGS: *icons void wxDialog::SetReturnCode( retCode ) int retCode void wxDialog::SetTitle( title ) wxString title int wxDialog::ShowModal() #if WXPERL_W_VERSION_GE( 2, 5, 4 ) void wxDialog::SetFocusIgnoringChildren() #endif bool wxDialog::TransferDataFromWindow() CODE: RETVAL = THIS->wxDialog::TransferDataFromWindow(); OUTPUT: RETVAL bool wxDialog::TransferDataToWindow() CODE: RETVAL = THIS->wxDialog::TransferDataToWindow(); OUTPUT: RETVAL bool wxDialog::Validate() CODE: RETVAL = THIS->wxDialog::Validate(); OUTPUT: RETVAL %} Wx-0.9923/XS/DirCtrl.xsp000664000000000000 644212306612233 13116 0ustar00Mark000000000000############################################################################# ## Name: XS/DirCtrl.xsp ## Purpose: XS+++ for Wx::[Generic]DirCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 07/10/2007 ## RCS-ID: $Id: DirCtrl.xsp 2241 2007-10-07 19:57:31Z mbarbon $ ## Copyright: (c) 2007 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}; %typemap{wxGenericDirCtrl*}{simple}; %typemap{const wxTreeItemId&}{reference}; %typemap{wxDirFilterListCtrl*}{simple}; #include #define wxPLI_DEFAULT_DIRCTRL_STYLE wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER %name{Wx::GenericDirCtrl} class wxGenericDirCtrl { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::GenericDirCtrl::new" ) %} %name{newDefault} wxGenericDirCtrl() %code{% RETVAL = new wxGenericDirCtrl(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxGenericDirCtrl( wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPLI_DEFAULT_DIRCTRL_STYLE, const wxString& filter = wxEmptyString, int defaultFilter = 0, const wxString& name = wxTreeCtrlNameStr ) %code{% RETVAL = new wxGenericDirCtrl( parent, id, dir, pos, size, style, filter, defaultFilter, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPLI_DEFAULT_DIRCTRL_STYLE, const wxString& filter = wxEmptyString, int defaultFilter = 0, const wxString& name = wxTreeCtrlNameStr ); bool ExpandPath( const wxString& path ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool CollapsePath( const wxString& path ); #endif wxString GetDefaultPath() const; void SetDefaultPath( const wxString& path ); wxString GetPath() const; wxString GetFilePath() const; void SetPath( const wxString& path ); void ShowHidden( bool show ); bool GetShowHidden(); wxString GetFilter() const; void SetFilter( const wxString& filter ); int GetFilterIndex() const; void SetFilterIndex( int n ); const wxTreeItemId& GetRootId(); wxTreeCtrl* GetTreeCtrl() const; wxDirFilterListCtrl* GetFilterListCtrl() const; void ReCreateTree(); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) void CollapseTree(); #endif }; Wx-0.9923/XS/DirDialog.xs000664000000000000 272512306612233 13231 0ustar00Mark000000000000############################################################################# ## Name: XS/DirDialog.xs ## Purpose: XS for Wx::DirDialog ## Author: Mattia Barbon ## Modified by: ## Created: 27/11/2000 ## RCS-ID: $Id: DirDialog.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2001, 2003-2004, 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 MODULE=Wx PACKAGE=Wx::DirDialog wxDirDialog* wxDirDialog::new( parent, message = wxFileSelectorPromptStr, defaultPath = wxEmptyString, style = 0, pos = wxDefaultPosition ) wxWindow* parent wxString message wxString defaultPath long style wxPoint pos wxString wxDirDialog::GetPath() wxString wxDirDialog::GetMessage() #if WXPERL_W_VERSION_LT( 2, 7, 0 ) long wxDirDialog::GetStyle() #endif void wxDirDialog::SetMessage( message ) wxString message void wxDirDialog::SetPath( path ) wxString path #if WXPERL_W_VERSION_LT( 2, 7, 0 ) void wxDirDialog::SetStyle( style ) long style #endif int wxDirDialog::ShowModal() MODULE=Wx PACKAGE=Wx PREFIX=wx wxString wxDirSelector( message, default_path = wxEmptyString, style = 0, pos = wxDefaultPosition, parent = 0 ) wxString message wxString default_path long style wxPoint pos wxWindow* parent Wx-0.9923/XS/Display.xsp000664000000000000 557012306612233 13161 0ustar00Mark000000000000############################################################################# ## Name: XS/Display.xsp ## Purpose: XS++ for Wx::Display ## Author: Mattia Barbon ## Modified by: ## Created: 26/09/2007 ## RCS-ID: $Id: Display.xsp 2557 2009-05-11 10:41:11Z mbarbon $ ## Copyright: (c) 2007, 2009 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 #include #define wxDefaultVideoModePtr (wxVideoMode*)&wxDefaultVideoMode %typemap{wxDisplay*}{simple}; %typemap{wxVideoMode*}{simple}; %typemap{const wxVideoMode&}{reference}; %name{Wx::VideoMode} class wxVideoMode { wxVideoMode( int width = 0, int height = 0, int depth = 0, int freq = 0 ); %{ static void wxVideoMode::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxVideoMode() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::VideoMode", THIS, ST(0) ); delete THIS; %}; bool Matches( const wxVideoMode& other ) const; int GetWidth() const; int GetHeight() const; int GetDepth() const; bool IsOk() const; }; %name{Wx::Display} class wxDisplay { wxDisplay( unsigned n = 0 ); %{ static void wxDisplay::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxDisplay() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::Display", THIS, ST(0) ); delete THIS; %}; %{ int GetCount() CODE: RETVAL = wxDisplay::GetCount(); OUTPUT: RETVAL int GetFromPoint( point ) wxPoint point CODE: RETVAL = wxDisplay::GetFromPoint( point ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 7, 0 ) int GetFromWindow( window ) wxWindow* window CODE: RETVAL = wxDisplay::GetFromWindow( window ); OUTPUT: RETVAL #endif %} bool IsOk() const; const wxRect& GetGeometry() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) const wxRect& GetClientArea() const; #endif wxString GetName() const; bool IsPrimary() const; #if wxUSE_DISPLAY %{ void wxDisplay::GetModes( videoMode = wxDefaultVideoModePtr ) wxVideoMode* videoMode PPCODE: wxArrayVideoModes modes = THIS->GetModes( *videoMode ); size_t mx = modes.GetCount(); EXTEND( SP, int(mx) ); for( size_t i = 0; i < mx; ++i ) { wxVideoMode* mode = new wxVideoMode( modes[i] ); PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), mode, "Wx::VideoMode" ) ); } %} const wxVideoMode& GetCurrentMode() const; bool ChangeMode( const wxVideoMode& mode = wxDefaultVideoModePtr ); void ResetMode(); #endif // wxUSE_DISPLAY }; Wx-0.9923/XS/EditableListBox.xsp000664000000000000 506212306612233 14566 0ustar00Mark000000000000############################################################################# ## Name: XS/EditableListBox.xsp ## Purpose: XS++ for Wx::EditableListBox ## Author: Mattia Barbon ## Modified by: ## Created: 12/08/2007 ## RCS-ID: $Id: EditableListBox.xsp 2139 2007-08-12 13:33:17Z mbarbon $ ## Copyright: (c) 2007 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}; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) #include %typemap{wxEditableListBox*}{simple}; %typemap{wxListCtrl*}{simple}; %typemap{wxBitmapButton*}{simple}; %name{Wx::EditableListBox} class wxEditableListBox { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::EditableListBox::new" ) %} %name{newDefault} wxEditableListBox() %code{% RETVAL = new wxEditableListBox(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxEditableListBox( wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxEL_DEFAULT_STYLE, const wxString& name = wxEditableListBoxNameStr ) %code{% RETVAL = new wxEditableListBox( parent, id, label, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxEL_DEFAULT_STYLE, const wxString& name = wxEditableListBoxNameStr ); void SetStrings( const wxArrayString& strings ); %{ void wxEditableListBox::GetStrings() PPCODE: wxArrayString strings; THIS->GetStrings( strings ); PUTBACK; wxPli_stringarray_push( aTHX_ strings ); SPAGAIN; %} wxListCtrl* GetListCtrl(); wxBitmapButton* GetDelButton(); wxBitmapButton* GetNewButton(); wxBitmapButton* GetUpButton(); wxBitmapButton* GetDownButton(); wxBitmapButton* GetEditButton(); }; #endif Wx-0.9923/XS/EventFilter.xsp000664000000000000 1002312306612233 14010 0ustar00Mark000000000000############################################################################# ## Name: XS/EventFilter.xsp ## Purpose: XS++ for wxEventFilter class ## Author: Mark Dootson ## Modified by: ## Created: 2012-09-26 ## RCS-ID: $Id:$ ## Copyright: (c) 2012 Mark Dootson ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %module{Wx}; %file{xspp/eventfilter.h}; %{ class wxPlEventFilter : public wxEventFilter { WXPLI_DECLARE_V_CBACK(); public: wxPlEventFilter( const char* package ) : wxEventFilter(), m_callback( "Wx::EventFilter" ) { dTHX; m_callback.SetSelf( wxPli_non_object_2_sv(aTHX_ sv_newmortal(), this, package ), true ); } virtual int FilterEvent(wxEvent& event) { dTHX; if( wxPliFCback( aTHX_ &m_callback, "FilterEvent" ) ) { // code from e_cback.h dSP; ENTER; SAVETMPS; int retval; { wxPliGuard guard; SV* e = 0; SV* rv = 0; wxClassInfo *ci = event.GetClassInfo(); const wxChar* classname = ci->GetClassName(); if( wcsncmp( classname, wxT("wxPl"), 4 ) == 0 ) { wxPliClassInfo* cci = (wxPliClassInfo*)ci; wxPliSelfRef* sr = cci->m_func( &event ); if( sr ) { // this needs to have the refcount incremented, otherwise // the refcount will be decremented one time too much when // exiting from the handler e = sv_2mortal( newRV_inc( SvRV( sr->m_self ) ) ); } } if( !e ) { char buffer[WXPL_BUF_SIZE]; const char* CLASS = wxPli_cpp_class_2_perl( classname, buffer ); e = sv_newmortal(); sv_setref_pv( e, CHAR_P CLASS, &event ); rv = SvRV( e ); // corner case: prevent destruction if referrer is // destroyed SvREFCNT_inc( rv ); sv_2mortal( rv ); guard.SetSV( rv ); wxPli_thread_sv_register( aTHX_ CLASS, &event, e ); } PUSHMARK( SP ); XPUSHs( m_callback.GetSelf() ); XPUSHs( e ); PUTBACK; SV* method = sv_2mortal( newRV_inc( (SV*) m_callback.GetMethod() ) ); call_sv( method, G_SCALAR ); SPAGAIN; retval = POPi; } PUTBACK; FREETMPS; LEAVE; return retval; } else return -1; // constant Event_Skip } }; %} %file{-}; #if WXPERL_W_VERSION_GE( 2, 9, 3 ) #include #include "cpp/e_cback.h" #include "xspp/eventfilter.h" %typemap{wxPlEventFilter*}{simple}; %typemap{wxEventFilter*}{simple}; %typemap{wxEvent*}{simple}; %name{Wx::EventFilter} class wxEventFilter { %{ static void wxEventFilter::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: %name{Destroy} virtual ~wxEventFilter() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::EventFilter", THIS, ST(0) ); delete THIS; %}; virtual int FilterEvent(wxEvent* event) %code%{ RETVAL = -1; %}; }; %name{Wx::PlEventFilter} class wxPlEventFilter : public %name{Wx::EventFilter} wxEventFilter { public: wxPlEventFilter() %code{% RETVAL = new wxPlEventFilter( CLASS ); %}; }; #endif Wx-0.9923/XS/EvtHandler.xs000664000000000000 516712306612233 13432 0ustar00Mark000000000000############################################################################# ## Name: XS/EvtHandler.xs ## Purpose: XS for Wx::EvtHandler ## Author: Mattia Barbon ## Modified by: ## Created: 26/11/2000 ## RCS-ID: $Id: EvtHandler.xs 3379 2012-09-26 22:35:22Z mdootson $ ## Copyright: (c) 2000-2003, 2005, 2008 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 PACKAGE=Wx::EvtHandler wxEvtHandler* wxEvtHandler::new() CODE: RETVAL = new wxEvtHandler(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 9, 3 ) void AddFilter( filter ) wxEventFilter* filter CODE: wxEvtHandler::AddFilter( filter ); void RemoveFilter( filter ) wxEventFilter* filter CODE: wxEvtHandler::RemoveFilter( filter ); #endif // end if WXPERL_W_VERSION_GE( 2, 9, 3 ) void wxEvtHandler::AddPendingEvent( event ) wxEvent* event CODE: THIS->AddPendingEvent( *event ); void wxEvtHandler::Connect( id, lastid, type, method ) wxWindowID id int lastid wxEventType type SV* method CODE: if( SvOK( method ) ) { THIS->Connect( id, lastid, type, wxPliCastEvtHandler( &wxPliEventCallback::Handler ), new wxPliEventCallback( method, ST(0) ) ); } else { THIS->Disconnect( id, lastid, type, wxPliCastEvtHandler( &wxPliEventCallback::Handler ), 0 ); } void wxEvtHandler::Destroy() CODE: delete THIS; bool wxEvtHandler::Disconnect( id, lastid, type ) wxWindowID id int lastid wxEventType type CODE: RETVAL = THIS->Disconnect( id, lastid, type, wxPliCastEvtHandler( &wxPliEventCallback::Handler ) ); OUTPUT: RETVAL bool wxEvtHandler::GetEvtHandlerEnabled() wxEvtHandler* wxEvtHandler::GetNextHandler() wxEvtHandler* wxEvtHandler::GetPreviousHandler() bool wxEvtHandler::ProcessEvent( event ) wxEvent* event C_ARGS: *event #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool wxEvtHandler::SafelyProcessEvent( event ); wxEvent* event C_ARGS: *event #endif void wxEvtHandler::SetEvtHandlerEnabled( enabled ) bool enabled void wxEvtHandler::SetNextHandler( handler ) wxEvtHandler* handler void wxEvtHandler::SetPreviousHandler( handler ) wxEvtHandler* handler #if WXPERL_W_VERSION_GE( 2, 9, 1 ) bool wxEvtHandler::ProcessEventLocally( event ) wxEvent* event C_ARGS: *event #endif Wx-0.9923/XS/FileCtrl.xsp000664000000000000 712012306612233 13251 0ustar00Mark000000000000############################################################################# ## Name: XS/FileCtrl.xsp ## Purpose: XS+++ for Wx::FileCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 07/10/2007 ## RCS-ID: $Id: FileCtrl.xsp 2240 2007-10-07 19:18:51Z mbarbon $ ## Copyright: (c) 2007 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}; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) %typemap{wxFileCtrl*}{simple}; %typemap{wxFileCtrlEvent*}{simple}; #include %name{Wx::FileCtrl} class wxFileCtrl { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::FileCtrl::new" ) %} %name{newDefault} wxFileCtrl() %code{% RETVAL = new wxFileCtrl(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxFileCtrl( wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& defaultDirectory = wxEmptyString, const wxString& defaultFilename = wxEmptyString, const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFC_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxString& name = wxFileCtrlNameStr ) %code{% RETVAL = new wxFileCtrl( parent, id, defaultDirectory, defaultFilename, wildCard, style, pos, size, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& defaultDirectory = wxEmptyString, const wxString& defaultFilename = wxEmptyString, const wxString& wildCard = wxFileSelectorDefaultWildcardStr, long style = wxFC_DEFAULT_STYLE, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxString& name = wxFileCtrlNameStr ); void SetWildcard( const wxString& wildCard ); void SetFilterIndex( int filterindex ); bool SetDirectory( const wxString& dir ); bool SetFilename( const wxString& name ); bool SetPath( const wxString& path ); wxString GetFilename() const; wxString GetDirectory() const; wxString GetWildcard() const; wxString GetPath() const; %{ void wxFileCtrl::GetPaths() PPCODE: PUTBACK; wxArrayString ret; THIS->GetPaths( ret ); wxPli_stringarray_push( aTHX_ ret ); SPAGAIN; void wxFileCtrl::GetFilenames() PPCODE: PUTBACK; wxArrayString ret; THIS->GetFilenames( ret ); wxPli_stringarray_push( aTHX_ ret ); SPAGAIN; %} int GetFilterIndex() const; bool HasMultipleFileSelection() const; void ShowHidden(bool show); }; %name{Wx::FileCtrlEvent} class wxFileCtrlEvent { void SetFiles( const wxArrayString &files ); void SetDirectory( const wxString &directory ); %{ void wxFileCtrlEvent::GetFiles() PPCODE: PUTBACK; wxPli_stringarray_push( aTHX_ THIS->GetFiles() ); SPAGAIN; %} wxString GetDirectory() const; wxString GetFile() const; }; #endif Wx-0.9923/XS/FileDialog.xs000664000000000000 603112306612233 13364 0ustar00Mark000000000000############################################################################# ## Name: XS/FileDialog.xs ## Purpose: XS for Wx::FileDialog ## Author: Mattia Barbon ## Modified by: ## Created: 27/11/2000 ## RCS-ID: $Id: FileDialog.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2002, 2004, 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 MODULE=Wx PACKAGE=Wx::FileDialog wxFileDialog* wxFileDialog::new( parent, message = wxFileSelectorPromptStr, defaultDir = wxEmptyString, defaultFile = wxEmptyString, wildcard = wxFileSelectorDefaultWildcardStr, style = 0, pos = wxDefaultPosition ) wxWindow* parent wxString message wxString defaultDir wxString defaultFile wxString wildcard long style wxPoint pos wxString wxFileDialog::GetDirectory() wxString wxFileDialog::GetFilename() void wxFileDialog::GetFilenames() PREINIT: wxArrayString filenames; int i, max; PPCODE: THIS->GetFilenames( filenames ); max = filenames.GetCount(); EXTEND( SP, max ); for( i = 0; i < max; ++i ) { #if wxUSE_UNICODE SV* tmp = sv_2mortal( newSVpv( filenames[i].mb_str(wxConvUTF8), 0 ) ); SvUTF8_on( tmp ); PUSHs( tmp ); #else PUSHs( sv_2mortal( newSVpv( CHAR_P filenames[i].c_str(), 0 ) ) ); #endif } int wxFileDialog::GetFilterIndex() wxString wxFileDialog::GetMessage() wxString wxFileDialog::GetPath() void wxFileDialog::GetPaths() PREINIT: wxArrayString filenames; int i, max; PPCODE: THIS->GetPaths( filenames ); max = filenames.GetCount(); EXTEND( SP, max ); for( i = 0; i < max; ++i ) { #if wxUSE_UNICODE SV* tmp = sv_2mortal( newSVpv( filenames[i].mb_str(wxConvUTF8), 0 ) ); SvUTF8_on( tmp ); PUSHs( tmp ); #else PUSHs( sv_2mortal( newSVpv( CHAR_P filenames[i].c_str(), 0 ) ) ); #endif } #if WXPERL_W_VERSION_LT( 2, 7, 0 ) long wxFileDialog::GetStyle() #endif wxString wxFileDialog::GetWildcard() void wxFileDialog::SetDirectory( directory ) wxString directory void wxFileDialog::SetFilename( name ) wxString name void wxFileDialog::SetFilterIndex( index ) int index void wxFileDialog::SetMessage( message ) wxString message void wxFileDialog::SetPath( path ) wxString path #if WXPERL_W_VERSION_LT( 2, 7, 0 ) void wxFileDialog::SetStyle( style ) long style #endif void wxFileDialog::SetWildcard( wildcard ) wxString wildcard int wxFileDialog::ShowModal() MODULE=Wx PACKAGE=Wx PREFIX=wx wxString wxFileSelector( message, default_path = wxEmptyString, default_filename = wxEmptyString, default_extension = wxEmptyString, wildcard = wxT("*.*"), flags = 0, parent = 0, x = -1, y = -1 ) wxString message wxString default_path wxString default_filename wxString default_extension wxString wildcard int flags wxWindow* parent int x int y Wx-0.9923/XS/FilePickerCtrl.xsp000664000000000000 1156412306612233 14436 0ustar00Mark000000000000############################################################################# ## Name: XS/FilePickerCtrl.xsp ## Purpose: XS+++ for Wx::File/DirPickerCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 01/11/2006 ## RCS-ID: $Id: FilePickerCtrl.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2006 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}; %{ #if WXPERL_W_VERSION_GE( 2, 7, 0 ) #include %} %typemap{wxFilePickerCtrl*}{simple}; %typemap{wxDirPickerCtrl*}{simple}; %typemap{wxFileDirPickerEvent *}{simple}; %name{Wx::FilePickerCtrl} class wxFilePickerCtrl { %name{newDefault} wxFilePickerCtrl() %code{% RETVAL = new wxFilePickerCtrl; wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxFilePickerCtrl( wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& path = wxEmptyString, const wxString& message = wxFileSelectorPromptStr, const wxString& wildcard = wxFileSelectorDefaultWildcardStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxFilePickerCtrlNameStr ) %code{% RETVAL = new wxFilePickerCtrl( parent, id, path, message, wildcard, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& path = wxEmptyString, const wxString& message = wxFileSelectorPromptStr, const wxString& wildcard = wxFileSelectorDefaultWildcardStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxFilePickerCtrlNameStr ); wxString GetPath() const; void SetPath( const wxString &str ); }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::FilePickerCtrl::new" ) %} %name{Wx::DirPickerCtrl} class wxDirPickerCtrl { %name{newDefault} wxDirPickerCtrl() %code{% RETVAL = new wxDirPickerCtrl; wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxDirPickerCtrl( wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& path = wxEmptyString, const wxString& message = wxDirSelectorPromptStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxDirPickerCtrlNameStr ) %code{% RETVAL = new wxDirPickerCtrl( parent, id, path, message, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& path = wxEmptyString, const wxString& message = wxDirSelectorPromptStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxDirPickerCtrlNameStr ); wxString GetPath() const; void SetPath( const wxString &str ); }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::DirPickerCtrl::new" ) %} %name{Wx::FileDirPickerEvent} class wxFileDirPickerEvent { wxString GetPath() const; void SetPath( const wxString &p ); }; %{ #endif %} Wx-0.9923/XS/FindReplaceDialog.xsp000664000000000000 434512306612233 15047 0ustar00Mark000000000000############################################################################# ## Name: XS/FindReplaceDialog.xsp ## Purpose: XS for Wx::FindReplaceDialog ## Author: Mark Dootson ## Modified by: ## Created: 16 April 2013 ## RCS-ID: $Id: FindReplaceDialog.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2004, 2013 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include %module{Wx}; %loadplugin{build::Wx::XSP::Overload}; %name{Wx::FindReplaceData} class wxFindReplaceData { %{ static void wxFindReplaceData::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: wxFindReplaceData(wxUint32 flags = 0); ~wxAnimation() %code{% wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; %}; const wxString& GetFindString(); int GetFlags() const; const wxString& GetReplaceString(); void SetFindString(const wxString& str); void SetFlags(wxUint32 flags); void SetReplaceString(const wxString& str); }; %name{Wx::FindReplaceDialog} class wxFindReplaceDialog { public: %name{newDefault} wxFindReplaceDialog() %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxFindReplaceDialog(wxWindow* parent, wxFindReplaceData* data, const wxString& title, int style = 0) %Overload %postcall{% wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow* parent, wxFindReplaceData* data, const wxString& title, int style = 0); wxFindReplaceData* GetData() %code%{ RETVAL = (wxFindReplaceData*)THIS->GetData(); %}; void SetData(wxFindReplaceData *data); }; %name{Wx::FindDialogEvent} class wxFindDialogEvent { public: wxFindReplaceDialog* GetDialog() const; wxString GetFindString() const; int GetFlags() const; const wxString& GetReplaceString() const; }; Wx-0.9923/XS/Font.xs000664000000000000 2330612306612233 12317 0ustar00Mark000000000000############################################################################# ## Name: XS/Font.xs ## Purpose: XS for Wx::Font ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Font.xs 3041 2011-03-20 03:47:09Z mdootson $ ## Copyright: (c) 2000-2004, 2006-2007 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 PACKAGE=Wx::NativeFontInfo #include #undef THIS wxNativeFontInfo* wxNativeFontInfo::new() static void wxNativeFontInfo::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxNativeFontInfo::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::NativeFontInfo", THIS, ST(0) ); delete THIS; bool wxNativeFontInfo::FromString( string ) wxString string wxString wxNativeFontInfo::ToString() bool wxNativeFontInfo::FromUserString( string ) wxString string wxString wxNativeFontInfo::ToUserString() MODULE=Wx PACKAGE=Wx::Font void wxFont::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wfon, newFont ) #if defined(__WXMSW__) && WXPERL_W_VERSION_GE( 2, 5, 3 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wsiz_n_n_n_b_s_n, newSize, 4 ) #endif MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_n_n_n_b_s_n, newLong, 4 ) MATCH_REDISP( wxPliOvl_s, newNativeInfo ) END_OVERLOAD( Wx::Font::new ) wxFont* newNativeInfo( CLASS, info ) SV* CLASS wxString info CODE: #if defined(__WXMOTIF__) || defined(__WXX11__) wxNativeFontInfo fontinfo; fontinfo.FromString( info ); RETVAL = new wxFont( fontinfo ); #else RETVAL = new wxFont( info ); #endif OUTPUT: RETVAL wxFont* newFont( CLASS, font ) SV* CLASS wxFont* font CODE: RETVAL = new wxFont( *font ); OUTPUT: RETVAL wxFont* newLong( CLASS, pointsize, family, style, weight, underline = false, faceName = wxEmptyString, encoding = wxFONTENCODING_DEFAULT ) SV* CLASS int pointsize int family int style int weight bool underline wxString faceName wxFontEncoding encoding CODE: RETVAL = new wxFont( pointsize, family, style, weight, underline, faceName, encoding ); OUTPUT: RETVAL #if defined(__WXMSW__) && WXPERL_W_VERSION_GE( 2, 5, 3 ) wxFont* newSize( CLASS, size, family, style, weight, underline = false, faceName = wxEmptyString, encoding = wxFONTENCODING_DEFAULT ) SV* CLASS wxSize size int family int style int weight bool underline wxString faceName wxFontEncoding encoding CODE: RETVAL = new wxFont( size, family, style, weight, underline, faceName, encoding ); OUTPUT: RETVAL #endif ## // static constructors ## // put correct static functions first - they will not match ## // method calls which appear to have wxFont as first param void New( ... ) PPCODE: BEGIN_OVERLOAD() #if WXPERL_W_VERSION_GE( 2, 5, 3 ) MATCH_REDISP_COUNT_ALLOWMORE_FUNCTION( wxPliOvl_wsiz_n_n_n_b_s_n, Wx::Font::NewSizeStatic, 4 ) MATCH_REDISP_COUNT_ALLOWMORE_FUNCTION( wxPliOvl_wsiz_n_n_s_n, Wx::Font::NewSizeFlagsStatic, 2 ) #endif MATCH_REDISP_COUNT_ALLOWMORE_FUNCTION( wxPliOvl_n_n_n_n_b_s_n, Wx::Font::NewPointStatic, 4 ) MATCH_REDISP_COUNT_ALLOWMORE_FUNCTION( wxPliOvl_n_n_n_s_n, Wx::Font::NewPointFlagsStatic, 2 ) #if WXPERL_W_VERSION_GE( 2, 5, 3 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wsiz_n_n_n_b_s_n, NewSize, 4 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wsiz_n_n_s_n, NewSizeFlags, 2 ) #endif MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_n_n_n_b_s_n, NewPoint, 4 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_n_n_s_n, NewPointFlags, 2 ) END_OVERLOAD( Wx::Font::New ) wxFont* NewPoint( CLASS, pointsize, family, style, weight, underline = false, faceName = wxEmptyString, encoding = wxFONTENCODING_DEFAULT ) SV* CLASS int pointsize wxFontFamily family int style int weight bool underline wxString faceName wxFontEncoding encoding CODE: RETVAL = wxFont::New( pointsize, family, style, weight, underline, faceName, encoding ); OUTPUT: RETVAL wxFont* NewPointFlags( CLASS, pointsize, family, flags = wxFONTFLAG_DEFAULT, faceName = wxEmptyString, encoding = wxFONTENCODING_DEFAULT ) SV* CLASS int pointsize wxFontFamily family int flags wxString faceName wxFontEncoding encoding CODE: RETVAL = wxFont::New( pointsize, family, flags, faceName, encoding ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxFont* NewSize( CLASS, size, family, style, weight, underline = false, faceName = wxEmptyString, encoding = wxFONTENCODING_DEFAULT ) SV* CLASS wxSize size wxFontFamily family int style int weight bool underline wxString faceName wxFontEncoding encoding CODE: RETVAL = wxFont::New( size, family, style, weight, underline, faceName, encoding ); OUTPUT: RETVAL wxFont* NewSizeFlags( CLASS, size, family, flags = wxFONTFLAG_DEFAULT, faceName = wxEmptyString, encoding = wxFONTENCODING_DEFAULT ) SV* CLASS wxSize size wxFontFamily family int flags wxString faceName wxFontEncoding encoding CODE: RETVAL = wxFont::New( size, family, flags, faceName, encoding ); OUTPUT: RETVAL #endif wxFont* NewPointStatic( pointsize, family, style, weight, underline = false, faceName = wxEmptyString, encoding = wxFONTENCODING_DEFAULT ) int pointsize wxFontFamily family int style int weight bool underline wxString faceName wxFontEncoding encoding CODE: RETVAL = wxFont::New( pointsize, family, style, weight, underline, faceName, encoding ); OUTPUT: RETVAL wxFont* NewPointFlagsStatic( pointsize, family, flags = wxFONTFLAG_DEFAULT, faceName = wxEmptyString, encoding = wxFONTENCODING_DEFAULT ) int pointsize wxFontFamily family int flags wxString faceName wxFontEncoding encoding CODE: RETVAL = wxFont::New( pointsize, family, flags, faceName, encoding ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxFont* NewSizeStatic( size, family, style, weight, underline = false, faceName = wxEmptyString, encoding = wxFONTENCODING_DEFAULT ) wxSize size wxFontFamily family int style int weight bool underline wxString faceName wxFontEncoding encoding CODE: RETVAL = wxFont::New( size, family, style, weight, underline, faceName, encoding ); OUTPUT: RETVAL wxFont* NewSizeFlagsStatic( size, family, flags = wxFONTFLAG_DEFAULT, faceName = wxEmptyString, encoding = wxFONTENCODING_DEFAULT ) wxSize size wxFontFamily family int flags wxString faceName wxFontEncoding encoding CODE: RETVAL = wxFont::New( size, family, flags, faceName, encoding ); OUTPUT: RETVAL #endif static void wxFont::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxFont::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Font", THIS, ST(0) ); delete THIS; int font_spaceship( fnt1, fnt2, ... ) SV* fnt1 SV* fnt2 CODE: // this is not a proper spaceship method // it just allows autogeneration of != and == // anyway, comparing fontss is just useless RETVAL = -1; if( SvROK( fnt1 ) && SvROK( fnt2 ) && sv_derived_from( fnt1, "Wx::Font" ) && sv_derived_from( fnt2, "Wx::Font" ) ) { wxFont* font1 = (wxFont*)wxPli_sv_2_object( aTHX_ fnt1, "Wx::Font" ); wxFont* font2 = (wxFont*)wxPli_sv_2_object( aTHX_ fnt2, "Wx::Font" ); RETVAL = *font1 == *font2 ? 0 : 1; } else RETVAL = 1; OUTPUT: RETVAL wxFontEncoding GetDefaultEncoding() CODE: RETVAL = wxFont::GetDefaultEncoding(); OUTPUT: RETVAL wxString wxFont::GetFaceName() int wxFont::GetFamily() #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxNativeFontInfo* wxFont::GetNativeFontInfo() CODE: RETVAL = new wxNativeFontInfo( *(THIS->GetNativeFontInfo()) ); OUTPUT: RETVAL #else wxNativeFontInfo* wxFont::GetNativeFontInfo() #endif void wxFont::SetNativeFontInfoUserDesc( info ) wxString info wxString wxFont::GetFamilyString() wxString wxFont::GetStyleString() wxString wxFont::GetWeightString() wxString wxFont::GetNativeFontInfoDesc() wxString wxFont::GetNativeFontInfoUserDesc() #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxSize* wxFont::GetPixelSize() CODE: RETVAL = new wxSize( THIS->GetPixelSize() ); OUTPUT: RETVAL #endif wxFontEncoding wxFont::GetEncoding() int wxFont::GetPointSize() int wxFont::GetStyle() bool wxFont::GetUnderlined() int wxFont::GetWeight() bool wxFont::IsFixedWidth() bool wxFont::Ok() #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool wxFont::IsOk() #endif void SetDefaultEncoding( encoding ) wxFontEncoding encoding CODE: wxFont::SetDefaultEncoding( encoding ); #if WXPERL_W_VERSION_GE( 2, 7, 0 ) bool wxFont::SetFaceName( faceName ) wxString faceName #else void wxFont::SetFaceName( faceName ) wxString faceName #endif void wxFont::SetEncoding( encoding ) wxFontEncoding encoding void wxFont::SetFamily( family ) int family void wxFont::SetNativeFontInfo( info ) wxString info CODE: THIS->SetNativeFontInfo( info ); #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxFont::SetPixelSize( pixelsize ) wxSize pixelsize bool wxFont::IsUsingSizeInPixels() #endif void wxFont::SetPointSize( pointsize ) int pointsize void wxFont::SetStyle( style ) int style void wxFont::SetUnderlined( underlined ) bool underlined void wxFont::SetWeight( weight ) int weight Wx-0.9923/XS/FontDialog.xs000664000000000000 464212306612233 13421 0ustar00Mark000000000000############################################################################# ## Name: XS/FontDialog.xs ## Purpose: XS for Wx::FontDialog and Wx::FontData ## Author: Mattia Barbon ## Modified by: ## Created: 14/02/2001 ## RCS-ID: $Id: FontDialog.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2004, 2006 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxPERL_USE_FONTDLG #include MODULE=Wx PACKAGE=Wx::FontData wxFontData* wxFontData::new() static void wxFontData::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxFontData::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::FontData", THIS, ST(0) ); delete THIS; void wxFontData::EnableEffects( enable ) bool enable bool wxFontData::GetAllowSymbols() wxColour* wxFontData::GetColour() CODE: RETVAL = new wxColour( THIS->GetColour() ); OUTPUT: RETVAL wxFont* wxFontData::GetChosenFont() CODE: RETVAL = new wxFont( THIS->GetChosenFont() ); OUTPUT: RETVAL bool wxFontData::GetEnableEffects() wxFont* wxFontData::GetInitialFont() CODE: RETVAL = new wxFont( THIS->GetInitialFont() ); OUTPUT: RETVAL bool wxFontData::GetShowHelp() void wxFontData::SetAllowSymbols( allow ) bool allow void wxFontData::SetChosenFont( font ) wxFont* font CODE: THIS->SetChosenFont( *font ); void wxFontData::SetColour( colour ) wxColour colour void wxFontData::SetInitialFont( font ) wxFont* font CODE: THIS->SetInitialFont( *font ); void wxFontData::SetRange( min, max ) int min int max void wxFontData::SetShowHelp( show ) bool show MODULE=Wx PACKAGE=Wx::FontDialog wxFontDialog* wxFontDialog::new( parent, data = 0 ) wxWindow* parent wxFontData* data CODE: RETVAL = new wxFontDialog( parent, *data ); OUTPUT: RETVAL wxFontData* wxFontDialog::GetFontData() CODE: RETVAL = new wxFontData( THIS->GetFontData() ); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx PREFIX=wx wxFont* wxGetFontFromUser( parent = 0, fontInit = (wxFont*)&wxNullFont ) wxWindow* parent wxFont* fontInit CODE: RETVAL = new wxFont( wxGetFontFromUser( parent, *fontInit ) ); OUTPUT: RETVAL #endif Wx-0.9923/XS/FontEnumerator.xsp000664000000000000 1023312306612233 14534 0ustar00Mark000000000000############################################################################# ## Name: XS/FontEnumerator.xsp ## Purpose: XS for Wx::FontEnumerator ## Author: Mark Dootson ## Modified by: ## Created: 29/03/2013 ## RCS-ID: $Id: FontEnumerator.xs 2274 2007-11-10 22:37:30Z mbarbon $ ## Copyright: (c) 2002, 2006-2007, 2013 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 %typemap{wxFontEncoding}{simple}; %loadplugin{build::Wx::XSP::Virtual}; %name{Wx::FontEnumerator} class wxFontEnumerator { %NoVirtualBase; %VirtualNonObject; %{ static void wxFontEnumerator::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} public: wxFontEnumerator(); virtual ~wxFontEnumerator() %code%{ wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; %}; bool EnumerateFacenames( wxFontEncoding encoding = wxFONTENCODING_SYSTEM, bool fixedWidthOnly = false ); bool EnumerateEncodings(const wxString& facename = wxEmptyString); virtual bool OnFacename(const wxString& facename) %Virtual; virtual bool OnFontEncoding(const wxString& facename, const wxString& encoding) %Virtual; static bool IsValidFacename(const wxString &str); }; %{ MODULE=Wx PACKAGE=Wx::FontEnumerator ## Support call to Wx::FontEnumerator->new as the ## wxPlFontEnumerator class contains no pure virtual ## methods and existing code will expect this to work. wxPlFontEnumerator* new( CLASS ) PlClassName CLASS CODE: RETVAL = new wxPlFontEnumerator( CLASS ); OUTPUT: RETVAL ## // Static calls to GetEncodings - support previous ## // implementation as method calls so existing code does not break. ## // Put correct static functions first - they will not match ## // method calls which appear to have wxFontEnumerator as first param void GetEncodings( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE_FUNCTION( wxPliOvl_s, Wx::FontEnumerator::GetEncodingsStatic, 0 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s, GetEncodingsMethod, 0 ) END_OVERLOAD( Wx::FontEnumerator::GetEncodings ) void wxFontEnumerator::GetEncodingsMethod( facename = wxEmptyString ) wxString facename PREINIT: wxArrayString enc; PPCODE: enc = THIS->GetEncodings( facename ); PUTBACK; wxPli_stringarray_push( aTHX_ enc ); SPAGAIN; void GetEncodingsStatic( facename = wxEmptyString ) wxString facename PREINIT: wxArrayString enc; PPCODE: enc = wxFontEnumerator::GetEncodings( facename ); PUTBACK; wxPli_stringarray_push( aTHX_ enc ); SPAGAIN; ## // Static calls to GetFacenames - support previous ## // implementation as method calls so existing code does not break. ## // Put correct static functions first - they will not match ## // method calls which appear to have wxFontEnumerator as first param void GetFacenames( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE_FUNCTION( wxPliOvl_n_b, Wx::FontEnumerator::GetFacenamesStatic, 0 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_b, GetFacenamesMethod, 0 ) END_OVERLOAD( Wx::FontEnumerator::GetFaceNames ) void wxFontEnumerator::GetFacenamesMethod( encoding = wxFONTENCODING_SYSTEM, fixedWidthOnly = 0 ) wxFontEncoding encoding bool fixedWidthOnly PREINIT: wxArrayString fnames; PPCODE: fnames = THIS->GetFacenames( encoding, fixedWidthOnly ); PUTBACK; wxPli_stringarray_push( aTHX_ fnames ); SPAGAIN; void GetFacenamesStatic( encoding = wxFONTENCODING_SYSTEM, fixedWidthOnly = 0 ) wxFontEncoding encoding bool fixedWidthOnly PREINIT: wxArrayString fnames; PPCODE: fnames = wxFontEnumerator::GetFacenames( encoding, fixedWidthOnly ); PUTBACK; wxPli_stringarray_push( aTHX_ fnames ); SPAGAIN; %} Wx-0.9923/XS/FontMapper.xs000664000000000000 540012306612233 13437 0ustar00Mark000000000000############################################################################# ## Name: XS/FontMapper.xs ## Purpose: XS for Wx::FontMapper ## Author: Mattia Barbon ## Modified by: ## Created: 13/09/2002 ## RCS-ID: $Id: FontMapper.xs 2299 2007-11-25 17:30:04Z mbarbon $ ## Copyright: (c) 2002-2003, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::FontMapper wxFontMapper* Get() CODE: RETVAL = wxFontMapper::Get(); OUTPUT: RETVAL void wxFontMapper::GetAltForEncoding( encoding, facename = wxEmptyString, interactive = true ) wxFontEncoding encoding wxString facename bool interactive PREINIT: wxFontEncoding retval; bool result; PPCODE: result = THIS->GetAltForEncoding( encoding, &retval, facename, interactive ); EXTEND( SP, 2 ); PUSHs( boolSV( result ) ); PUSHs( sv_2mortal( newSViv( retval ) ) ); bool wxFontMapper::IsEncodingAvailable( encoding, facename = wxEmptyString ) wxFontEncoding encoding wxString facename wxFontEncoding wxFontMapper::CharsetToEncoding( charset, interactive = true ) wxString charset bool interactive wxString GetEncodingName( encoding ) wxFontEncoding encoding CODE: RETVAL = wxFontMapper::GetEncodingName( encoding ); OUTPUT: RETVAL wxString GetEncodingDescription( encoding ) wxFontEncoding encoding CODE: RETVAL = wxFontMapper::GetEncodingDescription( encoding ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void GetAllEncodingNames( encoding ) wxFontEncoding encoding PPCODE: const wxChar** encodings = wxFontMapper::GetAllEncodingNames( encoding ); if( !encodings ) return; while( *encodings ) { XPUSHs( wxPli_wxChar_2_sv( aTHX_ *encodings, sv_newmortal() ) ); ++encodings; } #endif wxFontEncoding wxFontMapper::GetEncoding( n ) size_t n CODE: RETVAL = wxFontMapper::GetEncoding( n ); OUTPUT: RETVAL wxFontEncoding wxFontMapper::GetEncodingFromName( encoding ) wxString encoding CODE: RETVAL = wxFontMapper::GetEncodingFromName( encoding ); OUTPUT: RETVAL size_t wxFontMapper::GetSupportedEncodingsCount() CODE: RETVAL = wxFontMapper::GetSupportedEncodingsCount(); OUTPUT: RETVAL void wxFontMapper::SetDialogParent( parent ) wxWindow* parent void wxFontMapper::SetDialogTitle( title ) wxString title #if WXPERL_W_VERSION_LT( 2, 7, 0 ) void wxFontMapper::SetConfig( config ) wxConfigBase* config #endif void wxFontMapper::SetConfigPath( path ) wxString path Wx-0.9923/XS/FontPickerCtrl.xsp000664000000000000 520512306612233 14440 0ustar00Mark000000000000############################################################################# ## Name: XS/FontPickerCtrl.xsp ## Purpose: XS+++ for Wx::FontPickerCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 01/11/2006 ## RCS-ID: $Id: FontPickerCtrl.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2006 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}; %{ #if WXPERL_W_VERSION_GE( 2, 7, 0 ) #include %} %typemap{wxFontPickerCtrl*}{simple}; %typemap{wxFontPickerEvent *}{simple}; %name{Wx::FontPickerCtrl} class wxFontPickerCtrl { %name{newDefault} wxFontPickerCtrl() %code{% RETVAL = new wxFontPickerCtrl; wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxFontPickerCtrl( wxWindow *parent, wxWindowID id = wxID_ANY, const wxFont& font = wxNORMAL_FONTPtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxButtonNameStr ) %code{% RETVAL = new wxFontPickerCtrl( parent, id, *font, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxFont& col = wxNORMAL_FONTPtr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxButtonNameStr ); wxFont GetSelectedFont() const; void SetSelectedFont( const wxFont& f ); void SetMaxPointSize( unsigned int max ); unsigned int GetMaxPointSize() const; }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::FontPickerCtrl::new" ) %} %name{Wx::FontPickerEvent} class wxFontPickerEvent { wxFont GetFont() const; void SetFont( const wxFont &c ); }; %{ #endif %} Wx-0.9923/XS/Frame.xs000664000000000000 1001612306612233 12435 0ustar00Mark000000000000############################################################################# ## Name: XS/Frame.xs ## Purpose: XS for Wx::Frame ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Frame.xs 3381 2012-09-27 03:14:53Z mdootson $ ## Copyright: (c) 2000-2004, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include #include #if wxPERL_USE_MINIFRAME #include #endif #include "cpp/frame.h" MODULE=Wx PACKAGE=Wx::Frame void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Frame::new" ) wxFrame* newDefault( CLASS ) char* CLASS CODE: RETVAL = new wxPliFrame( CLASS ); OUTPUT: RETVAL wxFrame* newFull( CLASS, parent, id, title, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wxFrameNameStr ) char* CLASS wxWindow* parent wxWindowID id wxString title wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxPliFrame( CLASS , parent, id, title, pos, size, style, name ); OUTPUT: RETVAL bool wxFrame::Create( parent, id, title, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wxFrameNameStr ) wxWindow* parent wxWindowID id wxString title wxPoint pos wxSize size long style wxString name #if WXPERL_W_VERSION_GE( 2, 8, 12 ) void wxFrame::ProcessCommand( id ) int id #endif wxStatusBar* wxFrame::CreateStatusBar( number = 1, style = 0, id = wxID_ANY, name = wxEmptyString ) int number long style wxWindowID id wxString name wxToolBar* wxFrame::CreateToolBar( style = wxNO_BORDER | wxTB_HORIZONTAL, id = wxID_ANY, name = wxToolBarNameStr ) long style wxWindowID id wxString name wxPoint* wxFrame::GetClientAreaOrigin() CODE: RETVAL = new wxPoint( THIS->GetClientAreaOrigin() ); OUTPUT: RETVAL wxMenuBar* wxFrame::GetMenuBar() wxStatusBar* wxFrame::GetStatusBar() int wxFrame::GetStatusBarPane() wxString wxFrame::GetTitle() wxToolBar* wxFrame::GetToolBar() #if defined( __WXMAC__ ) && WXPERL_W_VERSION_GE( 2, 5, 2 ) \ && WXPERL_W_VERSION_LT( 2, 7, 0 ) void wxFrame::MacSetMetalAppearance( ismetal ) bool ismetal #endif wxStatusBar* wxFrame::OnCreateStatusBar( number, style, id, name ) int number long style wxWindowID id wxString name CODE: RETVAL = THIS->wxFrame::OnCreateStatusBar( number, style, id, name ); OUTPUT: RETVAL void wxFrame::SendSizeEvent() void wxFrame::SetIcon( icon ) wxIcon* icon CODE: THIS->SetIcon( *icon ); void wxFrame::SetIcons( icons ) wxIconBundle* icons C_ARGS: *icons void wxFrame::SetMenuBar( menubar ) wxMenuBar* menubar void wxFrame::SetStatusBar( statusBar ) wxStatusBar* statusBar void wxFrame::SetTitle( title ) wxString title void wxFrame::SetToolBar( toolbar ) wxToolBar* toolbar void wxFrame::SetStatusText( text, number = 0 ) wxString text int number void wxFrame::SetStatusBarPane( n ) int n void wxFrame::SetStatusWidths( ... ) PREINIT: int* w; int i; CODE: w = new int[items - 1]; for( i = 0; i < items - 1; ++i ) { w[i] = SvIV( ST( i + 1 ) ); } THIS->SetStatusWidths( items - 1, w ); delete [] w; MODULE=Wx PACKAGE=Wx::MiniFrame #if wxPERL_USE_MINIFRAME wxMiniFrame* wxMiniFrame::new( parent, id, title, pos = wxDefaultPosition, size = wxDefaultSize, style = wxDEFAULT_FRAME_STYLE, name = wxFrameNameStr ) wxWindow* parent wxWindowID id wxString title wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxMiniFrame( parent, id, title, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL #endifWx-0.9923/XS/Gauge.xs000664000000000000 476412306612233 12430 0ustar00Mark000000000000############################################################################# ## Name: XS/Gauge.xs ## Purpose: XS for Wx::Gauge ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2000 ## RCS-ID: $Id: Gauge.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2001, 2003, 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 MODULE=Wx PACKAGE=Wx::Gauge void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Gauge::new" ) wxGauge* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxGauge(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxGauge* newFull( CLASS, parent, id, range, pos = wxDefaultPosition, size = wxDefaultSize, style = wxGA_HORIZONTAL, validator = (wxValidator*)&wxDefaultValidator, name = wxGaugeNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id int range wxPoint pos wxSize size long style wxValidator* validator wxString name CODE: RETVAL = new wxGauge( parent, id, range, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxGauge::Create( parent, id, range, pos = wxDefaultPosition, size = wxDefaultSize, style = wxGA_HORIZONTAL, validator = (wxValidator*)&wxDefaultValidator, name = wxGaugeNameStr ) wxWindow* parent wxWindowID id int range wxPoint pos wxSize size long style wxValidator* validator wxString name C_ARGS: parent, id, range, pos, size, style, *validator, name #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) int wxGauge::GetBezelFace() #endif int wxGauge::GetRange() #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) int wxGauge::GetShadowWidth() #endif int wxGauge::GetValue() #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) void wxGauge::SetBezelFace( width ) int width #endif void wxGauge::SetRange( range ) int range #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) void wxGauge::SetShadowWidth( width ) int width #endif void wxGauge::SetValue( pos ) int pos #if WXPERL_W_VERSION_GE( 2, 5, 1 ) bool wxGauge::IsVertical() #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) void wxGauge::Pulse() #endif Wx-0.9923/XS/Geom.xs000664000000000000 4047312306612233 12304 0ustar00Mark000000000000############################################################################# ## Name: XS/Geom.xs ## Purpose: XS for Wx::Point, Wx::Size, Wx::Rect, Wx::Region ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Geom.xs 3461 2013-04-11 11:23:24Z mdootson $ ## Copyright: (c) 2000-2003, 2006-2009 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 PACKAGE=Wx::Size wxSize* wxSize::new( width = 0, height = 0 ) int width int height static void wxSize::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxSize::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Size", THIS, ST(0) ); delete THIS; int wxSize::width( ... ) CODE: if( items > 1 ) THIS->x = SvIV( ST(1) ); RETVAL = THIS->x; OUTPUT: RETVAL int wxSize::height( ... ) CODE: if( items > 1 ) THIS->y = SvIV( ST(1) ); RETVAL = THIS->y; OUTPUT: RETVAL int wxSize::GetHeight() int wxSize::GetWidth() void wxSize::Set( width, height ) int width int height void wxSize::SetHeight( height ) int height void wxSize::SetWidth( width ) int width void wxSize::IncTo( size ) wxSize size void wxSize::DecTo( size ) wxSize size #if WXPERL_W_VERSION_GE( 2, 7, 2 ) SV* wxSize::Scale( xscale, yscale ) float xscale float yscale CODE: THIS->Scale( xscale, yscale ); RETVAL = ST(0); OUTPUT: RETVAL #endif bool wxSize::IsFullySpecified() void wxSize::SetDefaults( size ) wxSize size MODULE=Wx PACKAGE=Wx::Point wxPoint* wxPoint::new( x = 0, y = 0 ) int x int y static void wxPoint::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxPoint::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Point", THIS, ST(0) ); delete THIS; int wxPoint::x( ... ) CODE: if( items > 1 ) THIS->x = SvIV( ST(1) ); RETVAL = THIS->x; OUTPUT: RETVAL int wxPoint::y( ... ) CODE: if( items > 1 ) THIS->y = SvIV( ST(1) ); RETVAL = THIS->y; OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::Rect void wxRect::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n_n_n, newXYWH ) MATCH_REDISP( wxPliOvl_wpoi_wsiz, newPS ) MATCH_REDISP( wxPliOvl_wpoi_wpoi, newPP ) END_OVERLOAD( Wx::Rect::new ) wxRect* newXYWH( CLASS, x, y, width, height ) SV* CLASS int x int y int width int height CODE: RETVAL = new wxRect( x, y, width, height ); OUTPUT: RETVAL wxRect* newPP( CLASS, tl, br ) SV* CLASS wxPoint tl wxPoint br CODE: RETVAL = new wxRect( tl, br ); OUTPUT: RETVAL wxRect* newPS( CLASS, pos, size ) SV* CLASS wxPoint pos wxSize size CODE: RETVAL = new wxRect( pos, size ); OUTPUT: RETVAL static void wxRect::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxRect::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Rect", THIS, ST(0) ); delete THIS; int wxRect::x( ... ) CODE: if( items > 1 ) THIS->x = SvIV( ST(1) ); RETVAL = THIS->x; OUTPUT: RETVAL int wxRect::y( ... ) CODE: if( items > 1 ) THIS->y = SvIV( ST(1) ); RETVAL = THIS->y; OUTPUT: RETVAL int wxRect::width( ... ) CODE: if( items > 1 ) THIS->width = SvIV( ST(1) ); RETVAL = THIS->width; OUTPUT: RETVAL int wxRect::height( ... ) CODE: if( items > 1 ) THIS->height = SvIV( ST(1) ); RETVAL = THIS->height; OUTPUT: RETVAL int wxRect::GetBottom() int wxRect::GetHeight() int wxRect::GetLeft() wxPoint* wxRect::GetPosition() CODE: RETVAL = new wxPoint( THIS->GetPosition() ); OUTPUT: RETVAL wxPoint* wxRect::GetTopLeft() CODE: RETVAL = new wxPoint( THIS->GetTopLeft() ); OUTPUT: RETVAL wxPoint* wxRect::GetBottomRight() CODE: RETVAL = new wxPoint( THIS->GetBottomRight() ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 8, 0 ) wxPoint* wxRect::GetBottomLeft() CODE: RETVAL = new wxPoint( THIS->GetBottomLeft() ); OUTPUT: RETVAL wxPoint* wxRect::GetTopRight() CODE: RETVAL = new wxPoint( THIS->GetTopRight() ); OUTPUT: RETVAL bool wxRect::IsEmpty() wxRect* wxRect::Union( wxRect* rec ) CODE: RETVAL = new wxRect( THIS->Union( *rec ) ); OUTPUT: RETVAL #endif int wxRect::GetRight() wxSize* wxRect::GetSize() CODE: RETVAL = new wxSize( THIS->GetSize() ); OUTPUT: RETVAL int wxRect::GetTop() int wxRect::GetWidth() int wxRect::GetX() int wxRect::GetY() void wxRect::Deflate( x, y ) wxCoord x wxCoord y = NO_INIT CODE: if( items == 2 ) y = x; else y = SvIV( ST(2) ); THIS->Deflate( x, y ); void wxRect::Inflate( x, y ) wxCoord x wxCoord y = NO_INIT CODE: if( items == 2 ) y = x; else y = SvIV( ST(2) ); THIS->Inflate( x, y ); wxRect* wxRect::Intersect( rect ) wxRect* rect CODE: RETVAL = new wxRect( THIS->Intersect( *rect ) ); OUTPUT: RETVAL bool wxRect::Intersects( wxRect* rec ) CODE: RETVAL = THIS->Intersects( *rec ); OUTPUT: RETVAL void wxRect::SetHeight( height ) int height void wxRect::SetWidth( width ) int width void wxRect::SetX( x ) int x void wxRect::SetY( y ) int y void wxRect::SetPosition( pos ) wxPoint pos void wxRect::SetSize( size ) wxSize size void wxRect::Offset( x, y ) wxCoord x wxCoord y CODE: THIS->Offset( x, y); void wxRect::Contains( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n, ContainsXY ) MATCH_REDISP( wxPliOvl_wpoi, ContainsPoint ) MATCH_REDISP( wxPliOvl_wrec, ContainsRect ) END_OVERLOAD( Wx::Rect::Contains ) void wxRect::Inside( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n, ContainsXY ) MATCH_REDISP( wxPliOvl_wpoi, ContainsPoint ) #if WXPERL_W_VERSION_GE( 2, 7, 0 ) MATCH_REDISP( wxPliOvl_wrec, ContainsRect ) #endif END_OVERLOAD( Wx::Rect::Inside ) bool wxRect::ContainsXY( int x, int y ) CODE: #if WXPERL_W_VERSION_GE( 2, 7, 1 ) RETVAL = THIS->Contains( x, y ); #else RETVAL = THIS->Inside( x, y ); #endif OUTPUT: RETVAL bool wxRect::ContainsPoint( wxPoint pt ) CODE: #if WXPERL_W_VERSION_GE( 2, 7, 1 ) RETVAL = THIS->Contains( pt ); #else RETVAL = THIS->Inside( pt ); #endif OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 7, 1 ) bool wxRect::ContainsRect( wxRect* rec ) CODE: RETVAL = THIS->Contains( *rec ); OUTPUT: RETVAL wxRect* wxRect::CentreIn ( wxRect* rec, int dir = wxBOTH ) CODE: RETVAL = new wxRect( THIS->CentreIn( *rec, dir ) ); OUTPUT: RETVAL #endif MODULE=Wx PACKAGE=Wx::Region wxRegion* newEmpty( CLASS ) SV* CLASS CODE: RETVAL = new wxRegion(); OUTPUT: RETVAL wxRegion* newXYWH( CLASS, x, y, width, height ) SV* CLASS wxCoord x wxCoord y wxCoord width wxCoord height CODE: RETVAL = new wxRegion( x, y, width, height ); OUTPUT: RETVAL wxRegion* newPP( CLASS, topLeft, bottomRight ) SV* CLASS wxPoint topLeft wxPoint bottomRight CODE: RETVAL = new wxRegion( topLeft, bottomRight ); OUTPUT: RETVAL wxRegion* newRect( CLASS, rect ) SV* CLASS wxRect* rect CODE: RETVAL = new wxRegion( *rect ); OUTPUT: RETVAL #if !defined( __WXMAC__ ) && !defined( __WXMOTIF__ ) wxRegion* newPolygon( CLASS, list, fillStyle = wxODDEVEN_RULE ) SV* CLASS SV* list wxPolygonFillMode fillStyle PREINIT: wxPoint* points; size_t n; CODE: n = wxPli_av_2_pointarray( aTHX_ list, &points ); RETVAL = new wxRegion( n, points, fillStyle ); delete [] points; OUTPUT: RETVAL #endif #if !defined( __WXOSX_COCOA__ ) wxRegion* newBitmap( CLASS, bitmap, colour, tolerance = 0 ) SV* CLASS wxBitmap* bitmap wxColour colour int tolerance CODE: RETVAL = new wxRegion( *bitmap, colour, tolerance ); OUTPUT: RETVAL wxRegion* newBitmapOnly( CLASS, bitmap ) SV* CLASS wxBitmap* bitmap CODE: RETVAL = new wxRegion( *bitmap ); OUTPUT: RETVAL #endif void wxRegion::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newEmpty ) MATCH_REDISP( wxPliOvl_n_n_n_n, newXYWH ) MATCH_REDISP( wxPliOvl_wpoi_wpoi, newPP ) MATCH_REDISP( wxPliOvl_wrec, newRect ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wbmp_wcol_n, newBitmap, 2 ) MATCH_REDISP( wxPliOvl_wbmp, newBitmapOnly ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_arr, newPolygon, 1 ) END_OVERLOAD( Wx::Region::new ) static void wxRegion::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxRegion::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Region", THIS, ST(0) ); delete THIS; void wxRegion::Clear() wxRegionContain wxRegion::ContainsXY( x, y ) wxCoord x wxCoord y CODE: RETVAL = THIS->Contains( x, y ); OUTPUT: RETVAL wxRegionContain wxRegion::ContainsPoint( point ) wxPoint point CODE: RETVAL = THIS->Contains( point ); OUTPUT: RETVAL wxRegionContain wxRegion::ContainsXYWH( x, y, w, h ) wxCoord x wxCoord y wxCoord w wxCoord h CODE: RETVAL = THIS->Contains( x, y, w, h ); OUTPUT: RETVAL wxRegionContain wxRegion::ContainsRect( rect ) wxRect* rect CODE: RETVAL = THIS->Contains( *rect ); OUTPUT: RETVAL void wxRegion::Contains( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n_n_n, ContainsXYWH ) MATCH_REDISP( wxPliOvl_n_n, ContainsXY ) MATCH_REDISP( wxPliOvl_wpoi, ContainsPoint ) MATCH_REDISP( wxPliOvl_wrec, ContainsRect ) END_OVERLOAD( Wx::Region::Contains ) wxBitmap* wxRegion::ConvertToBitmap() CODE: RETVAL = new wxBitmap( THIS->ConvertToBitmap() ); OUTPUT: RETVAL wxRect* wxRegion::GetBox() CODE: RETVAL = new wxRect( THIS->GetBox() ); OUTPUT: RETVAL void wxRegion::GetBoxXYWH() PREINIT: int x; int y; int w; int h; PPCODE: THIS->GetBox( x, y, w, h ); EXTEND( SP, 4 ); PUSHs( sv_2mortal( newSViv( (IV) x ) ) ); PUSHs( sv_2mortal( newSViv( (IV) y ) ) ); PUSHs( sv_2mortal( newSViv( (IV) w ) ) ); PUSHs( sv_2mortal( newSViv( (IV) h ) ) ); bool wxRegion::IntersectXYWH( x, y, w, h ) wxCoord x wxCoord y wxCoord w wxCoord h CODE: RETVAL = THIS->Intersect( x, y, w, h ); OUTPUT: RETVAL bool wxRegion::IntersectRect( rect ) wxRect* rect CODE: RETVAL = THIS->Intersect( *rect ); OUTPUT: RETVAL bool wxRegion::IntersectRegion( region ) wxRegion* region CODE: RETVAL = THIS->Intersect( *region ); OUTPUT: RETVAL void wxRegion::Intersect( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n_n_n, IntersectXYWH ) MATCH_REDISP( wxPliOvl_wrec, IntersectRect ) MATCH_REDISP( wxPliOvl_wreg, IntersectRegion ) END_OVERLOAD( Wx::Region::Intersect ) bool wxRegion::IsEmpty() #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool wxRegion::IsEqual( region ) wxRegion* region C_ARGS: *region #endif bool wxRegion::SubtractRect( rect ) wxRect* rect CODE: RETVAL = THIS->Subtract( *rect ); OUTPUT: RETVAL #if !defined(__WXMOTIF__) && !defined(__WXMAC__) bool wxRegion::Offset( x, y ) wxCoord x wxCoord y #endif bool wxRegion::SubtractRegion( region ) wxRegion* region CODE: RETVAL = THIS->Subtract( *region ); OUTPUT: RETVAL void wxRegion::Subtract( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wrec, SubtractRect ) MATCH_REDISP( wxPliOvl_wreg, SubtractRegion ) END_OVERLOAD( Wx::Region::Subtract ) bool wxRegion::UnionXYWH( x, y, w, h ) wxCoord x wxCoord y wxCoord w wxCoord h CODE: RETVAL = THIS->Union( x, y, w, h ); OUTPUT: RETVAL bool wxRegion::UnionRect( rect ) wxRect* rect CODE: RETVAL = THIS->Union( *rect ); OUTPUT: RETVAL bool wxRegion::UnionRegion( region ) wxRegion* region CODE: RETVAL = THIS->Union( *region ); OUTPUT: RETVAL bool wxRegion::UnionBitmapOnly( bitmap ) wxBitmap* bitmap CODE: RETVAL = THIS->Union( *bitmap ); OUTPUT: RETVAL bool wxRegion::UnionBitmap( bitmap, colour, tolerance = 0 ) wxBitmap* bitmap wxColour colour int tolerance CODE: RETVAL = THIS->Union( *bitmap, colour, tolerance ); OUTPUT: RETVAL void wxRegion::Union( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n_n_n, UnionXYWH ) MATCH_REDISP( wxPliOvl_wrec, UnionRect ) MATCH_REDISP( wxPliOvl_wreg, UnionRegion ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wbmp_wcol_n, UnionBitmap, 2 ) MATCH_REDISP( wxPliOvl_wbmp, UnionBitmapOnly ) END_OVERLOAD( Wx::Region::Union ) bool wxRegion::XorXYWH( x, y, w, h ) wxCoord x wxCoord y wxCoord w wxCoord h CODE: RETVAL = THIS->Xor( x, y, w, h ); OUTPUT: RETVAL bool wxRegion::XorRect( rect ) wxRect* rect CODE: RETVAL = THIS->Xor( *rect ); OUTPUT: RETVAL bool wxRegion::XorRegion( region ) wxRegion* region CODE: RETVAL = THIS->Xor( *region ); OUTPUT: RETVAL void wxRegion::Xor( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n_n_n, XorXYWH ) MATCH_REDISP( wxPliOvl_wrec, XorRect ) MATCH_REDISP( wxPliOvl_wreg, XorRegion ) END_OVERLOAD( Wx::Region::Xor ) # DECLARE_OVERLOAD( writ, Wx::RegionIterator ) MODULE=Wx PACKAGE=Wx::RegionIterator wxRegionIterator* newDefault( CLASS ) SV* CLASS CODE: RETVAL = new wxRegionIterator(); OUTPUT: RETVAL wxRegionIterator* newRegion( CLASS, region ) SV* CLASS wxRegion* region CODE: RETVAL = new wxRegionIterator( *region ); OUTPUT: RETVAL wxRegionIterator* newCopy( CLASS, ri ) SV* CLASS wxRegionIterator* ri CODE: RETVAL = new wxRegionIterator( *ri ); OUTPUT: RETVAL void wxRegionIterator::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_REDISP( wxPliOvl_wreg, newRegion ) MATCH_REDISP( wxPliOvl_writ, newCopy ) END_OVERLOAD( Wx::RegionIterator::new ) static void wxRegionIterator::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxRegionIterator::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::RegionIterator", THIS, ST(0) ); delete THIS; void wxRegionIterator::ResetVoid() CODE: THIS->Reset(); void wxRegionIterator::ResetRegion( region ) wxRegion* region CODE: THIS->Reset( *region ); void wxRegionIterator::Reset( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( ResetVoid ) MATCH_REDISP( wxPliOvl_wreg, ResetRegion ) END_OVERLOAD( Wx::RegionIterator::Reset ) bool wxRegionIterator::HaveRects() wxCoord wxRegionIterator::GetX() wxCoord wxRegionIterator::GetY() wxCoord wxRegionIterator::GetW() wxCoord wxRegionIterator::GetWidth() wxCoord wxRegionIterator::GetH() wxCoord wxRegionIterator::GetHeight() wxRect* wxRegionIterator::GetRect() CODE: RETVAL = new wxRect( THIS->GetRect() ); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::Position #if WXPERL_W_VERSION_GE( 2, 9, 0 ) #include wxPosition* wxPosition::new( row = 0, column = 0 ) int row int column static void wxPosition::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxPosition::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Position", THIS, ST(0) ); delete THIS; int wxPosition::row( ... ) CODE: if( items > 1 ) THIS->SetRow( SvIV( ST(1) ) ); RETVAL = THIS->GetRow(); OUTPUT: RETVAL int wxPosition::col( ... ) CODE: if( items > 1 ) THIS->SetCol( SvIV( ST(1) ) ); RETVAL = THIS->GetCol(); OUTPUT: RETVAL int wxPosition::column( ... ) CODE: if( items > 1 ) THIS->SetColumn( SvIV( ST(1) ) ); RETVAL = THIS->GetColumn(); OUTPUT: RETVAL int wxPosition::GetRow() int wxPosition::GetCol() int wxPosition::GetColumn() void wxPosition::SetRow( height ) int height void wxPosition::SetCol( width ) int width void wxPosition::SetColumn( width ) int width #endif Wx-0.9923/XS/GraphicsContext.xs000664000000000000 2555312306612233 14524 0ustar00Mark000000000000############################################################################# ## Name: XS/GraphicsContext.xs ## Purpose: XS for Wx::GraphicsContext ## Author: Klaas Hartmann ## Modified by: ## Created: 29/06/2007 ## RCS-ID: $Id: GraphicsContext.xs 3045 2011-03-24 16:20:59Z mdootson $ ## Copyright: (c) 2007, 2009-2010 Klaas Hartmann ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxUSE_GRAPHICS_CONTEXT #include #include #include "cpp/streams.h" #include "cpp/overload.h" MODULE=Wx PACKAGE=Wx::GraphicsContext ## // not deleteable if created from wxGCDC::GetGraphicsContext ## // override wxGraphicsObject CLONE and DESTROY methods ## // default return for wxPli_object_is_deleteable should be true static void wxGraphicsContext::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxGraphicsContext::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; # DECLARE_OVERLOAD( wmdc, Wx::MemoryDC ) # DECLARE_OVERLOAD( wwdc, Wx::WindowDC ) # DECLARE_OVERLOAD( wpdc, Wx::PrinterDC ) void Create ( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP_FUNCTION( Wx::GraphicsContext::createMeasuringContext ) MATCH_REDISP_FUNCTION(wxPliOvl_wwin, Wx::GraphicsContext::createFromWindow) #if defined(__WXMSW__) || WXPERL_W_VERSION_GE( 2, 9, 0 ) MATCH_REDISP_FUNCTION(wxPliOvl_wmdc, Wx::GraphicsContext::createFromMemoryDC) #endif #if wxPERL_USE_PRINTING_ARCHITECTURE && WXPERL_W_VERSION_GE( 2, 9, 0 ) MATCH_REDISP_FUNCTION(wxPliOvl_wpdc, Wx::GraphicsContext::createFromPrinterDC) #endif MATCH_REDISP_FUNCTION(wxPliOvl_wwdc, Wx::GraphicsContext::createFromWindowDC) END_OVERLOAD( "Wx::GraphicsContext::Create" ) wxGraphicsContext* createFromWindow ( window ) wxWindow* window CODE: RETVAL = wxGraphicsContext::Create( window ); OUTPUT: RETVAL wxGraphicsContext* createFromWindowDC (dc ) wxWindowDC* dc CODE: RETVAL = wxGraphicsContext::Create(*dc); OUTPUT: RETVAL #if wxPERL_USE_PRINTING_ARCHITECTURE && WXPERL_W_VERSION_GE( 2, 9, 0 ) wxGraphicsContext* createFromPrinterDC (dc ) wxPrinterDC* dc CODE: RETVAL = wxGraphicsContext::Create(*dc); OUTPUT: RETVAL #endif #if defined(__WXMSW__) || WXPERL_W_VERSION_GE( 2, 9, 0 ) wxGraphicsContext* createFromMemoryDC (dc ) wxMemoryDC* dc CODE: RETVAL = wxGraphicsContext::Create(*dc); OUTPUT: RETVAL #endif wxGraphicsContext* createMeasuringContext () CODE: RETVAL = wxGraphicsContext::Create(); OUTPUT: RETVAL wxGraphicsPen* wxGraphicsContext::CreatePen ( pen ) wxPen* pen CODE: RETVAL = new wxGraphicsPen( THIS->CreatePen(*pen) ); OUTPUT: RETVAL wxGraphicsBrush* wxGraphicsContext::CreateBrush ( brush ) wxBrush* brush CODE: RETVAL = new wxGraphicsBrush( THIS->CreateBrush(*brush) ); OUTPUT: RETVAL wxGraphicsBrush* wxGraphicsContext::CreateRadialGradientBrush (xo,yo,xc,yc,radius,oColor, cColor) wxDouble xo wxDouble yo wxDouble xc wxDouble yc wxDouble radius wxColour* oColor wxColour* cColor CODE: RETVAL = new wxGraphicsBrush( THIS->CreateRadialGradientBrush(xo,yo,xc,yc,radius,*oColor,*cColor) ); OUTPUT: RETVAL wxGraphicsBrush* wxGraphicsContext::CreateLinearGradientBrush (x1,y1,x2,y2,c1,c2) wxDouble x1 wxDouble y1 wxDouble x2 wxDouble y2 wxColour* c1 wxColour* c2 CODE: RETVAL = new wxGraphicsBrush( THIS->CreateLinearGradientBrush(x1,y1,x2,y2,*c1,*c2) ); OUTPUT: RETVAL wxGraphicsFont* wxGraphicsContext::CreateFont (font, col = (wxColour*)wxBLACK ) wxFont* font wxColour* col CODE: RETVAL = new wxGraphicsFont( THIS->CreateFont(*font, *col) ); OUTPUT: RETVAL wxGraphicsMatrix* wxGraphicsContext::CreateMatrix ( a = 1.0, b = 0.0, c = 0.0, d = 1.0, tx = 0.0, ty = 0.0) wxDouble a wxDouble b wxDouble c wxDouble d wxDouble tx wxDouble ty CODE: RETVAL = new wxGraphicsMatrix( THIS->CreateMatrix(a,b,c,d,tx,ty) ); OUTPUT: RETVAL wxGraphicsPath* wxGraphicsContext::CreatePath () CODE: RETVAL = new wxGraphicsPath( THIS->CreatePath() ); OUTPUT: RETVAL void Clip ( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP(wxPliOvl_n_n_n_n, ClipXYWH) MATCH_REDISP(wxPliOvl_wreg, ClipRegion) END_OVERLOAD( "Wx::GraphicsContext::Clip" ) void wxGraphicsContext::ClipXYWH (x, y, w, h) wxDouble x wxDouble y wxDouble w wxDouble h CODE: THIS->Clip (x, y, w, h); void wxGraphicsContext::ClipRegion (region) wxRegion* region CODE: THIS->Clip (*region); void wxGraphicsContext::ResetClip () void wxGraphicsContext::DrawBitmap (bitmap, x, y, w, h) wxBitmap* bitmap wxDouble x wxDouble y wxDouble w wxDouble h CODE: THIS->DrawBitmap( *bitmap, x, y, w, h ); void wxGraphicsContext::DrawEllipse(x, y, w, h) wxDouble x wxDouble y wxDouble w wxDouble h void wxGraphicsContext::DrawIcon(icon, x, y, w, h) wxIcon* icon wxDouble x wxDouble y wxDouble w wxDouble h CODE: THIS->DrawIcon( *icon, x, y, w, h ); void wxGraphicsContext::DrawLines ( points, fillStyle = wxODDEVEN_RULE ) SV* points wxPolygonFillMode fillStyle CODE: wxPliArrayGuard newPoints; int n = wxPli_av_2_point2ddoublearray(aTHX_ points, newPoints.lvalue()); THIS->DrawLines(n,newPoints); void wxGraphicsContext::DrawPath (path, fillStyle = wxODDEVEN_RULE) wxGraphicsPath *path wxPolygonFillMode fillStyle CODE: THIS->DrawPath( *path, fillStyle ); void wxGraphicsContext::DrawRectangle (x, y, w, h) wxDouble x wxDouble y wxDouble w wxDouble h void wxGraphicsContext::DrawRoundedRectangle (x, y, w, h, radius) wxDouble x wxDouble y wxDouble w wxDouble h wxDouble radius void wxGraphicsContext::DrawText ( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP(wxPliOvl_s_n_n_n, DrawTextAngle) MATCH_REDISP(wxPliOvl_s_n_n, DrawTextNoAngle) END_OVERLOAD( "Wx::GraphicsContext::DrawText" ) void wxGraphicsContext::DrawTextAngle ( string, x, y, angle ) wxString string wxDouble x wxDouble y wxDouble angle CODE: THIS->DrawText(string,x,y,angle); void wxGraphicsContext::DrawTextNoAngle ( string, x, y ) wxString string wxDouble x wxDouble y CODE: THIS->DrawText(string,x,y); void wxGraphicsContext::FillPath (path, fillStyle = wxODDEVEN_RULE) wxGraphicsPath *path wxPolygonFillMode fillStyle CODE: THIS->FillPath ( *path, fillStyle ); void wxGraphicsContext::StrokePath ( path ) wxGraphicsPath *path; CODE: THIS->StrokePath ( *path ); ## Adapted from wxDC void wxGraphicsContext::GetTextExtent( string ) wxString string PREINIT: wxDouble x, y, descent, externalLeading; PPCODE: THIS->GetTextExtent( string, &x, &y, &descent, &externalLeading); EXTEND( SP, 4 ); PUSHs( sv_2mortal( newSVnv( x ) ) ); PUSHs( sv_2mortal( newSVnv( y ) ) ); PUSHs( sv_2mortal( newSVnv( descent ) ) ); PUSHs( sv_2mortal( newSVnv( externalLeading ) ) ); # Adapted from wxDC void wxGraphicsContext::GetPartialTextExtents( string ) wxString string PREINIT: wxArrayDouble widths; PPCODE: THIS->GetPartialTextExtents( string, widths ); PUTBACK; wxPli_doublearray_push( aTHX_ widths ); SPAGAIN; void wxGraphicsContext::Rotate ( angle ) wxDouble angle void wxGraphicsContext::Scale ( x, y ) wxDouble x wxDouble y void wxGraphicsContext::Translate ( x, y ) wxDouble x wxDouble y wxGraphicsMatrix* wxGraphicsContext::GetTransform () CODE: RETVAL = new wxGraphicsMatrix( THIS->GetTransform() ); OUTPUT: RETVAL void wxGraphicsContext::SetTransform (matrix) wxGraphicsMatrix* matrix CODE: THIS->SetTransform(*matrix); void wxGraphicsContext::ConcatTransform (matrix) wxGraphicsMatrix* matrix CODE: THIS->ConcatTransform(*matrix); # DECLARE_OVERLOAD( wbru, Wx::Brush ) # DECLARE_OVERLOAD( wgbr, Wx::GraphicsBrush ) # DECLARE_OVERLOAD( wfon, Wx::Font ) # DECLARE_OVERLOAD( wgfo, Wx::GraphicsFont ) # DECLARE_OVERLOAD( wpen, Wx::Pen ) # DECLARE_OVERLOAD( wgpe, Wx::GraphicsPen ) # DECLARE_OVERLOAD( wcol, Wx::Colour ) void SetBrush ( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP(wxPliOvl_wbru, SetBrushBrush) MATCH_REDISP(wxPliOvl_wgbr, SetBrushGraphics) END_OVERLOAD( "Wx::GraphicsContext::SetBrush" ) void wxGraphicsContext::SetBrushBrush (brush) wxBrush* brush CODE: THIS->SetBrush( *brush ); void wxGraphicsContext::SetBrushGraphics (brush) wxGraphicsBrush* brush CODE: THIS->SetBrush( *brush ); void SetFont ( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP(wxPliOvl_wfon_wcol, SetFontFont) MATCH_REDISP(wxPliOvl_wgfo, SetFontGraphics) END_OVERLOAD( "Wx::GraphicsContext::SetFont" ) void wxGraphicsContext::SetFontFont (font, colour) wxFont* font wxColour* colour CODE: THIS->SetFont(*font, *colour); void wxGraphicsContext::SetFontGraphics (font) wxGraphicsFont* font CODE: THIS->SetFont(*font); void SetPen ( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP(wxPliOvl_wpen, SetPenPen) MATCH_REDISP(wxPliOvl_wgpe, SetPenGraphics) END_OVERLOAD( "Wx::GraphicsContext::SetPen" ) void wxGraphicsContext::SetPenPen (pen) wxPen* pen CODE: THIS->SetPen( *pen ); void wxGraphicsContext::SetPenGraphics (pen) wxGraphicsPen* pen CODE: THIS->SetPen( *pen ); void wxGraphicsContext::StrokeLine (x1,y1,x2,y2) wxDouble x1 wxDouble y1 wxDouble x2 wxDouble y2 ##Used wpoi's for overload checking as opposed to arr's ##We want array references (which wpoi matches) but arr ##causes some problems... void wxGraphicsContext::StrokeLines ( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP(wxPliOvl_wpoi_wpoi, StrokeLinesTwo) MATCH_REDISP(wxPliOvl_wpoi, StrokeLinesOne) END_OVERLOAD( "Wx::GraphicsContext::StrokeLines" ) void wxGraphicsContext::StrokeLinesOne ( points ) SV* points CODE: wxPliArrayGuard points2d; int n = wxPli_av_2_point2ddoublearray(aTHX_ points, points2d.lvalue()); THIS->StrokeLines(n,points2d); void wxGraphicsContext::StrokeLinesTwo ( beginPoints, endPoints ) SV* beginPoints SV* endPoints CODE: wxPliArrayGuard beginPoints2d, endPoints2d; int n1 = wxPli_av_2_point2ddoublearray(aTHX_ beginPoints, beginPoints2d.lvalue()); int n2 = wxPli_av_2_point2ddoublearray(aTHX_ endPoints, endPoints2d.lvalue()); THIS->StrokeLines(wxMin(n1, n2), beginPoints2d, endPoints2d); void wxGraphicsContext::PopState() void wxGraphicsContext::PushState() #endif Wx-0.9923/XS/GraphicsMatrix.xs000664000000000000 430712306612233 14316 0ustar00Mark000000000000############################################################################# ## Name: XS/GraphicsMatrix.xs ## Purpose: XS for Wx::GraphicsMatrix ## Author: Klaas Hartmann ## Modified by: ## Created: 29/06/2007 ## RCS-ID: $Id: GraphicsMatrix.xs 2110 2007-08-03 19:20:51Z mbarbon $ ## Copyright: (c) 2007 Klaas Hartmann ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxUSE_GRAPHICS_CONTEXT #include MODULE=Wx PACKAGE=Wx::GraphicsMatrix void wxGraphicsMatrix::Concat ( t ) wxGraphicsMatrix* t void wxGraphicsMatrix::Get ( ) PREINIT: wxDouble a, b, c, d, tx, ty; PPCODE: THIS->Get( &a, &b, &c, &d, &tx, &ty ); EXTEND( SP, 6 ); PUSHs( sv_2mortal( newSVnv( a ) ) ); PUSHs( sv_2mortal( newSVnv( b ) ) ); PUSHs( sv_2mortal( newSVnv( c ) ) ); PUSHs( sv_2mortal( newSVnv( d ) ) ); PUSHs( sv_2mortal( newSVnv( tx ) ) ); PUSHs( sv_2mortal( newSVnv( ty ) ) ); void wxGraphicsMatrix::Invert () bool wxGraphicsMatrix::IsEqual ( t ) wxGraphicsMatrix* t C_ARGS: *t bool wxGraphicsMatrix::IsIdentity () void wxGraphicsMatrix::Rotate (angle) wxDouble angle void wxGraphicsMatrix::Scale (xScale, yScale) wxDouble xScale wxDouble yScale void wxGraphicsMatrix::Translate (dx, dy) wxDouble dx wxDouble dy void wxGraphicsMatrix::Set (a, b, c, d, tx, ty) wxDouble a wxDouble b wxDouble c wxDouble d wxDouble tx wxDouble ty void wxGraphicsMatrix::TransformPoint ( x, y ) wxDouble x wxDouble y PREINIT: wxDouble x_out, y_out; PPCODE: x_out = x; y_out = y; THIS->TransformPoint( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSVnv( x ) ) ); PUSHs( sv_2mortal( newSVnv( y ) ) ); void wxGraphicsMatrix::TransformDistance ( dx, dy ) wxDouble dx wxDouble dy PREINIT: wxDouble dx_out, dy_out; PPCODE: dx_out = dx; dy_out = dy; THIS->TransformDistance( &dx, &dy ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSVnv( dx ) ) ); PUSHs( sv_2mortal( newSVnv( dy ) ) ); #endif Wx-0.9923/XS/GraphicsObject.xs000664000000000000 222512306612233 14255 0ustar00Mark000000000000############################################################################# ## Name: XS/GraphicsObject.xs ## Purpose: XS for Wx::GraphicsObject ## Author: Mattia Barbon ## Modified by: ## Created: 30/09/2007 ## RCS-ID: $Id: GraphicsObject.xs 2233 2007-09-30 20:32:31Z mbarbon $ ## Copyright: (c) 2007 Klaas Hartmann ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxUSE_GRAPHICS_CONTEXT #include MODULE=Wx PACKAGE=Wx::GraphicsObject static void wxGraphicsObject::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxGraphicsObject::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) ); delete THIS; wxGraphicsRenderer* wxGraphicsObject::GetRenderer() bool wxGraphicsObject::IsNull() MODULE=Wx PACKAGE=Wx::GraphicsBrush MODULE=Wx PACKAGE=Wx::GraphicsPen MODULE=Wx PACKAGE=Wx::GraphicsFont #endif Wx-0.9923/XS/GraphicsPath.xs000664000000000000 653212306612233 13750 0ustar00Mark000000000000############################################################################# ## Name: XS/GraphicsPath.xs ## Purpose: XS for Wx::GraphicsPath ## Author: Klaas Hartmann ## Modified by: ## Created: 29/06/2007 ## RCS-ID: $Id: GraphicsPath.xs 2523 2009-02-04 23:50:57Z mbarbon $ ## Copyright: (c) 2007, 2009 Klaas Hartmann ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# ## There are several overloaded functions (see below) where one variant takes a ## wxPoint2DDouble and the other takes x and y values individually. In these ## cases the former variant has not been implemented. Feel free to do so! ## ## Unimplemented overloaded functions ## void MoveToPoint(const wxPoint2DDouble& p) ## void AddArc(const wxPoint2DDouble& c, wxDouble r, wxDouble startAngle, wxDouble endAngle, bool clockwise) ## void AddCurveToPoint(const wxPoint2DDouble& c1, const wxPoint2DDouble& c2, const wxPoint2DDouble& e) ## void AddLineToPoint(const wxPoint2DDouble& p) ## bool Contains(const wxPoint2DDouble& c, int fillStyle = wxODDEVEN_RULE) const #if wxUSE_GRAPHICS_CONTEXT #include MODULE=Wx PACKAGE=Wx::GraphicsPath void wxGraphicsPath::MoveToPoint (x, y) wxDouble x wxDouble y void wxGraphicsPath::AddArc(x,y,r,startAngle,endAngle,clockwise ) wxDouble x wxDouble y wxDouble r wxDouble startAngle wxDouble endAngle bool clockwise void wxGraphicsPath::AddArcToPoint ( x1, y1, x2, y2, r) wxDouble x1 wxDouble y1 wxDouble x2 wxDouble y2 wxDouble r void wxGraphicsPath::AddCircle ( x, y, r) wxDouble x wxDouble y wxDouble r void wxGraphicsPath::AddCurveToPoint (cx1, cy1, cx2, cy2, x, y) wxDouble cx1 wxDouble cy1 wxDouble cx2 wxDouble cy2 wxDouble x wxDouble y void wxGraphicsPath::AddEllipse ( x, y, w, h) wxDouble x wxDouble y wxDouble w wxDouble h void wxGraphicsPath::AddLineToPoint ( x, y) wxDouble x wxDouble y void wxGraphicsPath::AddPath (path) wxGraphicsPath* path CODE: THIS->AddPath(*path); void wxGraphicsPath::AddQuadCurveToPoint (cx, cy, x, y) wxDouble cx wxDouble cy wxDouble x wxDouble y void wxGraphicsPath::AddRectangle (x, y, w, h) wxDouble x wxDouble y wxDouble w wxDouble h void wxGraphicsPath::AddRoundedRectangle (x, y, w, h, radius) wxDouble x wxDouble y wxDouble w wxDouble h wxDouble radius void wxGraphicsPath::CloseSubpath ( ) bool wxGraphicsPath::Contains (x, y, fillStyle = wxODDEVEN_RULE) wxDouble x wxDouble y wxPolygonFillMode fillStyle void wxGraphicsPath::GetBox ( ) PREINIT: wxDouble x, y, w, h; PPCODE: THIS->GetBox( &x, &y, &w, &h ); EXTEND( SP, 4 ); PUSHs( sv_2mortal( newSVnv( x ) ) ); PUSHs( sv_2mortal( newSVnv( y ) ) ); PUSHs( sv_2mortal( newSVnv( w ) ) ); PUSHs( sv_2mortal( newSVnv( h ) ) ); void wxGraphicsPath::GetCurrentPoint ( ) PREINIT: wxDouble x, y; PPCODE: THIS->GetCurrentPoint( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSVnv( x ) ) ); PUSHs( sv_2mortal( newSVnv( y ) ) ); void wxGraphicsPath::Transform (matrix) wxGraphicsMatrix* matrix CODE: THIS->Transform( *matrix ); #endif Wx-0.9923/XS/GraphicsRenderer.xsp000664000000000000 1322512306612233 15017 0ustar00Mark000000000000############################################################################# ## Name: XS/GraphicsRenderer.xsp ## Purpose: XS for Wx::GraphicsRenderer ## Author: Mattia Barbon ## Modified by: ## Created: 30/09/2007 ## RCS-ID: $Id: GraphicsRenderer.xsp 2952 2010-08-15 10:38:47Z mbarbon $ ## Copyright: (c) 2007, 2010 Klaas Hartmann ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %module{Wx}; %loadplugin{build::Wx::XSP::Overload}; #if wxUSE_GRAPHICS_CONTEXT #include ## DECLARE_OVERLOAD( wmdc, Wx::MemoryDC ) ## DECLARE_OVERLOAD( wwdc, Wx::WindowDC ) ## DECLARE_OVERLOAD( wpdc, Wx::PrinterDC ) #if WXPERL_W_VERSION_GE( 2, 9, 1 ) %typemap{wxColour}{parsed}{%wxColour%}; %name{Wx::GraphicsGradientStop} class wxGraphicsGradientStop { public: wxGraphicsGradientStop( wxColour col = wxTransparentColour, float pos = 0.); %{ static void wxGraphicsGradientStop::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxGraphicsGradientStop::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::GraphicsGradientStop", THIS, ST(0) ); delete THIS; %} const wxColour& GetColour() const; void SetColour( const wxColour& col ); float GetPosition() const; void SetPosition( float pos ); }; %typemap{const wxGraphicsGradientStop&}{reference}; %name{Wx::GraphicsGradientStops} class wxGraphicsGradientStops { public: wxGraphicsGradientStops( wxColour startCol = wxTransparentColour, wxColour endCol = wxTransparentColour ); %{ static void wxGraphicsGradientStops::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxGraphicsGradientStops::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::GraphicsGradientStop", THIS, ST(0) ); delete THIS; %} // Add a stop in correct order. %name{AddStop} void Add( const wxGraphicsGradientStop& stop ) %Overload; %name{AddColour} void Add( wxColour col, float pos ) %Overload; // Get the number of stops. unsigned GetCount() const; // Return the stop at the given index (which must be valid). const wxGraphicsGradientStop& Item( unsigned n ) const; // Get/set start and end colours. void SetStartColour( wxColour col ); const wxColour& GetStartColour() const; void SetEndColour( wxColour col ); const wxColour& GetEndColour() const; }; %typemap{const wxGraphicsGradientStops&}{reference}; #endif %name{Wx::GraphicsRenderer} class wxGraphicsRenderer { %{ wxGraphicsRenderer* GetDefaultRenderer() CODE: RETVAL = wxGraphicsRenderer::GetDefaultRenderer(); OUTPUT: RETVAL void CreateContext( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wwin, CreateFromWindow ) #if defined(__WXMSW__) || WXPERL_W_VERSION_GE( 2, 9, 0 ) MATCH_REDISP( wxPliOvl_wmdc, CreateFromMemoryDC) #endif #if wxPERL_USE_PRINTING_ARCHITECTURE && WXPERL_W_VERSION_GE( 2, 9, 0 ) MATCH_REDISP( wxPliOvl_wpdc, CreateFromPrinterDC) #endif MATCH_REDISP( wxPliOvl_wwdc, CreateFromWindowDC ) END_OVERLOAD( "Wx::GraphicsRenderer::CreateContext" ) %} %name{CreateFromWindowDC} wxGraphicsContext* CreateContext( const wxWindowDC& dc ); %name{CreateFromWindow} wxGraphicsContext* CreateContext( wxWindow* window ); #if defined(__WXMSW__) || WXPERL_W_VERSION_GE( 2, 9, 0 ) %name{CreateFromMemoryDC} wxGraphicsContext* CreateContext( const wxMemoryDC& dc ); #endif #if wxPERL_USE_PRINTING_ARCHITECTURE && WXPERL_W_VERSION_GE( 2, 9, 0 ) %name{CreateFromPrinterDC} wxGraphicsContext* CreateContext( const wxPrinterDC& dc ); #endif wxGraphicsContext* CreateMeasuringContext(); const wxGraphicsPath& CreatePath(); const wxGraphicsMatrix& CreateMatrix( wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, wxDouble tx=0.0, wxDouble ty=0.0 ); const wxGraphicsPen& CreatePen( const wxPen& pen ); const wxGraphicsBrush& CreateBrush( const wxBrush& brush ); #if WXPERL_W_VERSION_LT( 2, 9, 1 ) const wxGraphicsBrush& CreateLinearGradientBrush( wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2, const wxColour&c1, const wxColour&c2 ); const wxGraphicsBrush& CreateRadialGradientBrush( wxDouble xo, wxDouble yo, wxDouble xc, wxDouble yc, wxDouble radius, const wxColour &oColor, const wxColour &cColor ); #else const wxGraphicsBrush& CreateLinearGradientBrush( wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2, const wxGraphicsGradientStops& stops ); const wxGraphicsBrush& CreateRadialGradientBrush( wxDouble xo, wxDouble yo, wxDouble xc, wxDouble yc, wxDouble radius, const wxGraphicsGradientStops& stops ); #endif #define wxBLACKPtr (wxColour*)wxBLACK const wxGraphicsFont& CreateFont( const wxFont& font, const wxColour& col = wxBLACKPtr ); }; #endif Wx-0.9923/XS/GridBagSizer.xsp000664000000000000 1721312306612233 14105 0ustar00Mark000000000000############################################################################# ## Name: XS/GridBagSizer.xsp ## Purpose: XS for Wx::GridBagSizer ## Author: Mattia Barbon ## Modified by: ## Created: 310/11/2003 ## RCS-ID: $Id: GridBagSizer.xsp 2969 2010-08-28 11:25:37Z mbarbon $ ## Copyright: (c) 2003, 2005-2007, 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}; #if WXPERL_W_VERSION_GE( 2, 5, 1 ) #define wxPlDefaultSpan (wxGBSpan*)&wxDefaultSpan #include ## DECLARE_OVERLOAD( wgbp, Wx::GBPosition ) ## DECLARE_OVERLOAD( wgbs, Wx::GBSpan ) ## DECLARE_OVERLOAD( wgbi, Wx::GBSizerItem ) %typemap{wxGridBagSizer *}{simple}; %typemap{wxGBPosition *}{simple}; %typemap{wxGBSpan *}{simple}; %typemap{wxGBSizerItem *}{simple}; %typemap{const wxGBSizerItem&}{reference}; %typemap{wxGBPosition}{reference}; %typemap{const wxGBPosition&}{reference}; %typemap{wxGBSpan}{reference}; %typemap{const wxGBSpan&}{reference}; %name{Wx::GBPosition} class wxGBPosition { wxGBPosition(int row = 0, int col = 0); int GetRow() const; int GetCol() const; void SetRow(int row); void SetCol(int col); ## bool operator==(const wxGBPosition& p) const; ## bool operator!=(const wxGBPosition& p) const; }; %name{Wx::GBSpan} class wxGBSpan { wxGBSpan(int rowspan = 1, int colspan = 1); int GetRowspan() const; int GetColspan() const; void SetRowspan(int rowspan); void SetColspan(int colspan); ## bool operator==(const wxGBSpan& o) const; ## bool operator!=(const wxGBSpan& o) const; }; %name{Wx::GBSizerItem} class wxGBSizerItem { wxGBPosition GetPos() const; %{ void wxGBSizerItem::GetPosXY() PPCODE: int x, y; THIS->GetPos( x, y ); wxPli_push_2ints( x, y ); %} wxGBSpan GetSpan() const; %{ void wxGBSizerItem::GetSpanWH() PPCODE: int x, y; THIS->GetSpan( x, y ); wxPli_push_2ints( x, y ); %} bool SetPos( const wxGBPosition& pos ); bool SetSpan( const wxGBSpan& span ); %name{IntersectsItem} bool Intersects(const wxGBSizerItem& other); %name{IntersectsPosition} bool Intersects(const wxGBPosition& pos, const wxGBSpan& span); %{ void wxGBSizerItem::Intersects( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wgbi, IntersectsItem ) MATCH_REDISP( wxPliOvl_wgbp_wgbs, IntersectsPosition ) END_OVERLOAD( Wx::GridBagSizer::Intersects ) %} %{ void wxGBSizerItem::GetEndPos() PPCODE: int x, y; THIS->GetEndPos( x, y ); wxPli_push_2ints( x, y ); %} wxGridBagSizer* GetGBSizer() const; void SetGBSizer(wxGridBagSizer* sizer); }; %name{Wx::GridBagSizer} class wxGridBagSizer { wxGridBagSizer(int vgap = 0, int hgap = 0 ); %name{AddWindow} bool Add( wxWindow *window, const wxGBPosition& pos, const wxGBSpan& span = wxPlDefaultSpan, int flag = 0, int border = 0, wxObject* userData = NULL ); %name{AddSizer} bool Add( wxSizer *sizer, const wxGBPosition& pos, const wxGBSpan& span = wxPlDefaultSpan, int flag = 0, int border = 0, wxObject* userData = NULL ); %name{AddSpace} bool Add( int width, int height, const wxGBPosition& pos, const wxGBSpan& span = wxPlDefaultSpan, int flag = 0, int border = 0, wxObject* userData = NULL ); %name{AddItem} bool Add( wxGBSizerItem *item ); wxSize GetEmptyCellSize() const; void SetEmptyCellSize(const wxSize& sz); wxSize GetCellSize(int row, int col) const; %name{GetItemPositionWindow} wxGBPosition GetItemPosition(wxWindow *window); %name{GetItemPositionSizer} wxGBPosition GetItemPosition(wxSizer *sizer); %name{GetItemPositionIndex} wxGBPosition GetItemPosition(size_t index); %{ void wxGridBagSizer::GetItemPosition( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wwin, GetItemPositionWindow ) MATCH_REDISP( wxPliOvl_wszr, GetItemPositionSizer ) MATCH_REDISP( wxPliOvl_n, GetItemPositionIndex ) END_OVERLOAD( Wx::GridBagSizer::GetItemPosition ) %} %name{SetItemPositionWindow} bool SetItemPosition(wxWindow *window, const wxGBPosition& pos); %name{SetItemPositionSizer} bool SetItemPosition(wxSizer *sizer, const wxGBPosition& pos); %name{SetItemPositionIndex} bool SetItemPosition(size_t index, const wxGBPosition& pos); %{ void wxGridBagSizer::SetItemPosition( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wwin_wgbp, SetItemPositionWindow ) MATCH_REDISP( wxPliOvl_wszr_wgbp, SetItemPositionSizer ) MATCH_REDISP( wxPliOvl_n_wgbp, SetItemPositionIndex ) END_OVERLOAD( Wx::GridBagSizer::SetItemPosition ) %} %name{GetItemSpanWindow} wxGBSpan GetItemSpan(wxWindow *window); %name{GetItemSpanSizer} wxGBSpan GetItemSpan(wxSizer *sizer); %name{GetItemSpanIndex} wxGBSpan GetItemSpan(size_t index); %{ void wxGridBagSizer::GetItemSpan( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wwin, GetItemSpanWindow ) MATCH_REDISP( wxPliOvl_wszr, GetItemSpanSizer ) MATCH_REDISP( wxPliOvl_n, GetItemSpanIndex ) END_OVERLOAD( Wx::GridBagSizer::GetItemSpan ) %} %name{SetItemSpanWindow} bool SetItemSpan(wxWindow *window, const wxGBSpan& span); %name{SetItemSpanSizer} bool SetItemSpan(wxSizer *sizer, const wxGBSpan& span); %name{SetItemSpanIndex} bool SetItemSpan(size_t index, const wxGBSpan& span); %{ void wxGridBagSizer::SetItemSpan( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wwin_wgbs, SetItemSpanWindow ) MATCH_REDISP( wxPliOvl_wszr_wgbs, SetItemSpanSizer ) MATCH_REDISP( wxPliOvl_n_wgbs, SetItemSpanIndex ) END_OVERLOAD( Wx::GridBagSizer::SetItemSpan ) %} %name{FindItemWindow} wxGBSizerItem* FindItem(wxWindow* window); %name{FindItemSizer} wxGBSizerItem* FindItem(wxSizer* sizer); %{ void wxGridBagSizer::FindItem( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wwin, FindItemWindow ) MATCH_REDISP( wxPliOvl_wszr, FindItemSizer ) END_OVERLOAD( Wx::GridBagSizer::FindItem ) %} wxGBSizerItem* FindItemAtPosition(const wxGBPosition& pos); wxGBSizerItem* FindItemAtPoint(const wxPoint& pt); ## wxGBSizerItem* FindItemWithData(const wxObject* userData); %name{CheckForIntersectionItem} bool CheckForIntersection(wxGBSizerItem* item, wxGBSizerItem* excludeItem = NULL); %name{CheckForIntersectionPos} bool CheckForIntersection(const wxGBPosition& pos, const wxGBSpan& span, wxGBSizerItem* excludeItem = NULL); %{ void wxGridBagSizer::CheckForIntersection( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wgbi_wgbi, CheckForIntersectionItem, 1 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wgbp_wgbs_wgbi, CheckForIntersectionPos, 2 ) END_OVERLOAD( Wx::GridBagSizer::CheckForIntersection ) %} }; {% MODULE=Wx PACKAGE=Wx::GridBagSizer void wxGridBagSizer::Add( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wwin_wgbp_wgbs_n_n_s, AddWindow, 1 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wszr_wgbp_wgbs_n_n_s, AddSizer, 1 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_n_wgbp_wgbs_n_n_s, AddSpace, 2 ) MATCH_REDISP_COUNT( wxPliOvl_wgbi, AddItem, 1 ) END_OVERLOAD( Wx::GridBagSizer::Add ) %} #endif Wx-0.9923/XS/HyperlinkCtrl.xsp000664000000000000 513312306612233 14341 0ustar00Mark000000000000############################################################################# ## Name: XS/HyperlinkCtrl.xsp ## Purpose: XS++ for Wx::HyperlinkCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 30/07/2006 ## RCS-ID: $Id: HyperlinkCtrl.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2006 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}; %typemap{wxHyperlinkCtrl*}{simple}; %{ #if WXPERL_W_VERSION_GE( 2, 7, 0 ) #include %} %name{Wx::HyperlinkCtrl} class wxHyperlinkCtrl { %name{newDefault} wxHyperlinkCtrl() %code{% RETVAL = new wxHyperlinkCtrl(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxHyperlinkCtrl( wxWindow *parent, wxWindowID id, const wxString& label, const wxString& url, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxHyperlinkCtrlNameStr ) %code{% RETVAL = new wxHyperlinkCtrl( parent, id, label, url, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id, const wxString& label, const wxString& url, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxHyperlinkCtrlNameStr ); wxColour GetHoverColour() const; void SetHoverColour( const wxColour& colour ); wxColour GetNormalColour() const; void SetNormalColour( const wxColour& colour ); wxColour GetVisitedColour() const; void SetVisitedColour( const wxColour& colour ); wxString GetURL() const; void SetURL ( const wxString& url ); void SetVisited( bool visited = true ); bool GetVisited(); }; %name{Wx::HyperlinkEvent} class wxHyperlinkEvent { wxString GetURL(); void SetURL( const wxString& url ); }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::HyperlinkCtrl::new" ) %} %{ #endif %} Wx-0.9923/XS/Icon.xs000664000000000000 754112306612233 12264 0ustar00Mark000000000000############################################################################# ## Name: XS/Icon.xs ## Purpose: XS for Wx::Icon ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Icon.xs 2517 2008-11-30 20:14:22Z mbarbon $ ## Copyright: (c) 2000-2004, 2006-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx #if !defined( __WXMSW__ ) #include "wxpl.xpm" #endif wxIcon* GetWxPerlIcon( get_small = false ) bool get_small CODE: #if defined( __WXMSW__ ) int sz = get_small ? 16 : 32; RETVAL = new wxIcon( wxT("wxplicon"), wxBITMAP_TYPE_ICO_RESOURCE, -1, -1 ); if( !RETVAL->Ok() ) croak( "Unable to load icon" ); #else char** image = (char**)( get_small ? wxpl16_xpm : wxpl32_xpm ); RETVAL = new wxIcon( image ); #endif OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::Icon ## DECLARE_OVERLOAD( wilo, Wx::IconLocation ) void wxIcon::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newNull ) MATCH_REDISP( wxPliOvl_wilo, newLocation ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n_n_n, newFile, 2 ) END_OVERLOAD( Wx::Icon::new ) wxIcon* newNull( CLASS ) SV* CLASS CODE: RETVAL = new wxIcon(); OUTPUT: RETVAL wxIcon* newFile( CLASS, name, type, desW = -1, desH = -1 ) SV* CLASS wxString name long type int desW int desH CODE: #if defined( __WXMOTIF__ ) || defined( __WXX11__ ) || defined( __WXGTK__ ) \ || WXPERL_W_VERSION_GE( 2, 9, 0 ) RETVAL = new wxIcon( name, wxBitmapType(type), desW, desH ); #else RETVAL = new wxIcon( name, type, desW, desH ); #endif OUTPUT: RETVAL #if defined( __WXGTK__ ) || defined( __WXPERL_FORCE__ ) ##wxIcon* ##newFromBits( bits, width, height, depth = 1 ) ## SV* bits ## int width ## int height ## int depth ## PREINIT: ## void* buffer = SvPV_nolen( bits ); ## CODE: ## RETVAL = new wxIcon( buffer, width, height, depth ); ## OUTPUT: ## RETVAL #endif wxIcon* newFromXPM( CLASS, data ) SV* CLASS SV* data PREINIT: char** xpm_data; size_t i, n = wxPli_av_2_charparray( aTHX_ data, &xpm_data ); CODE: RETVAL = new wxIcon( xpm_data ); for( i = 0; i < n; ++i ) free( xpm_data[i] ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 5, 2 ) wxIcon* newLocation( CLASS, location ) SV* CLASS wxIconLocation* location CODE: RETVAL = new wxIcon( *location ); OUTPUT: RETVAL #endif static void wxIcon::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxIcon::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Icon", THIS, ST(0) ); delete THIS; bool wxIcon::LoadFile( name, type ) wxString name long type CODE: #if defined( __WXMOTIF__ ) #if WXPERL_W_VERSION_GE( 2, 5, 1 ) RETVAL = THIS->LoadFile( name, wxBitmapType(type), -1, -1 ); #else RETVAL = THIS->LoadFile( name, type, -1, -1 ); #endif #else #if defined( __WXX11__ ) || defined( __WXMAC__ ) || defined( __WXGTK__ ) \ || ( defined(__WXMSW__) && WXPERL_W_VERSION_GE( 2, 9, 0 ) ) RETVAL = THIS->LoadFile( name, wxBitmapType(type) ); #else RETVAL = THIS->LoadFile( name, type ); #endif #endif OUTPUT: RETVAL bool wxIcon::Ok() #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool wxIcon::IsOk() #endif void wxIcon::CopyFromBitmap( bitmap ) wxBitmap* bitmap C_ARGS: *bitmap #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) int wxIcon::GetDepth() int wxIcon::GetHeight() int wxIcon::GetWidth() void wxIcon::SetDepth( depth ) int depth void wxIcon::SetHeight( height ) int height void wxIcon::SetWidth( width ) int width #endif Wx-0.9923/XS/IconBundle.xsp000664000000000000 472312306612233 13575 0ustar00Mark000000000000############################################################################# ## 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 #include #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 ) %} Wx-0.9923/XS/Image.xs000664000000000000 4132512306612233 12434 0ustar00Mark000000000000############################################################################# ## Name: XS/Image.xs ## Purpose: XS for Wx::Image ## Author: Mattia Barbon ## Modified by: ## Created: 02/12/2000 ## RCS-ID: $Id: Image.xs 2626 2009-10-18 22:48:17Z mbarbon $ ## Copyright: (c) 2000-2003, 2005-2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include #include "cpp/streams.h" #include "cpp/overload.h" MODULE=Wx PACKAGE=Wx::Image void wxImage::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newNull ) MATCH_REDISP( wxPliOvl_wico, newIcon ) MATCH_REDISP( wxPliOvl_wbmp, newBitmap ) MATCH_REDISP( wxPliOvl_wist_n, newStreamType ) MATCH_REDISP( wxPliOvl_wist_s, newStreamMIME ) MATCH_REDISP_COUNT( wxPliOvl_n_n, newWH, 2 ) MATCH_REDISP( wxPliOvl_n_n_s, newData ) MATCH_REDISP( wxPliOvl_n_n_s_s, newDataAlpha ) MATCH_REDISP( wxPliOvl_s_n, newNameType ) MATCH_REDISP( wxPliOvl_s_s, newNameMIME ) END_OVERLOAD( Wx::Image::new ) wxImage* newNull( CLASS ) SV* CLASS CODE: RETVAL = new wxImage(); OUTPUT: RETVAL wxImage* newWH( CLASS, width, height ) SV* CLASS int width int height CODE: RETVAL = new wxImage( width, height ); OUTPUT: RETVAL wxImage* newData( CLASS, width, height, dt ) SV* CLASS int width int height SV* dt PREINIT: STRLEN len; unsigned char* data = (unsigned char*)SvPV( dt, len ); unsigned char* newdata; CODE: if( len != (STRLEN) width * height * 3 ) { croak( "not enough data in image constructor" ); } newdata = (unsigned char*)malloc( width * height * 3 ); memcpy( newdata, data, width * height * 3 ); RETVAL = new wxImage( width, height, newdata ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxImage* newDataAlpha( CLASS, width, height, dt, al ) SV* CLASS int width int height SV* dt SV* al PREINIT: STRLEN len_data, len_alpha; unsigned char* data = (unsigned char*)SvPV( dt, len_data ); unsigned char* alpha = (unsigned char*)SvPV( al, len_alpha ); CODE: if( len_data != (STRLEN) width * height * 3 || len_alpha != (STRLEN) width * height ) { croak( "not enough data in image constructor" ); } unsigned char* newdata = (unsigned char*) malloc( len_data ); memcpy( newdata, data, len_data ); unsigned char* newalpha = (unsigned char*) malloc( len_alpha ); memcpy( newalpha, alpha, len_alpha ); RETVAL = new wxImage( width, height, newdata, newalpha ); OUTPUT: RETVAL #endif wxImage* newNameType( CLASS, name, type, index = -1 ) SV* CLASS wxString name wxBitmapType type int index CODE: RETVAL = new wxImage( name, type, index ); OUTPUT: RETVAL wxImage* newNameMIME( CLASS, name, mimetype, index = -1 ) SV* CLASS wxString name wxString mimetype int index CODE: RETVAL = new wxImage( name, mimetype, index ); OUTPUT: RETVAL wxImage* newStreamType( CLASS, stream, type, index = -1 ) SV* CLASS wxPliInputStream stream wxBitmapType type int index CODE: RETVAL = new wxImage( stream, type, index ); OUTPUT: RETVAL wxImage* newStreamMIME( CLASS, stream, mime, index = -1 ) SV* CLASS wxPliInputStream stream wxString mime int index CODE: RETVAL = new wxImage( stream, mime, index ); OUTPUT: RETVAL wxImage* newBitmap( CLASS, bitmap ) wxBitmap* bitmap CODE: RETVAL = new wxImage( bitmap->ConvertToImage() ); OUTPUT: RETVAL wxImage* newIcon( CLASS, icon ) wxIcon* icon CODE: wxBitmap tmp; tmp.CopyFromIcon( *icon ); RETVAL = new wxImage( tmp.ConvertToImage() ); OUTPUT: RETVAL static void wxImage::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxImage::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Image", THIS, ST(0) ); delete THIS; void AddHandler( handler ) wxImageHandler* handler CODE: wxImage::AddHandler( handler ); wxImage* wxImage::ConvertToMono( r, g, b ) unsigned char r unsigned char g unsigned char b CODE: RETVAL = new wxImage( THIS->ConvertToMono( r, g, b ) ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 5, 3 ) bool wxImage::ConvertAlphaToMask( threshold = 128 ) unsigned char threshold #endif #if WXPERL_W_VERSION_GE( 2, 5, 4 ) bool wxImage::ConvertColourToAlpha( r, g, b ) unsigned char r unsigned char g unsigned char b #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) wxImage* wxImage::ConvertToGreyscale() CODE: RETVAL = new wxImage( THIS->ConvertToGreyscale() ); OUTPUT: RETVAL #endif wxImage* wxImage::Copy() CODE: RETVAL = new wxImage( THIS->Copy() ); OUTPUT: RETVAL void wxImage::Create( width, height ) int width int height void wxImage::Destroy() wxImageHandler* FindHandlerName( name ) wxString name CODE: RETVAL = wxImage::FindHandler( name ); OUTPUT: RETVAL wxImageHandler* FindHandlerExtType( extension, type ) wxString extension wxBitmapType type CODE: RETVAL = wxImage::FindHandler( extension, type ); OUTPUT: RETVAL wxImageHandler* FindHandlerType( type ) wxBitmapType type CODE: RETVAL = wxImage::FindHandler( type ); OUTPUT: RETVAL wxImageHandler* FindHandlerMime( mime ) wxString mime CODE: RETVAL = wxImage::FindHandlerMime( mime ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxImage::GetAlpha( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( GetAlphaData ) MATCH_REDISP( wxPliOvl_n_n, GetAlphaXY ) END_OVERLOAD( Wx::Image::GetAlpha ) unsigned char wxImage::GetAlphaXY( x, y ) int x int y CODE: RETVAL = THIS->GetAlpha( x, y ); OUTPUT: RETVAL SV* wxImage::GetAlphaData() CODE: unsigned char* alpha = THIS->GetAlpha(); if( alpha == NULL ) XSRETURN_UNDEF; RETVAL = newSVpvn( (char*) alpha, THIS->GetWidth() * THIS->GetHeight() ); OUTPUT: RETVAL #endif SV* wxImage::GetData() CODE: STRLEN len = THIS->GetWidth() * THIS->GetHeight() * 3; RETVAL = newSVpvn( (char*)THIS->GetData(), len ); OUTPUT: RETVAL unsigned char wxImage::GetBlue( x, y ) int x int y unsigned char wxImage::GetGreen( x, y ) int x int y unsigned char wxImage::GetRed( x, y ) int x int y int wxImage::GetHeight() unsigned char wxImage::GetMaskBlue() unsigned char wxImage::GetMaskGreen() unsigned char wxImage::GetMaskRed() wxString wxImage::GetOption( name ) wxString name int wxImage::GetOptionInt( name ) wxString name wxPalette* wxImage::GetPalette() CODE: RETVAL = new wxPalette( THIS->GetPalette() ); OUTPUT: RETVAL wxImage* wxImage::GetSubImage( rect ) wxRect* rect CODE: RETVAL = new wxImage( THIS->GetSubImage( *rect ) ); OUTPUT: RETVAL int wxImage::GetWidth() #if WXPERL_W_VERSION_GE( 2, 5, 3 ) bool wxImage::HasAlpha() #endif #if WXPERL_W_VERSION_GE( 2, 5, 4 ) void wxImage::InitAlpha() #endif #if WXPERL_W_VERSION_GE( 2, 6, 1 ) bool wxImage::IsTransparent( x, y, threshold = wxIMAGE_ALPHA_THRESHOLD ) int x int y unsigned char threshold #endif bool wxImage::HasMask() bool wxImage::HasOption( name ) wxString name bool wxImage::HasPalette() void InsertHandler( handler ) wxImageHandler* handler CODE: wxImage::InsertHandler( handler ); void wxImage::LoadFile( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wist_n, LoadStreamType ) MATCH_REDISP( wxPliOvl_wist_s, LoadStreamMIME ) MATCH_REDISP( wxPliOvl_s_n, LoadFileType ) MATCH_REDISP( wxPliOvl_s_s, LoadFileMIME ) END_OVERLOAD( Wx::Image::LoadFile ) bool wxImage::LoadFileType( name, type, index = -1 ) wxString name wxBitmapType type int index CODE: RETVAL = THIS->LoadFile( name, type, index ); OUTPUT: RETVAL bool wxImage::LoadFileMIME( name, type, index = -1 ) wxString name wxString type int index CODE: RETVAL = THIS->LoadFile( name, type, index ); OUTPUT: RETVAL bool wxImage::LoadStreamType( stream, type, index = -1 ) wxPliInputStream stream wxBitmapType type int index CODE: RETVAL = THIS->LoadFile( stream, type, index ); OUTPUT: RETVAL bool wxImage::LoadStreamMIME( stream, type, index = -1 ) wxPliInputStream stream wxString type int index CODE: RETVAL = THIS->LoadFile( stream, type, index ); OUTPUT: RETVAL bool wxImage::Ok() #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool wxImage::IsOk() #endif void wxImage::SaveFile( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wost_n, SaveFileSType ) MATCH_REDISP( wxPliOvl_wost_s, SaveFileSMIME ) MATCH_REDISP( wxPliOvl_s_n, SaveFileType ) MATCH_REDISP( wxPliOvl_s_s, SaveFileMIME ) MATCH_REDISP( wxPliOvl_s, SaveFileOnly ) END_OVERLOAD( Wx::Image::SaveFile ) bool wxImage::SaveFileOnly( name ) wxString name CODE: RETVAL = THIS->SaveFile( name ); OUTPUT: RETVAL bool wxImage::SaveFileType( name, type ) wxString name wxBitmapType type CODE: RETVAL = THIS->SaveFile( name, type ); OUTPUT: RETVAL bool wxImage::SaveFileMIME( name, type ) wxString name wxString type CODE: RETVAL = THIS->SaveFile( name, type ); OUTPUT: RETVAL bool wxImage::SaveStreamType( stream, type ) wxPliOutputStream stream wxBitmapType type CODE: RETVAL = THIS->SaveFile( stream, type ); OUTPUT: RETVAL bool wxImage::SaveStreamMIME( stream, type ) wxPliOutputStream stream wxString type CODE: RETVAL = THIS->SaveFile( stream, type ); OUTPUT: RETVAL wxImage* wxImage::Mirror( horizontally = true ) bool horizontally CODE: RETVAL = new wxImage( THIS->Mirror( horizontally ) ); OUTPUT: RETVAL void wxImage::Replace( r1, g1, b1, r2, g2, b2 ) unsigned char r1 unsigned char g1 unsigned char b1 unsigned char r2 unsigned char g2 unsigned char b2 #if WXPERL_W_VERSION_GE( 2, 8, 0 ) wxImage* wxImage::Rescale( width, height, quality = wxIMAGE_QUALITY_NORMAL ) int width int height wxImageResizeQuality quality CODE: RETVAL = new wxImage( THIS->Rescale( width, height, quality ) ); OUTPUT: RETVAL #else wxImage* wxImage::Rescale( width, height ) int width int height CODE: RETVAL = new wxImage( THIS->Rescale( width, height ) ); OUTPUT: RETVAL #endif void wxImage::Rotate( angle, centre, interpolating = true ) double angle wxPoint centre bool interpolating PREINIT: wxPoint after; wxImage* result; PPCODE: result = new wxImage( THIS->Rotate( angle, centre, interpolating, &after ) ); XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), result ) ); if( GIMME_V == G_ARRAY ) { PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxPoint( after ), "Wx::Point" ) ); } #if WXPERL_W_VERSION_GE( 2, 6, 3 ) void wxImage::RotateHue( angle ) double angle #endif wxImage* wxImage::Rotate90( clockwise = true ) bool clockwise CODE: RETVAL = new wxImage( THIS->Rotate90( clockwise ) ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 4, 1 ) wxImage* wxImage::ShrinkBy( xfactor, yfactor ) int xfactor int yfactor CODE: RETVAL = new wxImage( THIS->ShrinkBy( xfactor, yfactor ) ); OUTPUT: RETVAL #endif #if WXPERL_W_VERSION_GE( 2, 8, 0 ) wxImage* wxImage::Scale( width, height, quality = wxIMAGE_QUALITY_NORMAL ) int width int height wxImageResizeQuality quality CODE: RETVAL = new wxImage( THIS->Scale( width, height, quality ) ); OUTPUT: RETVAL #else wxImage* wxImage::Scale( width, height ) int width int height CODE: RETVAL = new wxImage( THIS->Scale( width, height ) ); OUTPUT: RETVAL #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxImage::SetAlpha( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_s, SetAlphaData ) MATCH_REDISP( wxPliOvl_n_n_n, SetAlphaXY ) END_OVERLOAD( Wx::Image::SetAlpha ) void wxImage::SetAlphaXY( x, y, alpha ) int x int y unsigned char alpha CODE: THIS->SetAlpha( x, y, alpha ); void wxImage::SetAlphaData( d ) SV* d CODE: STRLEN len; unsigned char* data = (unsigned char*) SvPV( d, len ); STRLEN imglen = THIS->GetWidth() * THIS->GetHeight(); unsigned char* data_copy = (unsigned char*) malloc( imglen ); memcpy( data_copy, data, len ); THIS->SetAlpha( data_copy ); #endif void wxImage::SetData( d ) SV* d CODE: STRLEN len; unsigned char* data = (unsigned char*)SvPV( d, len ); STRLEN imglen = THIS->GetWidth() * THIS->GetHeight() * 3; unsigned char* data_copy = (unsigned char*)malloc( imglen ); memcpy( data_copy, data, len ); THIS->SetData( data_copy ); void wxImage::SetMask( hasMask = true ) bool hasMask void wxImage::SetMaskColour( red, green, blue ) unsigned char red unsigned char green unsigned char blue void wxImage::SetOption( name, value ) wxString name wxString value void wxImage::SetOptionInt( name, value ) wxString name int value CODE: THIS->SetOption( name, value ); void wxImage::SetPalette( palette ) wxPalette* palette CODE: THIS->SetPalette( *palette ); #if WXPERL_W_VERSION_GE( 2, 8, 0 ) void wxImage::SetRGB( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n_n_n_n, SetRGBpixel ) MATCH_REDISP( wxPliOvl_wrec_n_n_n, SetRGBrect ) END_OVERLOAD( Wx::Image::SetRGB ) void wxImage::SetRGBpixel( x, y, red, green, blue ) int x int y unsigned char red unsigned char green unsigned char blue CODE: THIS->SetRGB( x, y, red, green, blue ); void wxImage::SetRGBrect( rect, red, green, blue ) wxRect* rect unsigned char red unsigned char green unsigned char blue CODE: THIS->SetRGB( *rect, red, green, blue ); #else void wxImage::SetRGB( x, y, red, green, blue ) int x int y unsigned char red unsigned char green unsigned char blue #endif #if WXPERL_W_VERSION_GE( 2, 8, 0 ) wxImage* wxImage::Blur( blurradius ) int blurradius CODE: RETVAL = new wxImage( THIS->Blur( blurradius ) ); OUTPUT: RETVAL wxImage* wxImage::BlurHorizontal( blurradius ) int blurradius CODE: RETVAL = new wxImage( THIS->BlurHorizontal( blurradius ) ); OUTPUT: RETVAL wxImage* wxImage::BlurVertical( blurradius ) int blurradius CODE: RETVAL = new wxImage( THIS->BlurVertical( blurradius ) ); OUTPUT: RETVAL bool wxImage::GetOrFindMaskColour( red, green, blue ) unsigned char* red unsigned char* green unsigned char* blue #endif MODULE=Wx PACKAGE=Wx::ImageHandler void wxImageHandler::Destroy() CODE: delete THIS; int wxImageHandler::GetImageCount( stream ) wxPliInputStream stream wxString wxImageHandler::GetName() wxString wxImageHandler::GetExtension() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxBitmapType wxImageHandler::GetType() #else long wxImageHandler::GetType() #endif wxString wxImageHandler::GetMimeType() bool wxImageHandler::LoadFile( image, stream, verbose = true, index = 0 ) wxImage* image wxPliInputStream stream bool verbose int index bool wxImageHandler::SaveFile( image, stream ) wxImage* image wxPliOutputStream stream void wxImageHandler::SetName( name ) wxString name void wxImageHandler::SetExtension( ext ) wxString ext void wxImageHandler::SetMimeType( type ) wxString type void wxImageHandler::SetType( type ) wxBitmapType type MODULE=Wx PACKAGE=Wx::GIFHandler wxGIFHandler* wxGIFHandler::new() MODULE=Wx PACKAGE=Wx::BMPHandler wxBMPHandler* wxBMPHandler::new() MODULE=Wx PACKAGE=Wx::PNMHandler wxPNMHandler* wxPNMHandler::new() MODULE=Wx PACKAGE=Wx::PCXHandler wxPCXHandler* wxPCXHandler::new() MODULE=Wx PACKAGE=Wx::PNGHandler wxPNGHandler* wxPNGHandler::new() MODULE=Wx PACKAGE=Wx::JPEGHandler wxJPEGHandler* wxJPEGHandler::new() #if wxPERL_USE_LIBTIFF && !defined( __WXWINCE__ ) MODULE=Wx PACKAGE=Wx::TIFFHandler wxTIFFHandler* wxTIFFHandler::new() #endif MODULE=Wx PACKAGE=Wx::XPMHandler wxXPMHandler* wxXPMHandler::new() MODULE=Wx PACKAGE=Wx::IFFHandler #if wxPERL_USE_IFF wxIFFHandler* wxIFFHandler::new() #endif #if wxPERL_USE_ICO_CUR MODULE=Wx PACKAGE=Wx::ICOHandler wxICOHandler* wxICOHandler::new() MODULE=Wx PACKAGE=Wx::CURHandler wxCURHandler* wxCURHandler::new() MODULE=Wx PACKAGE=Wx::ANIHandler wxANIHandler* wxANIHandler::new() #endif #if wxUSE_TGA MODULE=Wx PACKAGE=Wx::TGAHandler wxTGAHandler* wxTGAHandler::new() #endif MODULE=Wx PACKAGE=Wx PREFIX=wx void wxInitAllImageHandlers() Wx-0.9923/XS/ImageList.xsp000664000000000000 570112306612233 13426 0ustar00Mark000000000000############################################################################# ## Name: XS/ImageList.xsp ## Purpose: XS for Wx::ImageList ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: ImageList.xsp 2938 2010-07-04 12:56:48Z mbarbon $ ## Copyright: (c) 2000-2006, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %{ #include #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 ) %} Wx-0.9923/XS/ItemContainer.xsp000664000000000000 630712306612233 14314 0ustar00Mark000000000000############################################################################# ## Name: XS/ItemContainer.xsp ## Purpose: XS for Wx::ItemContainer ## Author: Mattia Barbon ## Modified by: ## Created: 14/08/2007 ## RCS-ID: $Id: ItemContainer.xsp 2504 2008-11-06 00:25:57Z mbarbon $ ## Copyright: (c) 2007-2008 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}; %typemap{wxItemContainer*}{simple}; %name{Wx::ItemContainer} class wxItemContainer { %{ void wxItemContainer::Append( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_arr_arr, AppendItemsData ) MATCH_REDISP( wxPliOvl_arr, AppendItems ) MATCH_REDISP( wxPliOvl_s_s, AppendData ) MATCH_REDISP( wxPliOvl_s, AppendString ) END_OVERLOAD( Wx::ItemContainer::Append ) %} %name{AppendString} void Append( const wxString& item ); %name{AppendData} void Append( const wxString& item, wxPliUserDataCD* data ); %name{AppendItems} void Append( const wxArrayString& items ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) %name{AppendItemsData} void Append( const wxArrayString& items, wxPliUserDataCD** data ) %code%{ THIS->Append( items, (wxClientData**)data ); %}; #endif %{ void wxItemContainer::Insert( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_arr_n_arr, InsertItemsData ) MATCH_REDISP( wxPliOvl_arr_n, InsertItems ) MATCH_REDISP( wxPliOvl_s_n_s, InsertData ) MATCH_REDISP( wxPliOvl_s_n, InsertString ) END_OVERLOAD( Wx::ItemContainer::Insert ) %} %name{InsertString} void Insert( const wxString& item, unsigned int pos ); %name{InsertData} void Insert( const wxString& item, unsigned int pos, wxPliUserDataCD* data ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) %name{InsertItems} void Insert( const wxArrayString& items, unsigned int pos ); %name{InsertItemsData} void Insert( const wxArrayString& items, unsigned int pos, wxPliUserDataCD** data ) %code%{ THIS->Insert( items, pos, (wxClientData**)data ); %}; #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) %{ void wxItemContainer::Set( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_arr_arr, SetItemsData ) MATCH_REDISP( wxPliOvl_arr, SetItems ) END_OVERLOAD( Wx::ItemContainer::Set ) %} %name{SetItems} void Set( const wxArrayString& items ); %name{SetItemsData} void Set( const wxArrayString& items, wxPliUserDataCD** data ) %code%{ THIS->Set( items, (wxClientData**)data ); %}; #endif void Clear(); void Delete( int n ); wxPliUserDataCD* GetClientData( int n ) %code%{ RETVAL = (wxPliUserDataCD*) THIS->GetClientObject( n ); %}; %name{SetClientData} void SetClientObject( int n, wxPliUserDataCD* data ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) ## bool IsSorted() const; #endif }; Wx-0.9923/XS/ItemContainerImmutable.xsp000664000000000000 343012306612233 16146 0ustar00Mark000000000000############################################################################# ## Name: XS/ItemContainerImmutable.xsp ## Purpose: XS for Wx::ItemContainerImmutable ## Author: Mattia Barbon ## Modified by: ## Created: 14/08/2007 ## RCS-ID: $Id: ItemContainerImmutable.xsp 3504 2013-06-28 04:18:43Z mdootson $ ## Copyright: (c) 2007 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}; %typemap{wxItemContainerImmutable*}{simple}; %name{Wx::ItemContainerImmutable} class wxItemContainerImmutable { unsigned int GetCount() const; #if !defined(WXPERL_IN_COMBOBOX) || WXPERL_W_VERSION_LE( 2, 9, 2 ) bool IsEmpty() const; #endif wxString GetString( unsigned int n ); %{ void wxItemContainerImmutable::GetStrings() PPCODE: PUTBACK; wxPli_stringarray_push( aTHX_ THIS->GetStrings() ); SPAGAIN; %} void SetString( unsigned int n, const wxString& s ); %{ int wxItemContainerImmutable::FindString( ... ) PPCODE: BEGIN_OVERLOAD() #if WXPERL_W_VERSION_GE( 2, 7, 2 ) MATCH_REDISP( wxPliOvl_s_b, FindStringCase ) #endif MATCH_REDISP( wxPliOvl_s, FindStringNoCase ) END_OVERLOAD( Wx::ItemContainerImmutable::FindString ) %} %name{FindStringNoCase} int FindString( const wxString& s ) const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) %name{FindStringCase} int FindString( const wxString& s, bool bCase = false ) const; #endif #if !defined(WXPERL_IN_COMBOBOX) void SetSelection( int n ); int GetSelection() const; #endif bool SetStringSelection( const wxString& s ); wxString GetStringSelection() const; void Select( int n ); }; Wx-0.9923/XS/Listbook.xsp000664000000000000 357712306612233 13347 0ustar00Mark000000000000############################################################################# ## Name: XS/Listbook.xsp ## Purpose: XS++ for Wx::Listbook ## Author: Mattia Barbon ## Modified by: ## Created: 21/12/2003 ## RCS-ID: $Id: Listbook.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2003, 2005-2006 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}; %typemap{wxListbook*}{simple}; %{ #if WXPERL_W_VERSION_GE( 2, 5, 1 ) #include %} %name{Wx::Listbook} class wxListbook { %name{newDefault} wxListbook() %code{% RETVAL = new wxListbook(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxListbook(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxEmptyString) %code{% RETVAL = new wxListbook( parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxEmptyString); #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxListView* GetListView(); #endif }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Listbook::new" ) %} %{ #endif %}Wx-0.9923/XS/ListBox.xs000664000000000000 621012306612233 12750 0ustar00Mark000000000000############################################################################# ## Name: XS/ListBox.xs ## Purpose: XS for Wx::ListBox ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2000 ## RCS-ID: $Id: ListBox.xs 2504 2008-11-06 00:25:57Z mbarbon $ ## Copyright: (c) 2000-2003, 2006-2008 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 PACKAGE=Wx::ListBox #include void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::ListBox::new" ) wxListBox* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxListBox(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxListBox* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxListBoxNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size SV* choices long style wxValidator* validator wxString name PREINIT: wxString* chs; int n; CODE: if( choices ) n = wxPli_av_2_stringarray( aTHX_ choices, &chs ); else { n = 0; chs = 0; } RETVAL = new wxListBox( parent, id, pos, size, n, chs, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); delete[] chs; OUTPUT: RETVAL bool wxListBox::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, choices = 0, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxListBoxNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size SV* choices long style wxValidator* validator wxString name PREINIT: wxString* chs; int n; CODE: if( choices ) n = wxPli_av_2_stringarray( aTHX_ choices, &chs ); else { n = 0; chs = 0; } RETVAL = THIS->Create( parent, id, pos, size, n, chs, style, *validator, name ); delete[] chs; OUTPUT: RETVAL void wxListBox::Deselect( n ) int n void wxListBox::GetSelections() PREINIT: wxArrayInt selections; PPCODE: THIS->GetSelections( selections ); PUTBACK; wxPli_intarray_push( aTHX_ selections ); SPAGAIN; int wxListBox::HitTest( point ) wxPoint point #if WXPERL_W_VERSION_LT( 2, 9, 0 ) void wxListBox::InsertItems( items, pos ) wxArrayString items int pos #endif bool wxListBox::IsSelected( n ) int n void wxListBox::SetSelection( n, select = true ) int n bool select void wxListBox::SetStringSelection( string, select = true ) wxString string bool select void wxListBox::SetFirstItem( n ) int n void wxListBox::SetFirstItemString( str ) wxString str CODE: THIS->SetFirstItem( str ); #if WXPERL_W_VERSION_LT( 2, 9, 0 ) void wxListBox::Set( choices ) wxArrayString choices #endif Wx-0.9923/XS/ListCtrl.xs000664000000000000 4145312306612233 13154 0ustar00Mark000000000000############################################################################# ## Name: XS/ListCtrl.xs ## Purpose: XS for Wx::ListCtrl, Wx::ListItem ## Author: Mattia Barbon ## Modified by: ## Created: 04/02/2001 ## RCS-ID: $Id: ListCtrl.xs 3447 2013-03-29 22:18:44Z mdootson $ ## Copyright: (c) 2001-2007, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include #if WXPERL_W_VERSION_LT( 2, 6, 0 ) #define wxListCtrlNameStr wxT("listCtrl") #endif MODULE=Wx_Evt PACKAGE=Wx::ListEvent wxListEvent* wxListEvent::new( eventType = wxEVT_NULL, id = 0 ) wxEventType eventType int id #if WXPERL_W_VERSION_GE( 2, 5, 1 ) bool wxListEvent::IsEditCancelled() #endif long wxListEvent::GetCacheFrom() long wxListEvent::GetCacheTo() long wxListEvent::GetIndex() int wxListEvent::GetColumn() int wxListEvent::GetKeyCode() wxPoint* wxListEvent::GetPoint() CODE: RETVAL = new wxPoint( THIS->GetPoint() ); OUTPUT: RETVAL wxString wxListEvent::GetLabel() wxString wxListEvent::GetText() int wxListEvent::GetImage() long wxListEvent::GetData() long wxListEvent::GetMask() wxListItem* wxListEvent::GetItem() CODE: RETVAL = new wxListItem( THIS->GetItem() ); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::ListItem wxListItem* wxListItem::new() static void wxListItem::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxListItem::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::ListItem", THIS, ST(0) ); delete THIS; void wxListItem::Clear() void wxListItem::ClearAttributes() void wxListItem::SetMask( mask ) long mask void wxListItem::SetId( id ) long id void wxListItem::SetColumn( column ) int column void wxListItem::SetState( state ) long state void wxListItem::SetStateMask( stateMask ) long stateMask void wxListItem::SetText( text ) wxString text void wxListItem::SetImage( image ) int image void wxListItem::SetData( data ) long data void wxListItem::SetWidth( width ) int width void wxListItem::SetAlign( align ) wxListColumnFormat align void wxListItem::SetTextColour( colour ) wxColour colour void wxListItem::SetBackgroundColour( colour ) wxColour colour void wxListItem::SetFont( font ) wxFont* font C_ARGS: *font long wxListItem::GetMask() long wxListItem::GetId() int wxListItem::GetColumn() long wxListItem::GetState() wxString wxListItem::GetText() int wxListItem::GetImage() long wxListItem::GetData() int wxListItem::GetWidth() wxListColumnFormat wxListItem::GetAlign() wxColour* wxListItem::GetTextColour() CODE: RETVAL = new wxColour( THIS->GetTextColour() ); OUTPUT: RETVAL wxColour* wxListItem::GetBackgroundColour() CODE: RETVAL = new wxColour( THIS->GetBackgroundColour() ); OUTPUT: RETVAL wxFont* wxListItem::GetFont() CODE: RETVAL = new wxFont( THIS->GetFont() ); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::ListItemAttr wxListItemAttr* wxListItemAttr::new( ... ) CASE: items == 1 CODE: RETVAL = new wxListItemAttr(); OUTPUT: RETVAL CASE: items == 4 INPUT: wxColour text = NO_INIT wxColour back = NO_INIT wxFont* font = NO_INIT CODE: text = *(wxColour *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::Colour" ); back = *(wxColour *) wxPli_sv_2_object( aTHX_ ST(2), "Wx::Colour" ); font = (wxFont *) wxPli_sv_2_object( aTHX_ ST(3), "Wx::Font" ); RETVAL = new wxListItemAttr( text, back, *font ); OUTPUT: RETVAL CASE: CODE: croak( "Usage: Wx::ListItemAttr::new(THIS [, text, back, font ] )" ); static void wxListItemAttr::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxListItemAttr::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::ListItemAttr", THIS, ST(0) ); delete THIS; void wxListItemAttr::SetTextColour( text ) wxColour text void wxListItemAttr::SetBackgroundColour( back ) wxColour back void wxListItemAttr::SetFont( font ) wxFont* font CODE: THIS->SetFont( *font ); bool wxListItemAttr::HasTextColour() bool wxListItemAttr::HasBackgroundColour() bool wxListItemAttr::HasFont() wxColour* wxListItemAttr::GetTextColour() CODE: RETVAL = new wxColour( THIS->GetTextColour() ); OUTPUT: RETVAL wxColour* wxListItemAttr::GetBackgroundColour() CODE: RETVAL = new wxColour( THIS->GetBackgroundColour() ); OUTPUT: RETVAL wxFont* wxListItemAttr::GetFont() CODE: RETVAL = new wxFont( THIS->GetFont() ); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::ListCtrl #!sub OnGetItemText #!sub OnGetItemImage #!sub OnGetItemAttr #!sub OnGetItemColumnImage void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::ListCtrl::new" ) wxListCtrl* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxPliListCtrl( CLASS ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxListCtrl* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxLC_ICON, validator = (wxValidator*)&wxDefaultValidator, name = wxListCtrlNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxValidator* validator wxString name CODE: RETVAL = new wxPliListCtrl( CLASS, parent, id, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxListCtrl::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxLC_ICON, validator = (wxValidator*)&wxDefaultValidator, name = wxListCtrlNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxValidator* validator wxString name C_ARGS: parent, id, pos, size, style, *validator, name bool wxListCtrl::Arrange( flag = wxLIST_ALIGN_DEFAULT ) int flag void wxListCtrl::AssignImageList( imagelist, which ) wxImageList* imagelist int which CODE: wxPli_object_set_deleteable( aTHX_ ST(1), false ); THIS->AssignImageList( imagelist, which ); void wxListCtrl::ClearAll() bool wxListCtrl::DeleteItem( item ) long item bool wxListCtrl::DeleteAllItems() bool wxListCtrl::DeleteColumn( col ) int col void wxListCtrl::EditLabel( item ) long item bool wxListCtrl::EnsureVisible( item ) long item long wxListCtrl::FindItem( start, str, partial = false ) long start wxString str bool partial CODE: RETVAL = THIS->FindItem( start, str, partial ); OUTPUT: RETVAL long wxListCtrl::FindItemData( start, data ) long start wxUIntPtr data CODE: RETVAL = THIS->FindItem( start, data ); OUTPUT: RETVAL long wxListCtrl::FindItemAtPos( start, pt, direction ) long start wxPoint pt int direction CODE: RETVAL = THIS->FindItem( start, pt, direction ); OUTPUT: RETVAL wxListItem* wxListCtrl::GetColumn( col ) int col PREINIT: wxListItem item; CODE: item.SetMask( wxLIST_MASK_TEXT|wxLIST_MASK_IMAGE|wxLIST_MASK_FORMAT ); if( THIS->GetColumn( col, item ) ) { RETVAL = new wxListItem( item ); } else { RETVAL = 0; } OUTPUT: RETVAL int wxListCtrl::GetColumnCount() int wxListCtrl::GetColumnWidth( col ) int col int wxListCtrl::GetCountPerPage() #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) wxTextCtrl* wxListCtrl::GetEditControl() #endif wxImageList* wxListCtrl::GetImageList( which ) int which CODE: RETVAL = (wxImageList*)THIS->GetImageList( which ); OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); wxListItem* wxListCtrl::GetItem( id, col = -1 ) long id int col PREINIT: wxListItem item; CODE: item.SetId( id ); if( col != -1 ) { item.SetColumn( col ); } item.SetMask( wxLIST_MASK_TEXT|wxLIST_MASK_DATA|wxLIST_MASK_IMAGE| wxLIST_MASK_STATE ); if( THIS->GetItem( item ) ) { RETVAL = new wxListItem( item ); } else { RETVAL = 0; } OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 8, 4 ) wxUIntPtr wxListCtrl::GetItemData( item ) long item bool wxListCtrl::SetItemPtrData( item, data ) long item wxUIntPtr data bool wxListCtrl::SetItemData( item, data ) long item wxUIntPtr data CODE: RETVAL = THIS->SetItemPtrData( item, data); OUTPUT: RETVAL #else long wxListCtrl::GetItemData( item ) long item bool wxListCtrl::SetItemData( item, data ) long item long data #endif wxPoint* wxListCtrl::GetItemPosition( item ) long item PREINIT: wxPoint point; CODE: if( THIS->GetItemPosition( item, point ) ) { RETVAL = new wxPoint( point ); } else { RETVAL = 0; } OUTPUT: RETVAL wxRect* wxListCtrl::GetItemRect( item, code = wxLIST_RECT_BOUNDS ) long item int code PREINIT: wxRect rect; CODE: if( THIS->GetItemRect( item, rect, code ) ) { RETVAL = new wxRect( rect ); } else { RETVAL = 0; } OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 7, 2 ) && defined(__WXMSW__) wxRect* wxListCtrl::GetSubItemRect( item, subItem, code = wxLIST_RECT_BOUNDS ) long item long subItem int code PREINIT: wxRect rect; CODE: if( THIS->GetSubItemRect( item, subItem, rect, code ) ) { RETVAL = new wxRect( rect ); } else { RETVAL = 0; } OUTPUT: RETVAL #endif int wxListCtrl::GetItemState( item, stateMask ) long item long stateMask int wxListCtrl::GetItemCount() #if WXPERL_W_VERSION_LE( 2, 5, 1 ) int wxListCtrl::GetItemSpacing( isSmall ) bool isSmall #else wxSize* wxListCtrl::GetItemSpacing() CODE: RETVAL = new wxSize( THIS->GetItemSpacing() ); OUTPUT: RETVAL #endif wxString wxListCtrl::GetItemText( item ) long item wxFont* wxListCtrl::GetItemFont( item ) long item CODE: RETVAL = new wxFont( THIS->GetItemFont( item ) ); OUTPUT: RETVAL wxColour* wxListCtrl::GetItemTextColour( item ) long item CODE: RETVAL = new wxColour( THIS->GetItemTextColour( item ) ); OUTPUT: RETVAL wxColour* wxListCtrl::GetItemBackgroundColour( item ) long item CODE: RETVAL = new wxColour( THIS->GetItemBackgroundColour( item ) ); OUTPUT: RETVAL void wxListCtrl::SetItemTextColour( item, colour ) long item wxColour* colour CODE: THIS->SetItemTextColour( item, *colour ); void wxListCtrl::SetItemBackgroundColour( item, colour ) long item wxColour* colour CODE: THIS->SetItemBackgroundColour( item, *colour ); long wxListCtrl::GetNextItem( item, geometry = wxLIST_NEXT_ALL, state = wxLIST_STATE_DONTCARE ) long item int geometry int state int wxListCtrl::GetSelectedItemCount() wxColour* wxListCtrl::GetTextColour() CODE: RETVAL = new wxColour( THIS->GetTextColour() ); OUTPUT: RETVAL long wxListCtrl::GetTopItem() #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxRect* wxListCtrl::GetViewRect() CODE: RETVAL = new wxRect( THIS->GetViewRect() ); OUTPUT: RETVAL #endif void wxListCtrl::HitTest( point ) wxPoint point PREINIT: int flags; long item; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) long subitem; #endif PPCODE: #if WXPERL_W_VERSION_GE( 2, 7, 2 ) item = THIS->HitTest( point, flags, &subitem ); #else item = THIS->HitTest( point, flags ); #endif EXTEND( SP, 3 ); PUSHs( sv_2mortal( newSViv( item ) ) ); PUSHs( sv_2mortal( newSViv( flags ) ) ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) PUSHs( sv_2mortal( newSViv( subitem ) ) ); #endif void wxListCtrl::InsertColumn( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_wlci, InsertColumnInfo ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_s_n_n, InsertColumnString, 2 ) END_OVERLOAD( Wx::ListCtrl::InsertColumn ) long wxListCtrl::InsertColumnInfo( col, info ) int col wxListItem* info CODE: RETVAL = THIS->InsertColumn( col, *info ); OUTPUT: RETVAL long wxListCtrl::InsertColumnString( col, heading, format = wxLIST_FORMAT_LEFT, width = -1 ) int col wxString heading int format int width CODE: RETVAL = THIS->InsertColumn( col, heading, format, width ); OUTPUT: RETVAL long wxListCtrl::InsertItem( info ) wxListItem* info CODE: RETVAL = THIS->InsertItem( *info ); OUTPUT: RETVAL long wxListCtrl::InsertStringItem( index, label ) long index wxString label CODE: RETVAL = THIS->InsertItem( index, label ); OUTPUT: RETVAL long wxListCtrl::InsertImageItem( index, image ) long index int image CODE: RETVAL = THIS->InsertItem( index, image ); OUTPUT: RETVAL long wxListCtrl::InsertImageStringItem( index, label, image ) long index wxString label int image CODE: RETVAL = THIS->InsertItem( index, label, image ); OUTPUT: RETVAL bool wxListCtrl::IsVirtual() void wxListCtrl::RefreshItem( item ) long item void wxListCtrl::RefreshItems( itemFrom, itemTo ) long itemFrom long itemTo bool wxListCtrl::ScrollList( dx, dy ) int dx int dy bool wxListCtrl::SetColumn( col, item ) int col wxListItem* item CODE: RETVAL = THIS->SetColumn( col, *item ); OUTPUT: RETVAL bool wxListCtrl::SetColumnWidth( col, width ) int col int width void wxListCtrl::SetImageList( imagelist, which ) wxImageList* imagelist int which void wxListCtrl::SetItemCount( count ) long count void wxListCtrl::SetItem( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wlci, SetItemInfo ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_n_s_n, SetItemString, 3 ) END_OVERLOAD( Wx::ListCtrl::SetItem ) bool wxListCtrl::SetItemInfo( info ) wxListItem* info CODE: RETVAL = THIS->SetItem( *info ); OUTPUT: RETVAL bool wxListCtrl::SetItemString( index, col, label, image = -1 ) long index int col wxString label int image CODE: RETVAL = THIS->SetItem( index, col, label, image ); OUTPUT: RETVAL bool wxListCtrl::SetItemImage( item, image, selImage ) long item int image int selImage #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool wxListCtrl::SetItemColumnImage( item, column, image ) long item long column int image #endif bool wxListCtrl::SetItemPosition( item, pos ) long item wxPoint pos bool wxListCtrl::SetItemState( item, state, stateMask ) long item long state long stateMask void wxListCtrl::SetItemText( item, text ) long item wxString text void wxListCtrl::SetItemFont( item, font ) long item wxFont* font CODE: THIS->SetItemFont( item, *font ); void wxListCtrl::SetSingleStyle( style, add = true ) long style bool add void wxListCtrl::SetTextColour( colour ) wxColour colour void wxListCtrl::SetWindowStyleFlag( style ) long style bool wxListCtrl::SortItems( function ) SV* function CODE: RETVAL = THIS->SortItems( (wxListCtrlCompare)&ListCtrlCompareFn, PTR2IV( function ) ); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::ListView void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::ListView::new" ) wxListView* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxPliListView( CLASS ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxListView* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxLC_REPORT, validator = (wxValidator*)&wxDefaultValidator, name = wxListCtrlNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxValidator* validator wxString name CODE: RETVAL = new wxPliListView( CLASS, parent, id, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxListView::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxLC_REPORT, validator = (wxValidator*)&wxDefaultValidator, name = wxListCtrlNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxValidator* validator wxString name C_ARGS: parent, id, pos, size, style, *validator, name void wxListView::Select( n, on ) long n bool on void wxListView::SetColumnImage( col, image ) int col int image void wxListView::ClearColumnImage( col ) int col void wxListView::Focus( index ) long index long wxListView::GetFocusedItem() long wxListView::GetFirstSelected() long wxListView::GetNextSelected( item ) long item bool wxListView::IsSelected( index ) long index Wx-0.9923/XS/Locale.xs000664000000000000 1346612306612233 12616 0ustar00Mark000000000000############################################################################# ## Name: XS/Locale.xs ## Purpose: XS for Wx::Locale ## Author: Mattia Barbon ## Modified by: ## Created: 30/11/2000 ## RCS-ID: $Id: Locale.xs 3125 2011-11-21 02:47:30Z mdootson $ ## Copyright: (c) 2000-2007, 2010-2011 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::LanguageInfo wxLanguageInfo* wxLanguageInfo::new( language, canonicalName, winLang, winSublang, descr ) int language wxString canonicalName int winLang int winSublang wxString descr CODE: RETVAL = new wxLanguageInfo; RETVAL->Language = language; RETVAL->CanonicalName = canonicalName; #if defined( __WXMSW__ ) RETVAL->WinLang = winLang; RETVAL->WinSublang = winSublang; #endif RETVAL->Description = descr; OUTPUT: RETVAL static void wxLanguageInfo::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxLanguageInfo::DESTROY() CODE: if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; int wxLanguageInfo::GetLanguage() CODE: RETVAL = THIS->Language; OUTPUT: RETVAL wxString wxLanguageInfo::GetCanonicalName() CODE: RETVAL = THIS->CanonicalName; OUTPUT: RETVAL unsigned int wxLanguageInfo::GetWinLang() CODE: #if defined( __WXMSW__ ) RETVAL = THIS->WinLang; #else RETVAL = 0; #endif OUTPUT: RETVAL unsigned int wxLanguageInfo::GetWinSublang() CODE: #if defined( __WXMSW__ ) RETVAL = THIS->WinSublang; #else RETVAL = 0; #endif OUTPUT: RETVAL wxString wxLanguageInfo::GetDescription() CODE: RETVAL = THIS->Description; OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::Locale #if WXPERL_W_VERSION_GE( 2, 9, 1 ) #define wxPL_LOCALE_CTOR_FLAGS wxLOCALE_LOAD_DEFAULT #define wxPL_LOCALE_CONVERT_ENCODING true #else #define wxPL_LOCALE_CTOR_FLAGS wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING #define wxPL_LOCALE_CONVERT_ENCODING false #endif wxLocale* newLong( name, shorts = NULL, locale = NULL, loaddefault = true, convertencoding = wxPL_LOCALE_CONVERT_ENCODING ) const wxChar* name const wxChar* shorts = NO_INIT const wxChar* locale = NO_INIT bool loaddefault bool convertencoding CODE: wxString shorts_tmp, locale_tmp; if( items < 2 ) shorts = NULL; else { WXSTRING_INPUT( shorts_tmp, const char*, ST(1) ); shorts = shorts_tmp.c_str(); } if( items < 3 ) locale = NULL; else { WXSTRING_INPUT( locale_tmp, const char*, ST(2) ); locale = locale_tmp.c_str(); } RETVAL = new wxLocale( name, shorts, ( locale && wxStrlen( locale ) ) ? locale : NULL, loaddefault, convertencoding ); OUTPUT: RETVAL wxLocale* newShort( language, flags = wxPL_LOCALE_CTOR_FLAGS ) int language int flags CODE: RETVAL = new wxLocale( language, flags ); OUTPUT: RETVAL static void wxLocale::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxLocale::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Locale", THIS, ST(0) ); delete THIS; bool wxLocale::AddCatalog( domain ) wxString domain void wxLocale::AddCatalogLookupPathPrefix( prefix ) wxString prefix #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool IsAvailable( lang ) int lang CODE: RETVAL = wxLocale::IsAvailable( lang ); OUTPUT: RETVAL #endif void AddLanguage( info ) wxLanguageInfo* info CODE: wxLocale::AddLanguage( *info ); const wxChar* wxLocale::GetLocale() wxString wxLocale::GetName() const wxChar* wxLocale::GetString( string, domain = NULL ) const wxChar* string const wxChar* domain #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxString wxLocale::GetHeaderValue( header, domain = NULL ) const wxChar* header const wxChar* domain #endif int GetSystemLanguage() CODE: RETVAL = wxLocale::GetSystemLanguage(); OUTPUT: RETVAL int wxLocale::GetLanguage() #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxString wxLocale::GetLanguageName( lang ) int lang #endif wxString wxLocale::GetSysName() wxString wxLocale::GetCanonicalName() wxFontEncoding GetSystemEncoding() CODE: RETVAL = wxLocale::GetSystemEncoding(); OUTPUT: RETVAL wxString GetSystemEncodingName() CODE: RETVAL = wxLocale::GetSystemEncodingName(); OUTPUT: RETVAL bool wxLocale::IsLoaded( domain ) const wxChar* domain bool wxLocale::IsOk() const wxLanguageInfo* FindLanguageInfo( name ) wxString name CODE: RETVAL = wxLocale::FindLanguageInfo( name ); OUTPUT: RETVAL CLEANUP: if( ST(0) != NULL ) wxPli_object_set_deleteable( aTHX_ ST(0), false ); bool wxLocale::Init( language, flags = wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING ) int language int flags const wxLanguageInfo* GetLanguageInfo( language ) int language CODE: RETVAL = wxLocale::GetLanguageInfo( language ); OUTPUT: RETVAL CLEANUP: if( ST(0) != NULL ) wxPli_object_set_deleteable( aTHX_ ST(0), false ); MODULE=Wx PACKAGE=Wx PREFIX=wx void wxGetTranslation( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_FUNCTION( wxPliOvl_s, Wx::GetTranslationNormal ) MATCH_REDISP_FUNCTION( wxPliOvl_s_s_n, Wx::GetTranslationPlural ) END_OVERLOAD( "Wx::GetTranslation" ) const wxChar* wxGetTranslationNormal( string ) const wxChar* string CODE: RETVAL = wxGetTranslation( string ); OUTPUT: RETVAL const wxChar* wxGetTranslationPlural( string, plural, n ) const wxChar* string const wxChar* plural size_t n CODE: RETVAL = wxGetTranslation( string, plural, n ); OUTPUT: RETVAL Wx-0.9923/XS/Log.xs000664000000000000 2507012306612233 12132 0ustar00Mark000000000000############################################################################# ## Name: XS/Log.xs ## Purpose: XS for Wx::Log and derived classes ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Log.xs 3426 2013-01-19 06:29:12Z mdootson $ ## Copyright: (c) 2000-2003, 2005-2007, 2009, 2012-2013 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include "cpp/log.h" MODULE=Wx PACKAGE=Wx::Log void wxLog::Destroy() CODE: delete THIS; bool IsEnabled() CODE: RETVAL = wxLog::IsEnabled(); OUTPUT: RETVAL bool EnableLogging( enable = true ) bool enable CODE: RETVAL = wxLog::EnableLogging( enable ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 8, 5 ) void SetRepetitionCounting( RepetCounting = true ) bool RepetCounting CODE: wxLog::SetRepetitionCounting( RepetCounting ); bool GetRepetitionCounting() CODE: RETVAL = wxLog::GetRepetitionCounting(); OUTPUT: RETVAL void DoCreateOnDemand() CODE: wxLog::DoCreateOnDemand(); #endif void AddTraceMask( mask ) wxString mask CODE: wxLog::AddTraceMask( mask ); void ClearTraceMasks() CODE: wxLog::ClearTraceMasks(); void RemoveTraceMask( mask ) wxString mask CODE: wxLog::RemoveTraceMask( mask ); bool IsAllowedTraceMask( mask ) wxString mask CODE: RETVAL = wxLog::IsAllowedTraceMask( mask ); OUTPUT: RETVAL void GetTraceMasks() PPCODE: const wxArrayString& masksallowed = wxLog::GetTraceMasks(); PUTBACK; wxPli_stringarray_push( aTHX_ masksallowed ); SPAGAIN; wxLog* GetActiveTarget() CODE: RETVAL = wxLog::GetActiveTarget(); OUTPUT: RETVAL wxLog* SetActiveTarget( target ) wxLog* target CODE: RETVAL = wxLog::SetActiveTarget( target ); OUTPUT: RETVAL void DontCreateOnDemand() CODE: wxLog::DontCreateOnDemand(); void Suspend() CODE: wxLog::Suspend(); void Resume() CODE: wxLog::Resume(); wxLogLevel GetLogLevel() CODE: RETVAL = wxLog::GetLogLevel(); OUTPUT: RETVAL void SetLogLevel( loglevel ) wxLogLevel loglevel CODE: wxLog::SetLogLevel( loglevel ); void wxLog::Flush() ## // Allow static function call and previously ## // wrapped method call for FlushActive void FlushActive( myLog = NULL ) wxLog* myLog CODE: wxLog::FlushActive(); bool wxLog::HasPendingMessages() ## // Allow correct static function call and previously ## // wrapped method call for Get / SetVerbose ## // It all maps to a static call anyway. ## // Old code should still work # DECLARE_OVERLOAD( wlog, Wx::Log ) void SetVerbose( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP_FUNCTION( Wx::Log::SetVerboseFunctionDefault ) MATCH_REDISP_COUNT_FUNCTION(wxPliOvl_wlog, Wx::Log::SetVerboseMethodDefault, 1 ) MATCH_REDISP_COUNT_FUNCTION(wxPliOvl_n, Wx::Log::SetVerboseFunctionParam, 1) MATCH_REDISP_COUNT_FUNCTION(wxPliOvl_wlog_n, Wx::Log::SetVerboseMethodParam, 2) END_OVERLOAD( "Wx::Log::SetVerbose" ) void SetVerboseFunctionDefault() CODE: wxLog::SetVerbose( true ); void SetVerboseMethodDefault( myLog ) wxLog* myLog CODE: wxLog::SetVerbose( true ); void SetVerboseFunctionParam( enable ) bool enable CODE: wxLog::SetVerbose( enable ); void SetVerboseMethodParam( myLog, enable ) wxLog* myLog bool enable CODE: wxLog::SetVerbose( enable ); bool GetVerbose( myLog = NULL ) wxLog* myLog CODE: RETVAL = wxLog::GetVerbose(); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void _SetTimestamp( format, buffer ) wxString format SV* buffer CODE: wxLog::SetTimestamp( format ); wxString wxLog::GetTimestamp(); #else void _SetTimestamp( format, buffer ) SV* format SV* buffer CODE: if( SvOK( ST(0) ) ) { const wxString format_tmp = ( SvUTF8( format ) ) ? ( wxString( SvPVutf8_nolen( format ), wxConvUTF8 ) ) : ( wxString( SvPV_nolen( format ), wxConvLibc ) ); const wxChar* fmt = (const wxChar*)format_tmp.c_str(); STRLEN size = wxStrlen( fmt ) * sizeof(wxChar) + sizeof(wxChar); SvUPGRADE( buffer, SVt_PV ); wxLog::SetTimestamp( wxStrcpy( (wxChar*)SvGROW( buffer, size ), fmt ) ); } else { wxLog::SetTimestamp( NULL ); } const wxChar* wxLog::GetTimestamp() #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void SetComponentLevel( component, level ) wxString component wxLogLevel level CODE: wxLog::SetComponentLevel( component, level ); wxLogLevel GetComponentLevel( component ) wxString component CODE: RETVAL = wxLog::GetComponentLevel( component ); OUTPUT: RETVAL bool IsLevelEnabled( level, component ) wxLogLevel level wxString component CODE: RETVAL = wxLog::IsLevelEnabled( level, component ); OUTPUT: RETVAL #endif #if WXPERL_W_VERSION_LT( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 void SetTraceMask( mask ) wxTraceMask mask CODE: wxLog::SetTraceMask( mask ); wxTraceMask GetTraceMask() CODE: RETVAL = wxLog::GetTraceMask(); OUTPUT: RETVAL #endif MODULE=Wx PACKAGE=Wx::PlLog wxPlLog* wxPlLog::new() CODE: RETVAL = new wxPlLog( CLASS ); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::LogTextCtrl wxLogTextCtrl* wxLogTextCtrl::new( ctrl ) wxTextCtrl* ctrl MODULE=Wx PACKAGE=Wx::LogNull wxLogNull* wxLogNull::new() static void wxLogNull::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxLogNull::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::LogNull", THIS, ST(0) ); delete THIS; MODULE=Wx PACKAGE=Wx::LogGui wxLogGui* wxLogGui::new() MODULE=Wx PACKAGE=Wx::LogWindow wxLogWindow* wxLogWindow::new( parent, title, show = true, passtoold = true ) wxFrame* parent wxString title bool show bool passtoold MODULE=Wx PACKAGE=Wx # this is a test for INTERFACE: # in this specific case it saves around 256 bytes / function, # more for more complex typemaps / longer parameter lists #if 0 #define XSINTERFACE__wxstring( _ret, _cv, _f ) \ ( ( void (*)( const wxString& ) ) _f) #define XSINTERFACE__wxstring_SET( _cv, _f ) \ ( CvXSUBANY( _cv ).any_ptr = (void*) _f ) #undef dXSFUNCTION #define dXSFUNCTION( a ) \ void (*XSFUNCTION)( const wxString& ) void interface__wxstring( string ) wxString string INTERFACE_MACRO: XSINTERFACE__wxstring XSINTERFACE__wxstring_SET INTERFACE: wxLogError wxLogFatalError wxLogWarning wxLogVerbose wxLogDebug wxLogMessage #else #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void wxLogError( string ) wxString string void wxLogFatalError( string ) wxString string void wxLogWarning( string ) wxString string void wxLogMessage( string ) wxString string void wxLogVerbose( string ) wxString string void wxLogDebug( string ) wxString string #else void wxLogError( string ) const wxChar* string void wxLogFatalError( string ) const wxChar* string void wxLogWarning( string ) const wxChar* string void wxLogMessage( string ) const wxChar* string void wxLogVerbose( string ) const wxChar* string void wxLogDebug( string ) const wxChar* string #endif #endif void wxLogStatusFrame( frame, string ) wxFrame* frame const wxChar* string CODE: wxLogStatus( frame, string ); void wxLogStatus( string ) const wxChar* string #if WXPERL_W_VERSION_LE( 2, 5, 0 ) void wxLogTrace( string ) const wxChar* string #endif void wxLogTraceMask( mask, string ) const wxChar* mask const wxChar* string CODE: wxLogTrace( mask, string ); void wxLogSysError( string ) const wxChar* string MODULE=Wx PACKAGE=Wx PREFIX=wx unsigned long wxSysErrorCode() const wxChar* wxSysErrorMsg( errCode = 0 ) unsigned long errCode MODULE=Wx PACKAGE=Wx::LogChain wxLogChain* wxLogChain::new( logger ) wxLog* logger wxLog* wxLogChain::GetOldLog() #if WXPERL_W_VERSION_GE( 2, 8, 5 ) void wxLogChain::DetachOldLog() #endif bool wxLogChain::IsPassingMessages() void wxLogChain::PassMessages( passMessages ) bool passMessages void wxLogChain::SetLog( logger ) wxLog* logger MODULE=Wx PACKAGE=Wx::LogPassThrough wxLogPassThrough* wxLogPassThrough::new() MODULE=Wx PACKAGE=Wx::PlLogPassThrough wxPlLogPassThrough* wxPlLogPassThrough::new() CODE: RETVAL = new wxPlLogPassThrough( CLASS ); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::LogStderr wxLogStderr* wxLogStderr::new( fp = NULL ) FILE* fp; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) MODULE=Wx PACKAGE=Wx::PlLogFormatter wxPlLogFormatter* wxPlLogFormatter::new() CODE: RETVAL = new wxPlLogFormatter( CLASS ); OUTPUT: RETVAL void wxPlLogFormatter::Destroy() CODE: delete THIS; MODULE=Wx PACKAGE=Wx::LogFormatter void wxLogFormatter::Destroy() CODE: delete THIS; MODULE=Wx PACKAGE=Wx::LogRecordInfo const char* wxLogRecordInfo::filename() CODE: RETVAL = THIS->filename; OUTPUT: RETVAL int wxLogRecordInfo::line() CODE: RETVAL = THIS->line; OUTPUT: RETVAL const char* wxLogRecordInfo::func() CODE: RETVAL = THIS->func; OUTPUT: RETVAL const char* wxLogRecordInfo::component() CODE: RETVAL = THIS->filename; OUTPUT: RETVAL time_t wxLogRecordInfo::timestamp() CODE: RETVAL = THIS->timestamp; OUTPUT: RETVAL void StoreValue( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT(wxPliOvl_s_n, Wx::LogRecordInfo::StoreNumValue, 2 ) MATCH_REDISP_COUNT(wxPliOvl_s_s, Wx::LogRecordInfo::StoreStrValue, 2 ) END_OVERLOAD( "Wx::LogRecordInfo::StoreValue" ) void wxLogRecordInfo::StoreNumValue( key, val ) wxString key wxUIntPtr val CODE: THIS->StoreValue( key, val ); void wxLogRecordInfo::StoreStrValue( key, val ) wxString key wxString val CODE: THIS->StoreValue( key, val ); void wxLogRecordInfo::GetNumValue( key ) wxString key PREINIT: wxUIntPtr val; PPCODE: bool result = THIS->GetNumValue( key, &val); EXTEND( SP, 1 ); if(result) { PUSHs( sv_2mortal( newSVuv( val ) ) ); } else { PUSHs( &PL_sv_undef ); } void wxLogRecordInfo::GetStrValue( key ) wxString key PREINIT: wxString val; PPCODE: bool result = THIS->GetStrValue( key, &val); EXTEND( SP, 1 ); if(result) { SV* sv = sv_newmortal(); wxPli_wxString_2_sv( aTHX_ val, sv ); } else { PUSHs( &PL_sv_undef ); } #endif Wx-0.9923/XS/Menu.xs000664000000000000 3704612306612233 12323 0ustar00Mark000000000000############################################################################# ## Name: XS/Menu.xs ## Purpose: XS for Wx::Menu, Wx::MenuBar, Wx::MenuItem ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Menu.xs 3137 2012-02-28 00:29:39Z mdootson $ ## Copyright: (c) 2000-2004, 2006-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 ############################################################################# #include MODULE=Wx PACKAGE=Wx::Menu wxMenu* wxMenu::new( title = wxEmptyString, style = 0) wxString title long style #if WXPERL_W_VERSION_GE( 2, 7, 0 ) wxMenuItem* wxMenu::AppendSubMenu( submenu, text, help = wxEmptyString ) wxMenu* submenu wxString text wxString help #endif void wxMenu::AppendString( id, item = wxEmptyString, help = wxEmptyString, kind = wxITEM_NORMAL ) int id wxString item wxString help wxItemKind kind PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->Append( id, item, help, kind ) ) ); #else THIS->Append( id, item, help, kind ); #endif void wxMenu::AppendSubMenu_( id, item, subMenu, helpString = wxEmptyString ) int id wxString item wxMenu* subMenu wxString helpString PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->Append( id, item, subMenu, helpString ) ) ); #else THIS->Append( id, item, subMenu, helpString ); #endif void wxMenu::AppendItem( menuItem ) wxMenuItem* menuItem PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->Append( menuItem ) ) ); #else THIS->Append( menuItem ); #endif void wxMenu::AppendCheckItem( id, item, helpString = wxEmptyString ) int id wxString item wxString helpString PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->AppendCheckItem( id, item, helpString ) ) ); #else THIS->AppendCheckItem( id, item, helpString ); #endif void wxMenu::AppendRadioItem( id, item, helpString = wxEmptyString ) int id wxString item wxString helpString PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->AppendRadioItem( id, item, helpString ) ) ); #else THIS->AppendRadioItem( id, item, helpString ); #endif void wxMenu::AppendSeparator() PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->AppendSeparator() ) ); #else THIS->AppendSeparator(); #endif void wxMenu::Break() void wxMenu::Check( id, check ) int id bool check void wxMenu::DeleteId( id ) int id CODE: THIS->Delete( id ); void wxMenu::DeleteItem( item ) wxMenuItem* item CODE: THIS->Delete( item ); void wxMenu::DestroyMenu() CODE: delete THIS; void wxMenu::DestroyId( id ) int id CODE: THIS->Destroy( id ); void wxMenu::DestroyItem( item ) wxMenuItem* item CODE: THIS->Destroy( item ); void wxMenu::Enable( id, enable ) int id bool enable #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxMenuItem* wxMenu::FindItemByPosition( pos ) size_t pos #endif void wxMenu::FindItem( item ) SV* item PPCODE: if( looks_like_number( item ) ) { int id = SvIV( item ); wxMenu* submenu; wxMenuItem* ret; ret = THIS->FindItem( id, &submenu ); SV* mi = sv_newmortal(); if( GIMME_V == G_ARRAY ) { EXTEND( SP, 2 ); SV* sm = sv_newmortal(); PUSHs( wxPli_object_2_sv( aTHX_ mi, ret ) ); PUSHs( wxPli_object_2_sv( aTHX_ sm, submenu ) ); } else { EXTEND( SP, 1 ); PUSHs( wxPli_object_2_sv( aTHX_ mi, ret ) ); } } else { wxString string; WXSTRING_INPUT( string, const char*, item ); int id = THIS->FindItem( string ); EXTEND( SP, 1 ); PUSHs( sv_2mortal( newSViv( id ) ) ); } wxString wxMenu::GetHelpString( id ) int id wxString wxMenu::GetLabel( id ) int id #if WXPERL_W_VERSION_GE( 2, 8, 5 ) wxString wxMenu::GetLabelText( id ) int id #endif int wxMenu::GetMenuItemCount() void wxMenu::GetMenuItems() PPCODE: wxMenuItemList& data = THIS->GetMenuItems(); wxMenuItemList::compatibility_iterator node; EXTEND( SP, (IV) data.GetCount() ); for( node = data.GetFirst(); node; node = node->GetNext() ) { PUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), node->GetData() ) ); } wxString wxMenu::GetTitle() void wxMenu::InsertItem( pos, item ) int pos wxMenuItem* item PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->Insert( pos, item ) ) ); #else XPUSHs( THIS->Insert( pos, item ) ? &PL_sv_yes : &PL_sv_no ); #endif void wxMenu::InsertString( pos, id, item = wxEmptyString, helpString = wxEmptyString, kind = wxITEM_NORMAL ) int pos int id wxString item wxString helpString wxItemKind kind PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->Insert( pos, id, item, helpString, kind ) ) ); #else THIS->Insert( pos, id, item, helpString, kind ); #endif void wxMenu::InsertSubMenu( pos, id, text, submenu, help = wxEmptyString ) int pos int id wxString text wxMenu* submenu wxString help PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->Insert( pos, id, text, submenu, help ) ) ); #else THIS->Insert( pos, id, text, submenu, help ); #endif void wxMenu::InsertCheckItem( pos, id, item, helpString ) size_t pos int id wxString item wxString helpString PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->InsertCheckItem( pos, id, item, helpString ) ) ); #else THIS->InsertCheckItem( pos, id, item, helpString ); #endif void wxMenu::InsertRadioItem( pos, id, item, helpString ) size_t pos int id wxString item wxString helpString PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->InsertRadioItem( pos, id, item, helpString ) ) ); #else THIS->InsertRadioItem( pos, id, item, helpString ); #endif void wxMenu::InsertSeparator( pos ) size_t pos PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->InsertSeparator( pos ) ) ); #else THIS->InsertSeparator( pos ); #endif bool wxMenu::IsChecked( id ) int id bool wxMenu::IsEnabled( id ) int id void wxMenu::PrependString( id, item = wxEmptyString, help = wxEmptyString, kind = wxITEM_NORMAL ) int id wxString item wxString help wxItemKind kind PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->Prepend( id, item, help, kind ) ) ); #else THIS->Prepend( id, item, help, kind ); #endif void wxMenu::PrependItem( menuItem ) wxMenuItem* menuItem CODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->Prepend( menuItem ) ) ); #else THIS->Prepend( menuItem ); #endif void wxMenu::PrependSubMenu( id, item, subMenu, helpString = wxEmptyString ) int id wxString item wxMenu* subMenu wxString helpString CODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->Prepend( id, item, subMenu, helpString ) ) ); #else THIS->Prepend( id, item, subMenu, helpString ); #endif void wxMenu::PrependCheckItem( id, item, helpString = wxEmptyString ) int id wxString item wxString helpString PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->PrependCheckItem( id, item, helpString ) ) ); #else THIS->PrependCheckItem( id, item, helpString ); #endif void wxMenu::PrependRadioItem( id, item, helpString = wxEmptyString ) int id wxString item wxString helpString PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->PrependRadioItem( id, item, helpString ) ) ); #else THIS->PrependRadioItem( id, item, helpString ); #endif void wxMenu::PrependSeparator() PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) XPUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), THIS->PrependSeparator() ) ); #else THIS->PrependSeparator(); #endif wxMenuItem* wxMenu::RemoveId( id ) int id CODE: RETVAL = THIS->Remove( id ); OUTPUT: RETVAL wxMenuItem* wxMenu::RemoveItem( item ) wxMenuItem* item CODE: RETVAL = THIS->Remove( item ); OUTPUT: RETVAL void wxMenu::SetHelpString( id, helpString ) int id wxString helpString void wxMenu::SetLabel( id, label ) int id wxString label void wxMenu::SetTitle( title ) wxString title void wxMenu::UpdateUI( source = 0 ) wxEvtHandler* source #if defined(__WXGTK__) && WXPERL_W_VERSION_GE( 2, 7, 1 ) wxLayoutDirection wxMenu::GetLayoutDirection() void wxMenu::SetLayoutDirection( direction ) wxLayoutDirection direction #endif MODULE=Wx PACKAGE=Wx::MenuBar wxMenuBar* wxMenuBar::new( style = 0 ) long style bool wxMenuBar::Append( menu, title ) wxMenu* menu wxString title void wxMenuBar::Check( id, check ) int id bool check void wxMenuBar::Enable( id, enable ) int id bool enable void wxMenuBar::EnableTop( pos, enable ) int pos bool enable void wxMenuBar::FindItem( id ) int id PPCODE: wxMenu* submenu; wxMenuItem* ret; ret = THIS->FindItem( id, &submenu ); SV* mi = sv_newmortal(); if( GIMME_V == G_ARRAY ) { EXTEND( SP, 2 ); SV* sm = sv_newmortal(); PUSHs( wxPli_object_2_sv( aTHX_ mi, ret ) ); PUSHs( wxPli_object_2_sv( aTHX_ sm, submenu ) ); } else { EXTEND( SP, 1 ); PUSHs( wxPli_object_2_sv( aTHX_ mi, ret ) ); } int wxMenuBar::FindMenu( title ) wxString title int wxMenuBar::FindMenuItem( menuString, itemString ) wxString menuString wxString itemString wxString wxMenuBar::GetHelpString( id ) int id wxString wxMenuBar::GetLabel( id ) int id #if !WXPERL_W_VERSION_GE( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 wxString wxMenuBar::GetLabelTop( id ) int id #endif #if WXPERL_W_VERSION_GE( 2, 8, 5 ) wxString wxMenuBar::GetMenuLabel( id ) int id wxString wxMenuBar::GetMenuLabelText( id ) int id #endif wxMenu* wxMenuBar::GetMenu( index ) int index int wxMenuBar::GetMenuCount() bool wxMenuBar::Insert( pos, menu, title ) int pos wxMenu* menu wxString title bool wxMenuBar::IsChecked( id ) int id bool wxMenuBar::IsEnabled( id ) int id void wxMenuBar::Refresh() wxMenu* wxMenuBar::Remove( pos ) int pos wxMenu* wxMenuBar::Replace( pos, menu, title ) int pos wxMenu* menu wxString title void wxMenuBar::SetHelpString( id, helpString ) int id wxString helpString void wxMenuBar::SetLabel( id, label ) int id wxString label #if !WXPERL_W_VERSION_GE( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 void wxMenuBar::SetLabelTop( pos, label ) int pos wxString label #endif #if WXPERL_W_VERSION_GE( 2, 8, 5 ) void wxMenuBar::SetMenuLabel( pos, label ) int pos wxString label #endif bool wxMenuBar::IsEnabledTop( id ) int id #if defined(__WXGTK__) && WXPERL_W_VERSION_GE( 2, 7, 1 ) wxLayoutDirection wxMenuBar::GetLayoutDirection() void wxMenuBar::SetLayoutDirection( direction ) wxLayoutDirection direction #endif #if defined( __WXMAC__ ) void wxMenuBar::MacInstallMenuBar() wxMenuBar* MacGetInstalledMenuBar() CODE: RETVAL = wxMenuBar::MacGetInstalledMenuBar(); OUTPUT: RETVAL void MacSetCommonMenuBar( menubar ) wxMenuBar* menubar CODE: wxMenuBar::MacSetCommonMenuBar( menubar ); wxMenuBar* MacGetCommonMenuBar() CODE: RETVAL = wxMenuBar::MacGetCommonMenuBar(); OUTPUT: RETVAL #endif MODULE=Wx PACKAGE=Wx::MenuItem wxMenuItem* wxMenuItem::new( parentMenu = 0, id = wxID_ANY, text = wxEmptyString, helpString = wxEmptyString, itemType = wxITEM_NORMAL, subMenu = 0 ) wxMenu* parentMenu int id wxString text wxString helpString wxItemKind itemType wxMenu* subMenu void wxMenuItem::Check( check ) bool check # void # wxMenuItem::DeleteSubMenu() void wxMenuItem::Enable( enable ) bool enable #if defined( __WXMSW__ ) && !defined( __WXWINCE__ ) wxColour* wxMenuItem::GetBackgroundColour() CODE: RETVAL = new wxColour( THIS->GetBackgroundColour() ); OUTPUT: RETVAL wxFont* wxMenuItem::GetFont() CODE: RETVAL = new wxFont( THIS->GetFont() ); OUTPUT: RETVAL #endif #if ( defined( __WXMSW__ ) && !defined( __WXWINCE__ ) ) || \ defined( __WXGTK__ ) wxBitmap* wxMenuItem::GetBitmap() CODE: RETVAL = new wxBitmap( THIS->GetBitmap() ); OUTPUT: RETVAL #endif wxString wxMenuItem::GetHelp() #if WXPERL_W_VERSION_LT( 2, 9, 0 ) && !defined(__WXMSW__) wxString wxMenuItem::GetName() #endif int wxMenuItem::GetId() wxItemKind wxMenuItem::GetKind() #if !WXPERL_W_VERSION_GE( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 wxString wxMenuItem::GetLabel() wxString GetLabelFromText( text ) wxString text CODE: RETVAL = wxMenuItem::GetLabelFromText( text ); OUTPUT: RETVAL #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxString wxMenuItem::GetItemLabel() wxString wxMenuItem::GetItemLabelText() wxString GetLabelText( text ) wxString text CODE: RETVAL = wxMenuItem::GetLabelText( text ); OUTPUT: RETVAL #endif wxMenu* wxMenuItem::GetMenu() #if defined( __WXMSW__ ) && !defined( __WXWINCE__ ) int wxMenuItem::GetMarginWidth() #endif #if !WXPERL_W_VERSION_GE( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 wxString wxMenuItem::GetText() #endif wxMenu* wxMenuItem::GetSubMenu() #if defined( __WXMSW__ ) && !defined( __WXWINCE__ ) wxColour* wxMenuItem::GetTextColour() CODE: RETVAL = new wxColour( THIS->GetTextColour() ); OUTPUT: RETVAL #endif bool wxMenuItem::IsCheckable() bool wxMenuItem::IsChecked() bool wxMenuItem::IsEnabled() bool wxMenuItem::IsSeparator() bool wxMenuItem::IsSubMenu() #if defined( __WXMSW__ ) && !defined( __WXWINCE__ ) void wxMenuItem::SetBackgroundColour( colour ) wxColour* colour CODE: THIS->SetBackgroundColour( *colour ); void wxMenuItem::SetFont( font ) wxFont* font CODE: THIS->SetFont( *font ); #endif void wxMenuItem::SetHelp( helpString ) wxString helpString void wxMenuItem::SetMenu( menu ) wxMenu* menu void wxMenuItem::SetSubMenu( menu ) wxMenu* menu #if !WXPERL_W_VERSION_GE( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 void wxMenuItem::SetText( text ) wxString text #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void wxMenuItem::SetItemLabel( label ) wxString label #endif #if defined( __WXMSW__ ) && !defined( __WXWINCE__ ) void wxMenuItem::SetMarginWidth( width ) int width # void # wxMenuItem::SetName( text ) # wxString text void wxMenuItem::SetTextColour( colour ) wxColour* colour CODE: THIS->SetTextColour( *colour ); void wxMenuItem::SetBitmaps( checked, unchecked = (wxBitmap*)&wxNullBitmap ) wxBitmap* checked wxBitmap* unchecked CODE: THIS->SetBitmaps( *checked, *unchecked ); #endif #if ( defined( __WXMSW__ ) && !defined( __WXWINCE__ ) ) || \ defined( __WXGTK__ ) void wxMenuItem::SetBitmap( bitmap ) wxBitmap* bitmap CODE: THIS->SetBitmap( *bitmap ); #endif Wx-0.9923/XS/MessageDialog.xsp000664000000000000 347212306612233 14257 0ustar00Mark000000000000############################################################################# ## Name: XS/MessageDialog.xsp ## Purpose: XS for Wx::MessageDialog ## Author: Mattia Barbon ## Modified by: ## Created: 27/11/2000 ## RCS-ID: $Id: MessageDialog.xsp 3225 2012-03-18 05:19:39Z mdootson $ ## Copyright: (c) 2000-2004, 2007 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}; %typemap{wxMessageDialog*}{simple}; #include #define wxPL_MSGDLG_STYLE wxOK|wxCENTRE %name{Wx::MessageDialog} class wxMessageDialog { wxMessageDialog( wxWindow* parent, wxString message, wxString caption = wxMessageBoxCaptionStr, long style = wxPL_MSGDLG_STYLE, wxPoint pos = wxDefaultPosition ); int ShowModal(); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool SetYesNoLabels( const wxString& yes, const wxString& no ); bool SetYesNoCancelLabels( const wxString& yes, const wxString& no, const wxString& cancel ); bool SetOKLabel( const wxString& ok ); bool SetOKCancelLabels( const wxString& ok, const wxString& cancel ); void SetMessage( const wxString& message ); void SetExtendedMessage( const wxString& extendedMessage ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 3 ) bool SetHelpLabel(const wxString& help); #endif }; %name{Wx::MessageBox} int wxMessageBox( wxString message, wxString caption = wxT("Message"), int style = wxPL_MSGDLG_STYLE, wxWindow* parent = NULL, int x = -1, int y = -1 ); Wx-0.9923/XS/MimeTypes.xsp000664000000000000 1225412306612233 13505 0ustar00Mark000000000000############################################################################# ## Name: XS/MimeTypes.xsp ## Purpose: XS++ for wxMimeTypesManager and related classes ## Author: Mattia Barbon ## Modified by: ## Created: 28/03/2005 ## RCS-ID: $Id: MimeTypes.xsp 2911 2010-04-26 19:51:34Z mbarbon $ ## Copyright: (c) 2005-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}; %{ #if wxUSE_MIMETYPE #include %} %typemap{wxMimeTypesManager*}{simple}; %typemap{wxFileType*}{simple}; %typemap{wxIconLocation*}{simple}; %typemap{wxFileTypeInfo*}{simple}; %typemap{const wxFileTypeInfo*}{parsed}{ %cpp_type{%wxFileTypeInfo*%}; }; #if WXPERL_W_VERSION_GE( 2, 5, 2 ) %name{Wx::IconLocation} class wxIconLocation { bool IsOk() const; }; #endif %name{Wx::FileTypeInfo} class wxFileTypeInfo { bool IsValid() const; void SetIcon( const wxString& iconFile, int iconIndex = 0 ); void SetShortDesc( const wxString& shortDesc ); const wxString& GetMimeType() const; const wxString& GetOpenCommand() const; const wxString& GetPrintCommand() const; const wxString& GetShortDesc() const; const wxString& GetDescription() const; int GetExtensionsCount() const; const wxString& GetIconFile(); int GetIconIndex() const; }; %{ wxFileTypeInfo* wxFileTypeInfo::new( strings ) wxArrayString strings void wxFileTypeInfo::GetExtensions() PPCODE: const wxArrayString& extensions = THIS->GetExtensions(); PUTBACK; wxPli_stringarray_push( aTHX_ extensions ); SPAGAIN; %} %name{Wx::FileType} class wxFileType { }; %{ void wxFileType::GetMimeTypes() PREINIT: wxArrayString mimeTypes; PPCODE: bool ok = THIS->GetMimeTypes( mimeTypes ); if( ok ) { PUTBACK; wxPli_stringarray_push( aTHX_ mimeTypes ); SPAGAIN; } else XSRETURN_EMPTY; void wxFileType::GetMimeType() PREINIT: wxString mimeType; PPCODE: bool ok = THIS->GetMimeType( &mimeType ); if( ok ) { XPUSHs( wxPli_wxString_2_sv( aTHX_ mimeType, sv_newmortal() ) ); } else XSRETURN_EMPTY; void wxFileType::GetExtensions() PREINIT: wxArrayString extensions; PPCODE: bool ok = THIS->GetExtensions( extensions ); if( ok ) { PUTBACK; wxPli_stringarray_push( aTHX_ extensions ); SPAGAIN; } else XSRETURN_EMPTY; void wxFileType::GetIcon() PREINIT: #if WXPERL_W_VERSION_GE( 2, 5, 2 ) wxIconLocation iconLoc; #else wxIcon iconLoc; #endif PPCODE: bool ok = THIS->GetIcon( &iconLoc ); if( ok ) { #if WXPERL_W_VERSION_GE( 2, 5, 2 ) XPUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxIconLocation( iconLoc ), "Wx::IconLocation" ) ); #else XPUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxIcon( iconLoc ), "Wx::Icon" ) ); #endif } else XSRETURN_EMPTY; void wxFileType::GetDescription() PREINIT: wxString desc; PPCODE: bool ok = THIS->GetDescription( &desc ); if( ok ) { XPUSHs( wxPli_wxString_2_sv( aTHX_ desc, sv_newmortal() ) ); } else XSRETURN_EMPTY; void wxFileType::GetOpenCommand( file, mimeType = wxEmptyString ) wxString file wxString mimeType PREINIT: wxString command; PPCODE: bool ok = THIS->GetOpenCommand( &command, wxFileType::MessageParameters ( file, mimeType ) ); if( ok ) XPUSHs( wxPli_wxString_2_sv( aTHX_ command, sv_newmortal() ) ); else XSRETURN_EMPTY; void wxFileType::GetPrintCommand( file, mimeType = wxEmptyString ) wxString file wxString mimeType PREINIT: wxString command; PPCODE: bool ok = THIS->GetPrintCommand( &command, wxFileType::MessageParameters ( file, mimeType ) ); if( ok ) XPUSHs( wxPli_wxString_2_sv( aTHX_ command, sv_newmortal() ) ); else XSRETURN_EMPTY; %} %name{Wx::MimeTypesManager} class wxMimeTypesManager { wxMimeTypesManager(); %{ static void wxMimeTypesManager::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxMimeTypesManager() %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::MimeTypesManager", THIS, ST(0) ); delete THIS; %}; void AddFallbacks( const wxFileTypeInfo *fallbacks ); wxFileType* GetFileTypeFromExtension( const wxString& extension ); wxFileType* GetFileTypeFromMimeType( const wxString& mimeType ); bool IsOfType( const wxString& mimeType, const wxString& wildcard ); #if WXPERL_W_VERSION_LT( 2, 9, 0 ) bool ReadMailcap( const wxString& filename, bool fallback = false ); bool ReadMimeTypes( const wxString& filename ); #endif }; %{ #endif // wxUSE_MIMETYPE %} Wx-0.9923/XS/MultiChoiceDialog.xs000664000000000000 316012306612233 14712 0ustar00Mark000000000000############################################################################# ## Name: XS/MultiChoiceDialog.xs ## Purpose: XS for Wx::MultiChoiceDialog ## Author: Mattia Barbon ## Modified by: ## Created: 03/02/2001 ## RCS-ID: $Id: MultiChoiceDialog.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2004 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::MultiChoiceDialog wxMultiChoiceDialog* wxMultiChoiceDialog::new( parent, message, caption, chs, style = wxCHOICEDLG_STYLE, pos = wxDefaultPosition ) wxWindow* parent wxString message wxString caption SV* chs long style wxPoint pos PREINIT: wxString* choices; int n; CODE: n = wxPli_av_2_stringarray( aTHX_ chs, &choices ); RETVAL = new wxMultiChoiceDialog( parent, message, caption, n, choices, style, pos ); delete[] choices; OUTPUT: RETVAL void wxMultiChoiceDialog::GetSelections() PREINIT: wxArrayInt ret; int i, max; PPCODE: ret = THIS->GetSelections(); max = ret.GetCount(); EXTEND( SP, max ); for( i = 0; i < max; ++i ) { PUSHs( sv_2mortal( newSViv( ret[i] ) ) ); } void wxMultiChoiceDialog::SetSelections( ... ) PREINIT: wxArrayInt array; int i; CODE: array.Alloc( items - 1 ); for( i = 1; i < items; ++i ) { array.Add( SvIV( ST( i ) ) ); } THIS->SetSelections( array ); Wx-0.9923/XS/Notebook.xs000664000000000000 743512306612233 13156 0ustar00Mark000000000000############################################################################# ## Name: XS/Notebook.xs ## Purpose: XS for Wx::Notebook ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Notebook.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2003, 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 #if WXPERL_W_VERSION_LT( 2, 6, 0 ) #define wxNotebookNameStr wxT("notebook") #endif MODULE=Wx_Evt PACKAGE=Wx::NotebookEvent wxNotebookEvent* wxNotebookEvent::new( eventType = wxEVT_NULL, id = 0, sel = -1, oldSel = -1 ) wxEventType eventType int id int sel int oldSel #if WXPERL_W_VERSION_LE( 2, 5, 1 ) int wxNotebookEvent::GetOldSelection() int wxNotebookEvent::GetSelection() void wxNotebookEvent::SetOldSelection( sel ) int sel void wxNotebookEvent::SetSelection( oldSel ) int oldSel #endif MODULE=Wx PACKAGE=Wx::Notebook void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Notebook::new" ) wxNotebook* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxNotebook(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxNotebook* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxNotebookNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxNotebook( parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxNotebook::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxNotebookNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name #if WXPERL_W_VERSION_LE( 2, 5, 1 ) bool wxNotebook::AddPage( page, text, select = false, imageId = -1 ) wxWindow* page wxString text bool select int imageId void wxNotebook::AdvanceSelection( forward = true ) bool forward bool wxNotebook::DeleteAllPages() bool wxNotebook::DeletePage( page ) int page wxImageList* wxNotebook::GetImageList() OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); wxWindow* wxNotebook::GetPage( page ) int page int wxNotebook::GetPageCount() int wxNotebook::GetPageImage( page ) int page wxString wxNotebook::GetPageText( page ) int page int wxNotebook::GetSelection() bool wxNotebook::InsertPage( index, page, text, select = false, imageId = -1 ) int index wxWindow* page wxString text bool select int imageId bool wxNotebook::RemovePage( page ) int page void wxNotebook::SetImageList( imagelist ) wxImageList* imagelist bool wxNotebook::SetPageImage( page, image ) int page int image bool wxNotebook::SetPageText( page, text ) int page wxString text int wxNotebook::SetSelection( page ) int page #endif #if WXPERL_W_VERSION_GE( 2, 5, 2 ) && WXPERL_W_VERSION_LT( 2, 7, 0 ) void wxNotebook::HitTest( point ) wxPoint point PREINIT: long flags; int item; PPCODE: item = THIS->HitTest( point, &flags ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( item ) ) ); PUSHs( sv_2mortal( newSViv( flags ) ) ); #endif int wxNotebook::GetRowCount() #if !defined( __WXMOTIF__ ) && !defined( __WXGTK__ ) || \ defined( __WXPERL_FORCE__ ) void wxNotebook::SetPadding( padding ) wxSize padding void wxNotebook::SetPageSize( padding ) wxSize padding #endif Wx-0.9923/XS/NotificationMessage.xsp000664000000000000 532512306612233 15505 0ustar00Mark000000000000############################################################################# ## Name: XS/NotificationMessage.xsp ## Purpose: XS++ for Wx::NotificationMessage ## Author: Mattia Barbon ## Modified by: ## Created: 25/12/2007 ## RCS-ID: $Id: NotificationMessage.xsp 3086 2011-10-09 02:43:04Z mdootson $ ## Copyright: (c) 2007, 2009 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}; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) #include %typemap{wxNotificationMessage*}{simple}; %name{Wx::NotificationMessage} class wxNotificationMessage { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::NotificationMessage::new" ) %} %name{newDefault} wxNotificationMessage(); #ifdef __WXMSW__ %name{newFull} wxNotificationMessage( const wxString& title, const wxString& message = wxEmptyString, wxWindow *parent = NULL, int flags = wxICON_INFORMATION ) %code{% RETVAL = new wxNotificationMessage( title, message, parent ); %}; #else %name{newFull} wxNotificationMessage( const wxString& title, const wxString& message = wxEmptyString, wxWindow *parent = NULL, int flags = wxICON_INFORMATION ); #endif %{ static void wxNotificationMessage::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxNotificationMessage() %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::NotificationMessage", THIS, ST(0) ); delete THIS; %}; bool Show( int timeout = -1 ); bool Close(); void SetFlags( int flags ); void SetTitle( const wxString& title ); void SetMessage( const wxString& message ); void SetParent( wxWindow *parent ); #ifdef __WXMSW__ # The necessary support for Taskbar Balloons is not in MSCV6 # Even if VC6 is used with Platform SDK, wxWidgets will not # build in balloon support so exclude on same criteria #if ( ( defined(__VISUALC__) && (__VISUALC__ >= 1300) ) || defined(__MINGW32__) ) %{ wxTaskBarIcon* UseTaskBarIcon( icon ) wxTaskBarIcon* icon CODE: RETVAL = wxNotificationMessage::UseTaskBarIcon( icon ); OUTPUT: RETVAL void AlwaysUseGeneric( alwaysUseGeneric ) bool alwaysUseGeneric CODE: wxNotificationMessage::AlwaysUseGeneric( alwaysUseGeneric ); %} #endif #endif }; #endif Wx-0.9923/XS/Overlay.xs000664000000000000 411612306612233 13010 0ustar00Mark000000000000############################################################################# ## Name: XS/Overlay.xs ## Purpose: XS for Wx::Overlay ## Author: Mark Dootson ## Modified by: ## Created: 31/01/2010 ## RCS-ID: $Id: Overlay.xs 2791 2010-02-09 22:01:57Z mbarbon $ ## Copyright: (c) 2000-2007, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if WXPERL_W_VERSION_GE( 2, 8, 0 ) #include #include #include #include MODULE=Wx PACKAGE=Wx::Overlay wxOverlay* new( CLASS ) SV* CLASS CODE: RETVAL = new wxOverlay(); OUTPUT: RETVAL static void wxOverlay::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxOverlay::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Overlay", THIS, ST(0) ); delete THIS; void wxOverlay::Reset() MODULE=Wx PACKAGE=Wx::DCOverlay # DECLARE_OVERLOAD( woly, Wx::Overlay ) wxDCOverlay* wxDCOverlay::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_woly_wdc, newDefault ) MATCH_REDISP( wxPliOvl_woly_wdc_n_n_n_n, newLong ) END_OVERLOAD( Wx::DCOverlay::new ) wxDCOverlay* newDefault( CLASS, overlay, dc ) SV* CLASS wxOverlay* overlay wxWindowDC* dc CODE: RETVAL = new wxDCOverlay( *overlay, dc); OUTPUT: RETVAL wxDCOverlay* newLong( CLASS, overlay, dc, x, y, width, height ) SV* CLASS wxOverlay* overlay wxWindowDC* dc int x int y int width int height CODE: RETVAL = new wxDCOverlay( *overlay, dc, x, y, width, height); OUTPUT: RETVAL static void wxDCOverlay::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxDCOverlay::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Overlay", THIS, ST(0) ); delete THIS; void wxDCOverlay::Clear() #endif Wx-0.9923/XS/OwnerDrawnComboBox.xsp000664000000000000 1363312306612233 15312 0ustar00Mark000000000000############################################################################# ## Name: XS/OwnerDrawnComboBox.xsp ## Purpose: XS++ for Wx::OwnerDrawnComboBox ## Author: Mattia Barbon ## Modified by: ## Created: 13/08/2007 ## RCS-ID: $Id: OwnerDrawnComboBox.xsp 3010 2011-02-20 16:27:27Z mbarbon $ ## Copyright: (c) 2007, 2010-2011 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}; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) #include %typemap{wxOwnerDrawnComboBox*}{simple}; %typemap{wxPlOwnerDrawnComboBox*}{simple}; %name{Wx::OwnerDrawnComboBox} class wxOwnerDrawnComboBox { int GetWidestItemWidth(); int GetWidestItem(); }; # the second regex is an horrible hack to solve ambiguity; maybe should # use real base classes instead of this hack? INCLUDE_COMMAND: $^X -pe "s/ItemContainerImmutable/OwnerDrawnComboBox/g;s/->(?=IsEmpty|GetStringSelection)/->wxItemContainerImmutable::/" XS/ItemContainerImmutable.xs INCLUDE_COMMAND: $^X -pe "s/ItemContainer/OwnerDrawnComboBox/g" XS/ItemContainer.xs %file{xspp/odcombo.h}; %{ #include "cpp/v_cback.h" // void METH(wxDC&, const wxRect&, int, int) #define DEC_V_CBACK_VOID__WXDC_WXRECT_INT_INT_const( METHOD ) \ void METHOD( wxDC& p1, const wxRect& p2, int p3, int p4 ) const #define DEF_V_CBACK_VOID__WXDC_WXRECT_INT_INT_const( CLASS, BASE, METHOD )\ void CLASS::METHOD( wxDC& p1, const wxRect& p2, int p3, int p4 ) const \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, \ G_SCALAR|G_DISCARD, \ "Qoii", &p1, \ new wxRect( p2 ), "Wx::Rect", \ p3, p4 ) ); \ return; \ } else \ BASE::METHOD( p1, p2, p3, p4 ); \ } class wxPlOwnerDrawnComboBox : public wxOwnerDrawnComboBox { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlOwnerDrawnComboBox ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPlOwnerDrawnComboBox, "Wx::OwnerDrawnComboBox", true ); WXPLI_CONSTRUCTOR_9( wxPlOwnerDrawnComboBox, "Wx::OwnerDrawnComboBox", true, wxWindow*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, const wxArrayString&, long, const wxValidator&, const wxString& ); DEC_V_CBACK_WXCOORD__SIZET_const( OnMeasureItem ); DEC_V_CBACK_WXCOORD__SIZET_const( OnMeasureItemWidth ); DEC_V_CBACK_VOID__WXDC_WXRECT_INT_INT_const( OnDrawItem ); DEC_V_CBACK_VOID__WXDC_WXRECT_INT_INT_const( OnDrawBackground ); }; DEF_V_CBACK_WXCOORD__SIZET_const( wxPlOwnerDrawnComboBox, wxOwnerDrawnComboBox, OnMeasureItem ); DEF_V_CBACK_WXCOORD__SIZET_const( wxPlOwnerDrawnComboBox, wxOwnerDrawnComboBox, OnMeasureItemWidth ); DEF_V_CBACK_VOID__WXDC_WXRECT_INT_INT_const( wxPlOwnerDrawnComboBox, wxOwnerDrawnComboBox, OnDrawItem ); DEF_V_CBACK_VOID__WXDC_WXRECT_INT_INT_const( wxPlOwnerDrawnComboBox, wxOwnerDrawnComboBox, OnDrawBackground ); WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlOwnerDrawnComboBox, wxOwnerDrawnComboBox ); %} %file{-}; #include "xspp/odcombo.h" %name{Wx::PlOwnerDrawnComboBox} class wxPlOwnerDrawnComboBox { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::PlOwnerDrawnComboBox::new" ) %} %name{newDefault} wxPlOwnerDrawnComboBox() %code{% RETVAL = new wxPlOwnerDrawnComboBox( CLASS ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxPlOwnerDrawnComboBox( wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxEmptyString) %code{% RETVAL = new wxPlOwnerDrawnComboBox( CLASS, parent, id, value, pos, size, choices, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxEmptyString ); }; #endif Wx-0.9923/XS/Palette.xs000664000000000000 420012306612233 12757 0ustar00Mark000000000000############################################################################# ## Name: XS/Palette.xs ## Purpose: XS for Wx::Palette ## Author: Mattia Barbon ## Modified by: ## Created: 09/01/2000 ## RCS-ID: $Id: Palette.xs 2069 2007-07-08 15:33:40Z mbarbon $ ## Copyright: (c) 2001-2002, 2004, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::Palette wxPalette* wxPalette::new( r, g, b ) SV* r SV* g SV* b PREINIT: unsigned char* red; unsigned char* green; unsigned char* blue; int rn, gn, bn; CODE: rn = wxPli_av_2_uchararray( aTHX_ r, &red ); gn = wxPli_av_2_uchararray( aTHX_ g, &green ); bn = wxPli_av_2_uchararray( aTHX_ b, &blue ); if( rn != gn || gn != bn ) { croak( "arrays must be of the same size" ); } RETVAL = new wxPalette( rn, red, green, blue ); delete[] red; delete[] green; delete[] blue; OUTPUT: RETVAL static void wxPalette::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxPalette::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Palette", THIS, ST(0) ); delete THIS; #if WXPERL_W_VERSION_GE( 2, 6, 1 ) int wxPalette::GetColoursCount() #endif int wxPalette::GetPixel( red, green, blue ) unsigned char red unsigned char green unsigned char blue void wxPalette::GetRGB( pixel ) int pixel PREINIT: unsigned char red, green, blue; PPCODE: if( THIS->GetRGB( pixel, &red, &green, &blue ) ) { EXTEND( SP, 3 ); PUSHs( sv_2mortal( newSVuv( red ) ) ); PUSHs( sv_2mortal( newSVuv( green ) ) ); PUSHs( sv_2mortal( newSVuv( blue ) ) ); } else { EXTEND( SP, 3 ); PUSHs( &PL_sv_undef ); PUSHs( &PL_sv_undef ); PUSHs( &PL_sv_undef ); } bool wxPalette::Ok() #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool wxPalette::IsOk() #endif Wx-0.9923/XS/Panel.xs000664000000000000 366612306612233 12437 0ustar00Mark000000000000############################################################################# ## Name: XS/Panel.xs ## Purpose: XS for Wx::Panel ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Panel.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2001, 2003-2004, 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 #include "cpp/panel.h" #include "cpp/overload.h" MODULE=Wx PACKAGE=Wx::Panel void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Panel::new" ) wxPanel* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxPliPanel( CLASS ); OUTPUT: RETVAL wxPanel* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxTAB_TRAVERSAL, name = wxPanelNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxPliPanel( CLASS, parent, id, pos, size, style, name ); OUTPUT: RETVAL bool wxPanel::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxTAB_TRAVERSAL, name = wxPanelNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name #if WXPERL_W_VERSION_GE( 2, 5, 4 ) void wxPanel::SetFocusIgnoringChildren() #endif bool wxPanel::TransferDataFromWindow() CODE: RETVAL = THIS->wxPanel::TransferDataFromWindow(); OUTPUT: RETVAL bool wxPanel::TransferDataToWindow() CODE: RETVAL = THIS->wxPanel::TransferDataToWindow(); OUTPUT: RETVAL bool wxPanel::Validate() CODE: RETVAL = THIS->wxPanel::Validate(); OUTPUT: RETVAL Wx-0.9923/XS/Pen.xs000664000000000000 763412306612233 12121 0ustar00Mark000000000000############################################################################# ## Name: XS/Pen.xs ## Purpose: XS for Wx::Pen ## Author: Mattia Barbon ## Modified by: ## Created: 21/11/2000 ## RCS-ID: $Id: Pen.xs 3125 2011-11-21 02:47:30Z mdootson $ ## Copyright: (c) 2000-2003, 2004, 2006-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include MODULE=Wx PACKAGE=Wx::Pen void wxPen::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wcol_n_n, newColour ) MATCH_REDISP( wxPliOvl_wbmp_n, newBitmap ) MATCH_REDISP( wxPliOvl_s_n_n, newString ) END_OVERLOAD( Wx::Pen::new ) wxPen* newColour( CLASS, colour, width, style ) SV* CLASS wxColour* colour int width int style CODE: RETVAL = new wxPen( *colour, width, style ); OUTPUT: RETVAL wxPen* newString( CLASS, name, width, style ) SV* CLASS wxString name int width int style CODE: RETVAL = new wxPen( name, width, style ); OUTPUT: RETVAL #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) wxPen* newBitmap( CLASS, stipple, width ) SV* CLASS wxBitmap* stipple int width CODE: RETVAL = new wxPen( *stipple, width ); OUTPUT: RETVAL #endif static void wxPen::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxPen::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Pen", THIS, ST(0) ); delete THIS; wxPenCap wxPen::GetCap() wxColour* wxPen::GetColour() CODE: RETVAL = new wxColour( THIS->GetColour() ); OUTPUT: RETVAL void wxPen::GetDashes() PREINIT: int i, n; wxDash* array; PPCODE: n = THIS->GetDashes( &array ); EXTEND( SP, n ); for( i = 0; i < n; ++i ) { PUSHs( sv_2mortal( newSViv( array[i] ) ) ); } wxPenJoin wxPen::GetJoin() #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) wxBitmap* wxPen::GetStipple() CODE: RETVAL = new wxBitmap( *THIS->GetStipple() ); OUTPUT: RETVAL #endif wxPenStyle wxPen::GetStyle() int wxPen::GetWidth() bool wxPen::Ok() #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool wxPen::IsOk() #endif void wxPen::SetCap( capStyle ) wxPenCap capStyle void wxPen::SetColour( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wcol, SetColourColour ) MATCH_REDISP( wxPliOvl_n_n_n, SetColourRGB ) MATCH_REDISP( wxPliOvl_s, SetColourName ) END_OVERLOAD( Wx::Pen::SetColour ) void wxPen::SetColourColour( colour ) wxColour* colour CODE: THIS->SetColour( *colour ); void wxPen::SetColourName( name ) wxString name CODE: THIS->SetColour( name ); void wxPen::SetColourRGB( r, g, b ) int r int g int b CODE: THIS->SetColour( r, g, b ); void wxPen::SetDashes( ds ) SV* ds PREINIT: int n = 0; wxDash* dashes = 0; wxDash* olddashes; CODE: THIS->GetDashes( &olddashes ); if( SvOK( ds ) ) { AV* av; SV* t; int i; if( !SvROK( ds ) || ( SvTYPE( (SV*) ( av = (AV*) SvRV( ds ) ) ) != SVt_PVAV ) ) { croak( "the value is not an array reference" ); XSRETURN_UNDEF; } n = av_len( av ) + 1; dashes = new wxDash[ n ]; for( i = 0; i < n; ++i ) { t = *av_fetch( av, i, 0 ); dashes[i] = SvIV( t ); } } THIS->SetDashes( n, dashes ); delete[] olddashes; void wxPen::SetJoin( join_style ) wxPenJoin join_style #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) void wxPen::SetStipple( stipple ) wxBitmap* stipple CODE: THIS->SetStipple( *stipple ); #endif void wxPen::SetStyle( style ) wxPenStyle style void wxPen::SetWidth( width ) int width Wx-0.9923/XS/PickerCtrl.xsp000664000000000000 234712306612233 13615 0ustar00Mark000000000000############################################################################# ## Name: XS/PickerCtrl.xsp ## Purpose: XS+++ for Wx::PickerBase ## Author: Mattia Barbon ## Modified by: ## Created: 01/11/2006 ## RCS-ID: $Id: PickerCtrl.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2006 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}; %{ #if WXPERL_W_VERSION_GE( 2, 7, 0 ) #include %} %typemap{wxPickerBase*}{simple}; %name{Wx::PickerBase} class wxPickerBase { void SetInternalMargin( int newmargin ); int GetInternalMargin() const; void SetTextCtrlProportion( int prop ); int GetTextCtrlProportion() const; void SetPickerCtrlProportion( int prop ); int GetPickerCtrlProportion() const; bool IsTextCtrlGrowable() const; void SetTextCtrlGrowable( bool grow = true ); bool IsPickerCtrlGrowable() const; void SetPickerCtrlGrowable( bool grow = true ); bool HasTextCtrl() const; wxTextCtrl* GetTextCtrl(); wxControl* GetPickerCtrl(); }; %{ #endif %} Wx-0.9923/XS/PlWindow.xsp000664000000000000 1755612306612233 13346 0ustar00Mark000000000000############################################################################# ## Name: XS/PlWindow.xsp ## Purpose: XS++ for Wx::PlWindow ## Author: Mattia Barbon ## Modified by: ## Created: 23/05/2004 ## RCS-ID: $Id: PlWindow.xsp 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2004-2007, 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}; ## TODO: Which (if any?) of these should be done also??? ## Destroy ## DoCaptureMouse ## DoClientToScreen ## DoHitTest ## DoPopupMenu ## DoReleaseMouse ## DoScreenToClient ## DoSetToolTip ## Fit ## GetCharHeight ## GetCharWidth ## GetClientAreaOrigin ## GetDefaultItem ## IsTopLevel ## SetBackgroundColour ## SetDefaultItem ## SetFocus ## SetFocusFromKbd ## SetForegroundColour ## SetSizeHints ## SetVirtualSizeHints ## Show %typemap{wxPlWindow*}{simple}; %file{xspp/plwindow.h}; %{ #include "cpp/v_cback.h" // ANY METH(int, int, int, int) #define DEC_V_CBACK_ANY__INT_INT_INT_INT_( RET, METHOD, CONST ) \ RET METHOD(int, int, int, int) CONST #define DEF_V_CBACK_ANY__INT_INT_INT_INT_( RET, CVT, CLASS, CALLBASE, METHOD, CONST ) \ RET CLASS::METHOD( int p1, int p2, int p3, int p4 ) CONST \ { \ dTHX; \ if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, #METHOD ) )\ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, \ "iiii", p1, p2, p3, p4 ) ); \ return CVT; \ } else \ CALLBASE; \ } // wxSize METH() #define DEC_V_CBACK_WXSIZE__VOID( METHOD ) \ DEC_V_CBACK_ANY__VOID_( wxSize, METHOD, wxPli_NOCONST ) #define DEC_V_CBACK_WXSIZE__VOID_const( METHOD ) \ DEC_V_CBACK_ANY__VOID_( wxSize, METHOD, wxPli_CONST ) #define DEF_V_CBACK_WXSIZE__VOID( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__VOID_( wxSize, wxPli_sv_2_wxsize( aTHX_ ret ), CLASS, return BASE::METHOD(), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_WXSIZE__VOID_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__VOID_( wxSize, wxPli_sv_2_wxsize( aTHX_ ret ), CLASS, return wxSize(), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_WXSIZE__VOID_const( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__VOID_( wxSize, wxPli_sv_2_wxsize( aTHX_ ret ), CLASS, return BASE::METHOD(), METHOD, wxPli_CONST ) // void METH(int, int, int, int) #define DEC_V_CBACK_VOID__INT_INT_INT_INT( METHOD ) \ DEC_V_CBACK_ANY__INT_INT_INT_INT_( void, METHOD, wxPli_NOCONST ) #define DEC_V_CBACK_VOID__INT_INT_INT_INT_const( METHOD ) \ DEC_V_CBACK_ANY__INT_INT_INT_INT_( void, METHOD, wxPli_CONST ) #define DEF_V_CBACK_VOID__INT_INT_INT_INT( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__INT_INT_INT_INT_( void, wxPli_VOID, CLASS, BASE::METHOD(p1, p2, p3, p4), METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__INT_INT_INT_INT_pure( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__INT_INT_INT_INT_( void, wxPli_VOID, CLASS, return, METHOD, wxPli_NOCONST ) #define DEF_V_CBACK_VOID__INT_INT_INT_INT_const( CLASS, BASE, METHOD ) \ DEF_V_CBACK_ANY__INT_INT_INT_INT_( void, wxPli_VOID, CLASS, BASE::METHOD(p1, p2, p3, p4), METHOD, wxPli_CONST ) class wxPlWindow : public wxWindow { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlWindow ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPlWindow, "Wx::Window", true ); WXPLI_CONSTRUCTOR_6( wxPlWindow, "Wx::Window", true, wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long, const wxString& ); virtual ~wxPlWindow(); wxSize base_DoGetBestSize() const { return wxWindow::DoGetBestSize(); } void base_DoMoveWindow( int x, int y, int w, int h ) { wxWindow::DoMoveWindow(x, y, w, h); } bool base_Enable( bool enable ) { return wxWindow::Enable( enable ); } DEC_V_CBACK_WXSIZE__VOID_const( DoGetBestSize ); DEC_V_CBACK_BOOL__VOID_const( AcceptsFocus ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEC_V_CBACK_BOOL__VOID_const( AcceptsFocusRecursively ); #endif DEC_V_CBACK_BOOL__VOID_const( AcceptsFocusFromKeyboard ); DEC_V_CBACK_VOID__INT_INT_INT_INT( DoMoveWindow ); DEC_V_CBACK_BOOL__BOOL( Enable ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) DEC_V_CBACK_WXSIZE__VOID_const( GetMinSize ); DEC_V_CBACK_WXSIZE__VOID_const( GetMaxSize ); #endif }; DEF_V_CBACK_WXSIZE__VOID_const( wxPlWindow, wxWindow, DoGetBestSize ); DEF_V_CBACK_BOOL__VOID_const( wxPlWindow, wxWindow, AcceptsFocus ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEF_V_CBACK_BOOL__VOID_const( wxPlWindow, wxWindow, AcceptsFocusRecursively ); #endif DEF_V_CBACK_BOOL__VOID_const( wxPlWindow, wxWindow, AcceptsFocusFromKeyboard ); DEF_V_CBACK_VOID__INT_INT_INT_INT( wxPlWindow, wxWindow, DoMoveWindow ); DEF_V_CBACK_BOOL__BOOL( wxPlWindow, wxWindow, Enable ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) DEF_V_CBACK_WXSIZE__VOID_const( wxPlWindow, wxWindow, GetMinSize ); DEF_V_CBACK_WXSIZE__VOID_const( wxPlWindow, wxWindow, GetMaxSize ); #endif WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlWindow, wxWindow ); wxPlWindow::~wxPlWindow() { dTHX; if( wxPliVirtualCallback_FindCallback( aTHX_ &m_callback, "DoDestroy" ) ) { // Call DoDestroy if it exists wxPliVirtualCallback_CallCallback( aTHX_ &m_callback, 0, "" ); } } %} %file{-}; #include "xspp/plwindow.h" %{ #define GetMaxSize wxWindow::GetMaxSize #define GetMinSize wxWindow::GetMinSize #define AcceptsFocus wxWindow::AcceptsFocus #define AcceptsFocusRecursively wxWindow::AcceptsFocusRecursively #define AcceptsFocusFromKeyboard wxWindow::AcceptsFocusFromKeyboard %} %name{Wx::PlWindow} class wxPlWindow { %name{newDefault} wxPlWindow() %code{% RETVAL = new wxPlWindow( CLASS ); // wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxPlWindow(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxEmptyString) %code{% RETVAL = new wxPlWindow( CLASS, parent, id, pos, size, style, name ); // wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxEmptyString); %name{DoGetBestSize} wxSize base_DoGetBestSize() const; %name{DoMoveWindow} void base_DoMoveWindow( int x, int y, int w, int h ); %name{Enable} bool base_Enable( bool enable ); bool AcceptsFocus() const; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool AcceptsFocusRecursively() const; #endif bool AcceptsFocusFromKeyboard() const; #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxSize GetMaxSize() const; wxSize GetMinSize() const; #endif }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::PlWindow::new" ) %} %{ #undef GetMaxSize #undef GetMinSize #undef AcceptsFocus #undef AcceptsFocusRecursively #undef AcceptsFocusFromKeyboard %} Wx-0.9923/XS/PopupWindow.xsp000664000000000000 1377512306612233 14075 0ustar00Mark000000000000############################################################################# ## Name: XS/PopupWindow.xsp ## Purpose: XS++ for Wx::PopupWindow and Wx::PopupTransientWindow ## Author: Mattia Barbon ## Modified by: ## Created: 18/03/2005 ## RCS-ID: $Id: PopupWindow.xsp 2927 2010-06-06 08:06:10Z mbarbon $ ## Copyright: (c) 2005-2006, 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}; #if wxUSE_POPUPWIN %typemap{wxPopupWindow*}{simple}; %typemap{wxPopupTransientWindow*}{simple}; %typemap{wxPlPopupTransientWindow*}{simple}; %typemap{wxMouseEvent&}{reference}; %{ #include "wx/popupwin.h" #include "xspp/popupwin.h" %} %file{xspp/popupwin.h}; %{ #define DEC_V_CBACK_BOOL__WXMOUSEEVENT( METHOD ) \ bool METHOD( wxMouseEvent& event ) #define DEF_V_CBACK_BOOL__WXMOUSEEVENT( CLASS, BASE, METHOD ) \ bool CLASS::METHOD( wxMouseEvent& param1 ) \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV evt( aTHX_ wxPli_object_2_sv( aTHX_ newSViv( 0 ), ¶m1 ));\ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, \ "S", (SV*) evt ) ); \ sv_setiv( SvRV( evt ), 0 ); \ return SvTRUE( ret ); \ } else \ return BASE::METHOD( param1 ); \ } class wxPlPopupTransientWindow : public wxPopupTransientWindow { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlPopupTransientWindow ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPlPopupTransientWindow, "Wx::PlPopupTransientWindow", true ); WXPLI_CONSTRUCTOR_2( wxPlPopupTransientWindow, "Wx::PlPopupTransientWindow", true, wxWindow*, int ); DEC_V_CBACK_VOID__WXWINDOW( Popup ); DEC_V_CBACK_VOID__VOID( Dismiss ); DEC_V_CBACK_BOOL__VOID( CanDismiss ); DEC_V_CBACK_BOOL__WXMOUSEEVENT( ProcessLeftDown ); DEC_V_CBACK_BOOL__BOOL( Show ); }; DEF_V_CBACK_VOID__WXWINDOW( wxPlPopupTransientWindow, wxPopupTransientWindow, Popup ); DEF_V_CBACK_VOID__VOID( wxPlPopupTransientWindow, wxPopupTransientWindow, Dismiss ); DEF_V_CBACK_BOOL__VOID( wxPlPopupTransientWindow, wxPopupTransientWindow, CanDismiss ); DEF_V_CBACK_BOOL__WXMOUSEEVENT( wxPlPopupTransientWindow, wxPopupTransientWindow, ProcessLeftDown ); DEF_V_CBACK_BOOL__BOOL( wxPlPopupTransientWindow, wxPopupTransientWindow, Show ); WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlPopupTransientWindow, wxPopupTransientWindow ); %} %file{-}; %name{Wx::PopupWindow} class wxPopupWindow { %name{newDefault} wxPopupWindow() %code{% RETVAL = new wxPopupWindow(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxPopupWindow( wxWindow *parent, int flags = wxBORDER_NONE ) %code{% RETVAL = new wxPopupWindow( parent, flags ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, int flags = wxBORDER_NONE ); void Position( const wxPoint& ptOrigin, const wxSize& size ); }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::PopupWindow::new" ) %} %name{Wx::PopupTransientWindow} class wxPopupTransientWindow { %name{newDefault} wxPopupTransientWindow() %code{% RETVAL = new wxPopupTransientWindow(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxPopupTransientWindow( wxWindow *parent, int flags = wxBORDER_NONE ) %code{% RETVAL = new wxPopupTransientWindow( parent, flags ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; void Popup( wxWindow *focus = NULL ); void Dismiss(); bool CanDismiss(); bool ProcessLeftDown( wxMouseEvent& event ); }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::PopupTransientWindow::new" ) #define Popup wxPopupTransientWindow::Popup #define Dismiss wxPopupTransientWindow::Dismiss #define CanDismiss wxPopupTransientWindow::CanDismiss #define ProcessLeftDown wxPopupTransientWindow::ProcessLeftDown %} %name{Wx::PlPopupTransientWindow} class wxPlPopupTransientWindow { %name{newDefault} wxPlPopupTransientWindow() %code{% RETVAL = new wxPlPopupTransientWindow( CLASS ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxPlPopupTransientWindow( wxWindow *parent, int flags = wxBORDER_NONE ) %code{% RETVAL = new wxPlPopupTransientWindow( CLASS, parent, flags ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; void Popup( wxWindow *focus = NULL ); void Dismiss(); bool CanDismiss(); bool ProcessLeftDown( wxMouseEvent& event ); }; %{ #undef Popup #undef Dismiss #undef CanDismiss #undef ProcessLeftDown void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::PlPopupTransientWindow::new" ) #endif // wxUSE_POPUPWIN %} Wx-0.9923/XS/Power.xsp000664000000000000 170312306612233 12642 0ustar00Mark000000000000############################################################################# ## Name: XS/Power.xsp ## Purpose: XS++ for power-related events/functions ## Author: Mattia Barbon ## Modified by: ## Created: 30/07/2006 ## RCS-ID: $Id: Power.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2006 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}; %typemap{wxPowerType}{simple}; %typemap{wxBatteryState}{simple}; %{ #if WXPERL_W_VERSION_GE( 2, 7, 0 ) #include #ifdef wxHAS_POWER_EVENTS %} %name{Wx::PowerEvent} class wxPowerEvent { void Veto(); bool IsVetoed(); }; %{ #endif %} %name{Wx::GetPowerType} wxPowerType wxGetPowerType(); %name{Wx::GetBatteryState} wxBatteryState wxGetBatteryState(); %{ #endif %} Wx-0.9923/XS/Process.xs000664000000000000 1033712306612233 13027 0ustar00Mark000000000000############################################################################# ## Name: XS/Process.xs ## Purpose: XS for Wx::Process and Wx::ProcessEvent and Wx::Execute ## Author: Mattia Barbon ## Modified by: ## Created: 11/02/2002 ## RCS-ID: $Id: Process.xs 3252 2012-03-27 00:03:15Z mdootson $ ## Copyright: (c) 2002-2004, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include "cpp/process.h" #include MODULE=Wx PACKAGE=Wx::ProcessEvent wxProcessEvent* wxProcessEvent::new( id = 0, pid = 0, status = 0 ) int id int pid int status int wxProcessEvent::GetPid() int wxProcessEvent::GetExitCode() MODULE=Wx PACKAGE=Wx::Process wxProcess* wxProcess::new( parent = 0, id = -1 ) wxEvtHandler* parent int id CODE: RETVAL = new wxPliProcess( CLASS, parent, id ); OUTPUT: RETVAL void wxProcess::Destroy() CODE: delete THIS; void wxProcess::CloseOutput() void wxProcess::Detach() wxInputStream* wxProcess::GetErrorStream() wxInputStream* wxProcess::GetInputStream() wxOutputStream* wxProcess::GetOutputStream() bool wxProcess::IsErrorAvailable() bool wxProcess::IsInputAvailable() bool wxProcess::IsInputOpened() #if WXPERL_W_VERSION_LT( 2, 5, 4 ) #define wxKILL_NOCHILDREN 0 #endif wxKillError Kill( pid, signal = wxSIGNONE, flags = wxKILL_NOCHILDREN ) int pid wxSignal signal int flags CODE: #if WXPERL_W_VERSION_GE( 2, 5, 4 ) RETVAL = wxProcess::Kill( pid, signal, flags ); #else RETVAL = wxProcess::Kill( pid, signal ); #endif OUTPUT: RETVAL bool Exists( pid ) int pid CODE: RETVAL = wxProcess::Exists( pid ); OUTPUT: RETVAL void wxProcess::OnTerminate( pid, status ) int pid int status CODE: THIS->wxProcess::OnTerminate( pid, status ); void wxProcess::Redirect() wxProcess* Open( cmd, flags = wxEXEC_ASYNC ) wxString cmd int flags CODE: RETVAL = wxProcess::Open( cmd, flags ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 7, 2 ) int wxProcess::GetPid() #endif MODULE=Wx PACKAGE=Wx PREFIX=wx long wxExecuteCommand( command, sync = wxEXEC_ASYNC, callback = 0 ) wxString command int sync wxProcess* callback CODE: RETVAL = wxExecute( command, sync, callback ); OUTPUT: RETVAL #if wxUSE_UNICODE long wxExecuteArgs( args, sync = wxEXEC_ASYNC, callback = 0 ) SV* args int sync wxProcess* callback PREINIT: wxChar** argv; wxChar** t; int n, i; CODE: n = wxPli_av_2_wxcharparray( aTHX_ args, &t ); argv = new wxChar*[n+1]; memcpy( argv, t, n*sizeof(char*) ); argv[n] = 0; RETVAL = wxExecute( argv, sync, callback ); for( i = 0; i < n; ++i ) delete argv[i]; delete[] argv; delete[] t; OUTPUT: RETVAL #else long wxExecuteArgs( args, sync = wxEXEC_ASYNC, callback = 0 ) SV* args int sync wxProcess* callback PREINIT: char** argv; char** t; int n, i; CODE: n = wxPli_av_2_charparray( aTHX_ args, &t ); argv = new char*[n+1]; memcpy( argv, t, n*sizeof(char*) ); argv[n] = 0; RETVAL = wxExecute( argv, sync, callback ); for( i = 0; i < n; ++i ) delete argv[i]; delete[] argv; delete[] t; OUTPUT: RETVAL #endif void wxExecuteStdout( command, flags = 0 ) wxString command int flags PREINIT: wxArrayString out; AV* ret; long code; PPCODE: code = wxExecute( command, out, flags ); ret = wxPli_stringarray_2_av( aTHX_ out ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( code ) ) ); PUSHs( sv_2mortal( newRV_noinc( (SV*)ret ) ) ); void wxExecuteStdoutStderr( command, flags = 0) wxString command int flags PREINIT: wxArrayString out, err; AV *rout, *rerr; long code; PPCODE: code = wxExecute( command, out, err, flags ); rout = wxPli_stringarray_2_av( aTHX_ out ); rerr = wxPli_stringarray_2_av( aTHX_ err ); EXTEND( SP, 3 ); PUSHs( sv_2mortal( newSViv( code ) ) ); PUSHs( sv_2mortal( newRV_noinc( (SV*)rout ) ) ); PUSHs( sv_2mortal( newRV_noinc( (SV*)rerr ) ) ); Wx-0.9923/XS/ProgressDialog.xs000664000000000000 407712306612233 14321 0ustar00Mark000000000000############################################################################# ## Name: XS/ProgressDialog.xs ## Purpose: XS for Wx::ProgressDialog ## Author: Mattia Barbon ## Modified by: ## Created: 29/12/2000 ## RCS-ID: $Id: ProgressDialog.xs 3487 2013-04-16 22:01:57Z mdootson $ ## Copyright: (c) 2000-2002, 2004 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::ProgressDialog wxProgressDialog* wxProgressDialog::new( title, message, maximum = 100, parent = 0, style = wxPD_AUTO_HIDE|wxPD_APP_MODAL ) wxString title wxString message int maximum wxWindow* parent long style CODE: RETVAL = new wxProgressDialog( title, message, maximum, parent, style ); OUTPUT: RETVAL void wxProgressDialog::Resume() #if WXPERL_W_VERSION_GE( 2, 9, 1 ) bool wxProgressDialog::Update( value = -1, newmsg = wxEmptyString ) int value wxString newmsg PREINIT: bool skipval = false; CODE: RETVAL = THIS->Update( value, newmsg, &skipval); if( skipval ) RETVAL = false; OUTPUT: RETVAL bool wxProgressDialog::Pulse( newmsg = wxEmptyString ) wxString newmsg PREINIT: bool skipval = false; CODE: RETVAL = THIS->Pulse(newmsg, &skipval); if( skipval ) RETVAL = false; OUTPUT: RETVAL int wxProgressDialog::GetRange() int wxProgressDialog::GetValue() wxString wxProgressDialog::GetMessage() void wxProgressDialog::SetRange( maximum ) int maximum bool wxProgressDialog::WasCancelled() bool wxProgressDialog::WasSkipped() bool wxProgressDialog::Show( show = true ) bool show #else bool wxProgressDialog::Update( value = -1, newmsg = wxEmptyString ) int value wxString newmsg #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool wxProgressDialog::Show( show = true ) bool show bool wxProgressDialog::Pulse( newmsg = wxEmptyString ) wxString newmsg #endif #endif Wx-0.9923/XS/PropertySheetDialog.xsp000664000000000000 527412306612233 15512 0ustar00Mark000000000000############################################################################# ## Name: XS/PropertySheetDialog.xsp ## Purpose: XS++ for Wx::PropertySheetDialog ## Author: Mattia Barbon ## Modified by: ## Created: 19/08/2007 ## RCS-ID: $Id: PropertySheetDialog.xsp 2185 2007-08-19 18:56:51Z mbarbon $ ## Copyright: (c) 2007 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}; #if WXPERL_W_VERSION_GE( 2, 6, 0 ) %typemap{wxPropertySheetDialog*}{simple}; %typemap{wxBookCtrlBase*}{simple}; #include #include %name{Wx::PropertySheetDialog} class wxPropertySheetDialog { %name{newDefault} wxPropertySheetDialog() %code{% RETVAL = new wxPropertySheetDialog(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxPropertySheetDialog( wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr ) %code{% RETVAL = new wxPropertySheetDialog( parent, id, title, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr ); void SetBookCtrl( wxBookCtrlBase* book ); wxBookCtrlBase* GetBookCtrl() const; void SetInnerSize( wxSizer* sizer ); wxSizer* GetInnerSizer() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void SetSheetStyle( long sheetStyle ); long GetSheetStyle() const; void SetSheetOuterBorder( int border ); int GetSheetOuterBorder() const; void SetSheetInnerBorder( int border ); int GetSheetInnerBorder() const; #endif #define wxPLI_OK_CANCEL wxOK|wxCANCEL void CreateButtons( int flags = wxPLI_OK_CANCEL ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void LayoutDialog( int centreFlags = wxBOTH ); #else void LayoutDialog(); #endif }; #endif Wx-0.9923/XS/RadioBox.xs000664000000000000 1003012306612233 13106 0ustar00Mark000000000000############################################################################# ## Name: XS/RadioBox.xs ## Purpose: XS for Wx::RadioBox ## Author: Mattia Barbon ## Modified by: ## Created: 31/10/2000 ## RCS-ID: $Id: RadioBox.xs 2285 2007-11-11 21:31:54Z mbarbon $ ## Copyright: (c) 2000-2003, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include MODULE=Wx PACKAGE=Wx::RadioBox void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::RadioBox::new" ) wxRadioBox* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxRadioBox(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxRadioBox* newFull( CLASS, parent, id, label, point = wxDefaultPosition, size = wxDefaultSize, choices = 0, majorDimension = 0, style = wxRA_SPECIFY_COLS, validator = (wxValidator*)&wxDefaultValidator, name = wxRadioBoxNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxString label wxPoint point wxSize size SV* choices int majorDimension long style wxValidator* validator wxString name PREINIT: int n; wxString* chs; CODE: if( choices ) n = wxPli_av_2_stringarray( aTHX_ choices, &chs ); else { n = 0; chs = 0; } RETVAL = new wxRadioBox( parent, id, label, point, size, n, chs, majorDimension, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); delete[] chs; OUTPUT: RETVAL bool wxRadioBox::Create( parent, id, label, point = wxDefaultPosition, size = wxDefaultSize, choices = 0, majorDimension = 0, style = wxRA_SPECIFY_COLS, validator = (wxValidator*)&wxDefaultValidator, name = wxRadioBoxNameStr ) wxWindow* parent wxWindowID id wxString label wxPoint point wxSize size SV* choices int majorDimension long style wxValidator* validator wxString name PREINIT: int n; wxString* chs; CODE: if( choices ) n = wxPli_av_2_stringarray( aTHX_ choices, &chs ); else { n = 0; chs = 0; } RETVAL = THIS->Create( parent, id, label, point, size, n, chs, majorDimension, style, *validator, name ); delete[] chs; OUTPUT: RETVAL void wxRadioBox::EnableItem( n, enable ) int n bool enable CODE: THIS->Enable( n, enable ); int wxRadioBox::FindString( string ) wxString string #if WXPERL_W_VERSION_GE( 2, 7, 2 ) unsigned int wxRadioBox::GetColumnCount() unsigned int wxRadioBox::GetRowCount() int wxRadioBox::GetItemFromPoint( pt ) wxPoint pt #endif wxString wxRadioBox::GetString( n ) int n wxString wxRadioBox::GetItemLabel( n ) int n CODE: RETVAL = THIS->GetString( n ); OUTPUT: RETVAL int wxRadioBox::GetSelection() wxString wxRadioBox::GetStringSelection() #if WXPERL_W_VERSION_GE( 2, 7, 0 ) bool wxRadioBox::IsItemEnabled( unsigned int item ) bool wxRadioBox::IsItemShown( unsigned int item ) #endif void wxRadioBox::SetString( n, label ) int n wxString label void wxRadioBox::SetItemLabel( n, label ) int n wxString label CODE: THIS->SetString( n, label ); #if wxPERL_USE_TOOLTIPS && WXPERL_W_VERSION_GE( 2, 7, 0 ) void wxRadioBox::SetItemToolTip( item, text ) unsigned int item wxString text wxToolTip* wxRadioBox::GetItemToolTip( item ) unsigned int item #endif #if wxPERL_USE_HELP && WXPERL_W_VERSION_GE( 2, 7, 0 ) void wxRadioBox::SetItemHelpText( item, text ) unsigned int item wxString text wxString wxRadioBox::GetItemHelpText( item ) unsigned int item #endif void wxRadioBox::SetSelection( n ) int n void wxRadioBox::SetStringSelection( string ) wxString string void wxRadioBox::ShowItem( n, show ) int n bool show CODE: THIS->Show( n, show ); Wx-0.9923/XS/RadioButton.xs000664000000000000 367612306612233 13633 0ustar00Mark000000000000############################################################################# ## Name: XS/RadioButton.xs ## Purpose: XS for Wx::RadioButton ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2000 ## RCS-ID: $Id: RadioButton.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2001, 2003 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::RadioButton void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::RadioButton::new" ) wxRadioButton* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxRadioButton(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxRadioButton* newFull( CLASS, parent, id, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxRadioButtonNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxString label wxPoint pos wxSize size long style wxValidator* validator wxString name CODE: RETVAL = new wxRadioButton( parent, id, label, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxRadioButton::Create( parent, id, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxRadioButtonNameStr ) wxWindow* parent wxWindowID id wxString label wxPoint pos wxSize size long style wxValidator* validator wxString name C_ARGS: parent, id, label, pos, size, style, *validator, name bool wxRadioButton::GetValue() void wxRadioButton::SetValue( value ) bool value Wx-0.9923/XS/SashWindow.xs000664000000000000 533112306612233 13455 0ustar00Mark000000000000############################################################################# ## Name: XS/SashWindow.xs ## Purpose: XS for Wx::SashWindow ## Author: Mattia Barbon ## Modified by: ## Created: 03/02/2001 ## RCS-ID: $Id: SashWindow.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2003, 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 MODULE=Wx_Evt PACKAGE=Wx::SashEvent wxSashEvent* wxSashEvent::new( id = 0, edge = wxSASH_NONE ) int id wxSashEdgePosition edge wxSashEdgePosition wxSashEvent::GetEdge() wxRect* wxSashEvent::GetDragRect() CODE: RETVAL = new wxRect( THIS->GetDragRect() ); OUTPUT: RETVAL wxSashDragStatus wxSashEvent::GetDragStatus() MODULE=Wx PACKAGE=Wx::SashWindow void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::SashWindow::new" ) wxSashWindow* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxSashWindow(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxSashWindow* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxCLIP_CHILDREN|wxSW_3D, name = wxT("sashWindow") ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxSashWindow( parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxSashWindow::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxCLIP_CHILDREN|wxSW_3D, name = wxT("sashWindow") ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name bool wxSashWindow::GetSashVisible( edge ) wxSashEdgePosition edge int wxSashWindow::GetMaximumSizeX() int wxSashWindow::GetMaximumSizeY() int wxSashWindow::GetMinimumSizeX() int wxSashWindow::GetMinimumSizeY() #if WXPERL_W_VERSION_LT( 2, 7, 0 ) bool wxSashWindow::HasBorder( edge ) wxSashEdgePosition edge #endif void wxSashWindow::SetMaximumSizeX( max ) int max void wxSashWindow::SetMaximumSizeY( max ) int max void wxSashWindow::SetMinimumSizeX( min ) int min void wxSashWindow::SetMinimumSizeY( min ) int min void wxSashWindow::SetSashVisible( edge, visible ) wxSashEdgePosition edge bool visible #if WXPERL_W_VERSION_LT( 2, 7, 0 ) void wxSashWindow::SetSashBorder( edge, border ) wxSashEdgePosition edge bool border #endif Wx-0.9923/XS/ScrollBar.xs000664000000000000 452612306612233 13257 0ustar00Mark000000000000############################################################################# ## Name: XS/ScrollBar.xs ## Purpose: XS for Wx::ScrollBar ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2000 ## RCS-ID: $Id: ScrollBar.xs 2435 2008-08-05 18:05:54Z mbarbon $ ## Copyright: (c) 2000-2001, 2003-2004, 2006-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::ScrollBar void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::ScrollBar::new" ) wxScrollBar* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxScrollBar(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxScrollBar* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxSB_HORIZONTAL, validator = (wxValidator*)&wxDefaultValidator, name = wxScrollBarNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxValidator* validator wxString name CODE: RETVAL = new wxScrollBar( parent, id, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxScrollBar::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxSB_HORIZONTAL, validator = (wxValidator*)&wxDefaultValidator, name = wxScrollBarNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxValidator* validator wxString name C_ARGS: parent, id, pos, size, style, *validator, name int wxScrollBar::GetRange() int wxScrollBar::GetPageSize() int wxScrollBar::GetThumbPosition() int wxScrollBar::GetThumbSize() # int # wxScrollBar::GetThumbLength() void wxScrollBar::SetThumbPosition( viewStart ) int viewStart #if !defined(__WXMAC__) && !defined(__WXMOTIF__) void wxScrollBar::SetPageSize( size ) int size #endif void wxScrollBar::SetScrollbar( position, thumbSize, range, pageSize, refresh = true ) int position int thumbSize int range int pageSize bool refresh Wx-0.9923/XS/ScrolledWindow.xs000664000000000000 714612306612233 14334 0ustar00Mark000000000000############################################################################# ## Name: XS/ScrolledWindow.xs ## Purpose: XS for Wx::ScrolledWindow ## Author: Mattia Barbon ## Modified by: ## Created: 02/12/2000 ## RCS-ID: $Id: ScrolledWindow.xs 2285 2007-11-11 21:31:54Z mbarbon $ ## Copyright: (c) 2000-2003, 2005-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include #include "cpp/scrolledwindow.h" MODULE=Wx PACKAGE=Wx::ScrolledWindow void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::ScrolledWindow::new" ) wxScrolledWindow* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxPliScrolledWindow( CLASS ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxScrolledWindow* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxHSCROLL|wxVSCROLL, name = wxPanelNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxPliScrolledWindow( CLASS, parent, id, pos, size, style, name ); OUTPUT: RETVAL bool wxScrolledWindow::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxHSCROLL|wxVSCROLL, name = wxPanelNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name void wxScrolledWindow::CalcScrolledPosition( x, y ) int x int y PREINIT: int xx; int yy; PPCODE: THIS->CalcScrolledPosition( x, y, &xx, &yy ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( xx ) ) ); PUSHs( sv_2mortal( newSViv( yy ) ) ); void wxScrolledWindow::CalcUnscrolledPosition( x, y ) int x int y PREINIT: int xx; int yy; PPCODE: THIS->CalcUnscrolledPosition( x, y, &xx, &yy ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( xx ) ) ); PUSHs( sv_2mortal( newSViv( yy ) ) ); void wxScrolledWindow::EnableScrolling( xScrolling, yScrolling ) bool xScrolling bool yScrolling void wxScrolledWindow::GetScrollPixelsPerUnit() PREINIT: int xUnit; int yUnit; PPCODE: THIS->GetScrollPixelsPerUnit( &xUnit, &yUnit ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( xUnit ) ) ); PUSHs( sv_2mortal( newSViv( yUnit ) ) ); void wxScrolledWindow::GetVirtualSize() PREINIT: int x; int y; PPCODE: THIS->GetVirtualSize( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); bool wxScrolledWindow::IsRetained() void wxScrolledWindow::PrepareDC( dc ) wxDC* dc CODE: THIS->PrepareDC( *dc ); void wxScrolledWindow::DoPrepareDC( dc ) wxDC* dc C_ARGS: *dc void wxScrolledWindow::Scroll( x, y ) int x int y void wxScrolledWindow::SetScrollbars( ppuX, ppuY, nX, nY, xPos = 0, yPos = 0, noRefresh = false ) int ppuX int ppuY int nX int nY int xPos int yPos bool noRefresh void wxScrolledWindow::SetScrollRate( xstep, ystep ) int xstep int ystep void wxScrolledWindow::SetTargetWindow( window ) wxWindow* window void wxScrolledWindow::GetViewStart() PREINIT: int x; int y; PPCODE: THIS->GetViewStart( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); #!sub OnDraw Wx-0.9923/XS/SearchCtrl.xsp000664000000000000 547112306612233 13606 0ustar00Mark000000000000############################################################################# ## Name: XS/SearchCtrl.xsp ## Purpose: XS++ for Wx::SearchCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 12/08/2007 ## RCS-ID: $Id: SearchCtrl.xsp 3131 2011-11-22 05:28:54Z mdootson $ ## Copyright: (c) 2007 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}; #if WXPERL_W_VERSION_GE( 2, 8, 3 ) #include #include %typemap{wxSearchCtrl*}{simple}; %typemap{const wxTextAttr&}{reference}; %name{Wx::SearchCtrl} class wxSearchCtrl { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::SearchCtrl::new" ) %} %name{newDefault} wxSearchCtrl() %code{% RETVAL = new wxSearchCtrl(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxSearchCtrl( wxWindow *parent, wxWindowID id, const wxString& label = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxSearchCtrlNameStr ) %code{% RETVAL = new wxSearchCtrl( parent, id, label, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidatorPtr, const wxString& name = wxSearchCtrlNameStr ); void SetMenu( wxMenu *menu ); wxMenu *GetMenu(); void ShowSearchButton( bool show ); bool IsSearchButtonVisible() const; void ShowCancelButton( bool show ); bool IsCancelButtonVisible() const; void SetDescriptiveText( const wxString& text ); wxString GetDescriptiveText() const; }; #if WXPERL_W_VERSION_GE( 2, 9, 2 ) && !defined(__WXMAC__) #define WXPERL_IN_SEARCHCTRL INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/TextCtrlIface.xsp INCLUDE_COMMAND: $^X -pe "s/TextCtrlIface/SearchCtrl/g" xspp/TextCtrlIface.h #undef WXPERL_IN_SEARCHCTRL #endif #endif Wx-0.9923/XS/SingleChoiceDialog.xs000664000000000000 1005012306612233 15055 0ustar00Mark000000000000############################################################################# ## Name: XS/SingleChoiceDialog.xs ## Purpose: XS for Wx::SingleChoiceDialog ## Author: Mattia Barbon ## Modified by: ## Created: 03/02/2001 ## RCS-ID: $Id: SingleChoiceDialog.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2001-2002, 2005 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include "cpp/singlechoicedialog.h" MODULE=Wx PACKAGE=Wx::SingleChoiceDialog wxSingleChoiceDialog* wxSingleChoiceDialog::new( parent, message, caption, chs, dt = &PL_sv_undef, style = wxCHOICEDLG_STYLE, pos = wxDefaultPosition ) wxWindow* parent wxString message wxString caption SV* chs SV* dt long style wxPoint pos PREINIT: wxString* choices; SV** data; int n, n2; CODE: n = wxPli_av_2_stringarray( aTHX_ chs, &choices ); if( !SvOK( dt ) ) { RETVAL = new wxPliSingleChoiceDialog( parent, message, caption, n, choices, 0, style, pos ); } else { n2 = wxPli_av_2_svarray( aTHX_ dt, &data ); if( n != n2 ) { delete[] choices; delete[] data; choices = 0; data = 0; n = 0; croak( "supplied arrays of different size" ); } RETVAL = new wxPliSingleChoiceDialog( parent, message, caption, n, choices, data, style, pos ); delete[] data; } delete[] choices; OUTPUT: RETVAL int wxSingleChoiceDialog::GetSelection() SV* wxSingleChoiceDialog::GetSelectionClientData() PREINIT: char* t; CODE: t = THIS->GetSelectionClientData(); RETVAL = &PL_sv_undef; if( t ) { RETVAL = (SV*)t; } SvREFCNT_inc( RETVAL ); OUTPUT: RETVAL wxString wxSingleChoiceDialog::GetStringSelection() void wxSingleChoiceDialog::SetSelection( selection ) int selection MODULE=Wx PACKAGE=Wx PREFIX=wx # # Function interface # wxString wxGetSingleChoice( message, caption, chs, parent = 0, x = -1, y = -1, centre = true, width = wxCHOICE_WIDTH, height = wxCHOICE_HEIGHT ) wxString message wxString caption SV* chs wxWindow* parent int x int y bool centre int width int height PREINIT: wxString* choices; int n; CODE: n = wxPli_av_2_stringarray( aTHX_ chs, &choices ); RETVAL = wxGetSingleChoice( message, caption, n, choices, parent, x, y, centre, width, height ); delete[] choices; OUTPUT: RETVAL int wxGetSingleChoiceIndex( message, caption, chs, parent = 0, x = -1, y = -1, centre = true, width = wxCHOICE_WIDTH, height = wxCHOICE_HEIGHT ) wxString message wxString caption SV* chs wxWindow* parent int x int y bool centre int width int height PREINIT: wxString* choices; int n; CODE: n = wxPli_av_2_stringarray( aTHX_ chs, &choices ); RETVAL = wxGetSingleChoiceIndex( message, caption, n, choices, parent, x, y, centre, width, height ); delete[] choices; OUTPUT: RETVAL SV* wxGetSingleChoiceData( message, caption, chs, dt, parent = 0, x = -1, y = -1, centre = true, width = wxCHOICE_WIDTH, height = wxCHOICE_HEIGHT ) wxString message wxString caption SV* chs SV* dt wxWindow* parent int x int y bool centre int width int height PREINIT: wxString* choices; SV** data; int n, n2; void* rt; CODE: n = wxPli_av_2_stringarray( aTHX_ chs, &choices ); n2 = wxPli_av_2_svarray( aTHX_ dt, &data ); if( n != n2 ) { delete[] choices; delete[] data; choices = 0; data = 0; n = 0; croak( "supplied arrays of different sizes" ); } rt = wxGetSingleChoiceData( message, caption, n, choices, (void**)data, parent, x, y, centre, width, height ); RETVAL = rt ? (SV*)rt : &PL_sv_undef; SvREFCNT_inc( RETVAL ); delete[] choices; delete[] data; OUTPUT: RETVAL Wx-0.9923/XS/Sizer.xsp000664000000000000 4002112306612233 12656 0ustar00Mark000000000000############################################################################# ## Name: XS/Sizer.xsp ## Purpose: XS for Wx::Sizer and derived classes ## Author: Mattia Barbon ## Modified by: ## Created: 31/10/2000 ## RCS-ID: $Id: Sizer.xsp 3173 2012-03-08 02:50:45Z mdootson $ ## Copyright: (c) 2000-2003, 2005-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 ############################################################################# %{ #include #include #include "cpp/sizer.h" %} %module{Wx}; %loadplugin{build::Wx::XSP::Overload}; %typemap{wxFlexSizerGrowMode}{simple}; %typemap{wxSizerItem*}{simple}; %typemap{Wx_UserDataO*}{simple}; %typemap{wxStdDialogButtonSizer*}{simple}; %typemap{wxWrapSizer*}{simple}; %typemap{wxButton*}{simple}; %name{Wx::Sizer} class wxSizer { #if WXPERL_W_VERSION_GE( 2, 5, 4 ) %name{AddWindow} wxSizerItem* Add( wxWindow* window, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{AddSizer} wxSizerItem* Add( wxSizer* sizer, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{AddSpace} wxSizerItem* Add( int width, int height, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{PrependWindow} wxSizerItem* Prepend( wxWindow* window, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{PrependSizer} wxSizerItem* Prepend( wxSizer* sizer, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{PrependSpace} wxSizerItem* Prepend( int width, int height, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{InsertWindow} wxSizerItem* Insert( int pos, wxWindow* window, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{InsertSizer} wxSizerItem* Insert( int pos, wxSizer* sizer, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{InsertSpace} wxSizerItem* Insert( int pos, int width, int height, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; #else %name{AddWindow} void Add( wxWindow* window, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{AddSizer} void Add( wxSizer* sizer, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{AddSpace} void Add( int width, int height, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{PrependWindow} void Prepend( wxWindow* window, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{PrependSizer} void Prepend( wxSizer* sizer, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{PrependSpace} void Prepend( int width, int height, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{InsertWindow} void Insert( int pos, wxWindow* window, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{InsertSizer} void Insert( int pos, wxSizer* sizer, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; %name{InsertSpace} void Insert( int pos, int width, int height, int option = 0, int flag = 0, int border = 0, Wx_UserDataO* data = NULL ) %Overload; #endif #if WXPERL_W_VERSION_GE( 2, 5, 4 ) %name{GetItemWindow} wxSizerItem* GetItem( wxWindow* window, bool recursive = false ) %Overload; %name{GetItemSizer} wxSizerItem* GetItem( wxSizer* sizer, bool recursive = false ) %Overload; %name{GetItemNth} wxSizerItem* GetItem( size_t index ) %Overload; #else %{ wxSizerItem* wxSizer::GetItemNth( index ) size_t index CODE: RETVAL = index >= THIS->GetChildren().GetCount() ? NULL : THIS->GetChildren().Item( index )->GetData(); OUTPUT: RETVAL %} #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxSizerItem* GetItemById( int id, bool recursive = false ); #endif %name{HideSizer} bool Hide( wxSizer *sizer, bool recursive = false ) %Overload; %name{HideWindow} bool Hide( wxWindow *window, bool recursive = false ) %Overload; %name{HideIndex} bool Hide( size_t index ) %Overload; %name{IsShownWindow} bool IsShown( wxWindow *window ) const %Overload; %name{IsShownSizer} bool IsShown( wxSizer *sizer ) const %Overload; %name{IsShownIndex} bool IsShown( size_t index ) const %Overload; # DECLARE_OVERLOAD( wszi, Wx::SizerItem ) #if WXPERL_W_VERSION_GE( 2, 7, 2 ) %name{ReplaceWindow} bool Replace( wxWindow *oldwin, wxWindow *newwin, bool recursive = false ) %Overload; %name{ReplaceSizer} bool Replace( wxSizer *oldsz, wxSizer *newsz, bool recursive = false ) %Overload; %name{ReplaceIndex} bool Replace( size_t index, wxSizerItem *newitem ) %Overload; #endif void RecalcSizes(); void Clear( bool deleteWindows = false ); void DeleteWindows(); wxSize CalcMin(); wxSize Fit( wxWindow* window ); void FitInside( wxWindow* window ); wxSize GetSize(); wxPoint GetPosition(); wxSize GetMinSize(); void Layout(); #if WXPERL_W_VERSION_LT( 2, 7, 0 ) || WXWIN_COMPATIBILITY_2_6 %name{RemoveWindow} bool Remove( wxWindow* window ) %Overload; #endif %name{RemoveSizer} bool Remove( wxSizer* window ) %Overload; %name{RemoveNth} bool Remove( int nth ) %Overload; #if WXPERL_W_VERSION_GE( 2, 5, 3 ) %name{DetachWindow} bool Detach( wxWindow* window ) %Overload; %name{DetachSizer} bool Detach( wxSizer* window ) %Overload; %name{DetachNth} bool Detach( int nth ) %Overload; #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) wxWindow* GetContainingWindow(); void SetContainingWindow( wxWindow* window ); #endif void SetDimension( int x, int y, int width, int height ); %name{SetItemMinSizeWindow} void SetItemMinSize( wxWindow* window, int width, int height ) %Overload; %name{SetItemMinSizeSizer} void SetItemMinSize( wxSizer* window, int width, int height ) %Overload; %name{SetItemMinSizeNth} void SetItemMinSize( int pos, int width, int height ) %Overload; %name{SetMinSizeSize} void SetMinSize( wxSize size ) %Overload; %name{SetMinSizeXY} void SetMinSize( int x, int y ) %Overload; void SetSizeHints( wxWindow* window ); #if WXPERL_W_VERSION_LT( 2, 9, 0 ) void SetVirtualSizeHints( wxWindow* window ); #endif #if WXPERL_W_VERSION_GE( 2, 6, 2 ) %name{ShowWindow} bool Show( wxWindow* window, bool show = true, bool recursive = false ) %Overload; %name{ShowSizer} bool Show( wxSizer* sizer, bool show = true, bool recursive = false ) %Overload; %name{ShowIndex} bool Show( size_t index, bool show = true ) %Overload; #else #if WXPERL_W_VERSION_GE( 2, 5, 3 ) %name{ShowWindow} bool Show( wxWindow* window, bool show = true ) %Overload; %name{ShowSizer} bool Show( wxSizer* sizer, bool show = true ) %Overload; %name{ShowIndex} bool Show( size_t index, bool show = true ) %Overload; #else %name{ShowWindow} void Show( wxWindow* window, bool show = true ) %Overload; %name{ShowSizer} void Show( wxSizer* sizer, bool show = true ) %Overload; #endif #endif #if WXPERL_W_VERSION_GE( 2, 5, 4 ) wxSizerItem* AddSpacer( int size ); wxSizerItem* AddStretchSpacer( int prop = 1 ); wxSizerItem* InsertSpacer( size_t index, int size ); wxSizerItem* InsertStretchSpacer( size_t index, int prop = 1 ); wxSizerItem* PrependSpacer( int size ); wxSizerItem* PrependStretchSpacer( int prop = 1 ); #else // for xsubpp #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void AddSpacer( int size ); void AddStretchSpacer( int prop = 1 ); void InsertSpacer( size_t index, int size ); void InsertStretchSpacer( size_t index, int prop = 1 ); void PrependSpacer( int size ); void PrependStretchSpacer( int prop = 1 ); #endif #endif }; %name{Wx::FlexGridSizer} class wxFlexGridSizer { #if WXPERL_W_VERSION_GE( 2, 5, 1 ) void AddGrowableCol( size_t index, int proportion = 0 ); void AddGrowableRow( size_t index, int proportion = 0 ); void SetFlexibleDirection( int direction ); int GetFlexibleDirection(); void SetNonFlexibleGrowMode(wxFlexSizerGrowMode mode); wxFlexSizerGrowMode GetNonFlexibleGrowMode(); #else void AddGrowableCol( size_t index ); void AddGrowableRow( size_t index ); #endif }; %name{Wx::SizerItem} class wxSizerItem { %name{SetRatioWH} void SetRatio( int width, int height ) %Overload; %name{SetRatioSize} void SetRatio( wxSize size ) %Overload; %name{SetRatioFloat} void SetRatio( float ratio ) %Overload; #if WXPERL_W_VERSION_GE( 2, 5, 1 ) %name{GetOption} int GetProportion(); %name{SetOption} void SetProportion( int option ); int GetProportion(); void SetProportion( int proportion ); #else %name{GetProportion} int GetOption(); %name{SetProportion} void SetOption( int proportion ); int GetOption(); void SetOption( int option ); #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) %name{SetMinSizeWH} void SetMinSize( int x, int y ) %Overload; %name{SetMinSizeSize} void SetMinSize( wxSize size ) %Overload; #endif void DeleteWindows(); void DetachSizer(); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void SetId( int id ); int GetId() const; #endif #if WXPERL_W_VERSION_GE( 2, 6, 0 ) const wxRect& GetRect(); #endif void Show( bool show ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void AssignSpacer( int width, int height ); #else #if WXPERL_W_VERSION_GE( 2, 6, 0 ) void SetSpacer( int width, int height ); #endif #endif wxSize GetSpacer() const; }; #if WXPERL_W_VERSION_GE( 2, 6, 1 ) #include %name{Wx::StdDialogButtonSizer} class wxStdDialogButtonSizer { wxStdDialogButtonSizer(); void AddButton( wxButton* button ); void SetAffirmativeButton( wxButton* button ); void SetNegativeButton( wxButton* button ); void SetCancelButton( wxButton* button ); void Realize(); wxButton *GetAffirmativeButton() const; wxButton *GetApplyButton() const; wxButton *GetNegativeButton() const; wxButton *GetCancelButton() const; wxButton *GetHelpButton() const; }; #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) #include %name{Wx::WrapSizer} class wxWrapSizer { wxWrapSizer( int orient = wxHORIZONTAL, int flags = wxEXTEND_LAST_ON_EACH_LINE ); bool InformFirstDirection( int direction, int size, int availableOtherDir ); }; #endif %{ MODULE=Wx PACKAGE=Wx::Sizer void wxSizer::Destroy() CODE: delete THIS; void wxSizer::GetChildren() PPCODE: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxSizerItemList::compatibility_iterator node; const wxSizerItemList& list #else wxList::compatibility_iterator node; const wxList& list #endif = THIS->GetChildren(); EXTEND( SP, (IV) list.GetCount() ); for( node = list.GetFirst(); node; node = node->GetNext() ) PUSHs( wxPli_object_2_sv( aTHX_ sv_newmortal(), node->GetData() ) ); MODULE=Wx PACKAGE=Wx::BoxSizer wxBoxSizer* wxBoxSizer::new( orientation ) int orientation int wxBoxSizer::GetOrientation() #if WXPERL_W_VERSION_GE( 2, 8, 0 ) void wxBoxSizer::SetOrientation( orientation ) int orientation #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool wxBoxSizer::IsVertical() #endif MODULE=Wx PACKAGE=Wx::StaticBoxSizer wxStaticBoxSizer* wxStaticBoxSizer::new( box, orient ) wxStaticBox* box int orient wxStaticBox* wxStaticBoxSizer::GetStaticBox() MODULE=Wx PACKAGE=Wx::NotebookSizer #include wxNotebookSizer* wxNotebookSizer::new( notebook ) wxNotebook* notebook wxNotebook* wxNotebookSizer::GetNotebook() MODULE=Wx PACKAGE=Wx::GridSizer wxGridSizer* wxGridSizer::new( rows, cols, vgap = 0, hgap = 0 ) int rows int cols int vgap int hgap int wxGridSizer::GetCols() int wxGridSizer::GetHGap() int wxGridSizer::GetRows() int wxGridSizer::GetVGap() void wxGridSizer::SetCols( cols ) int cols void wxGridSizer::SetHGap( gap ) int gap void wxGridSizer::SetRows( rows ) int rows void wxGridSizer::SetVGap( gap ) int gap MODULE=Wx PACKAGE=Wx::FlexGridSizer wxFlexGridSizer* wxFlexGridSizer::new( rows, cols, vgap = 0, hgap = 0 ) int rows int cols int vgap int hgap void wxFlexGridSizer::RemoveGrowableCol( index ) size_t index void wxFlexGridSizer::RemoveGrowableRow( index ) int index MODULE=Wx PACKAGE=Wx::SizerItem wxSize* wxSizerItem::GetSize() CODE: RETVAL = new wxSize( THIS->GetSize() ); OUTPUT: RETVAL wxSize* wxSizerItem::CalcMin() CODE: RETVAL = new wxSize( THIS->GetSize() ); OUTPUT: RETVAL void wxSizerItem::SetDimension( pos, size ) wxPoint pos wxSize size wxSize* wxSizerItem::GetMinSize() CODE: RETVAL = new wxSize( THIS->GetMinSize() ); OUTPUT: RETVAL float wxSizerItem::GetRatio() bool wxSizerItem::IsWindow() bool wxSizerItem::IsShown() bool wxSizerItem::IsSizer() bool wxSizerItem::IsSpacer() void wxSizerItem::SetInitSize( x, y ) int x int y void wxSizerItem::SetFlag( flag ) int flag void wxSizerItem::SetBorder( border ) int border wxWindow* wxSizerItem::GetWindow() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void wxSizerItem::AssignWindow( window ) wxWindow* window #else void wxSizerItem::SetWindow( window ) wxWindow* window #endif wxSizer* wxSizerItem::GetSizer() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void wxSizerItem::AssignSizer( sizer ) wxSizer* sizer #else void wxSizerItem::SetSizer( sizer ) wxSizer* sizer #endif int wxSizerItem::GetFlag() int wxSizerItem::GetBorder() wxPoint* wxSizerItem::GetPosition() CODE: RETVAL = new wxPoint( THIS->GetPosition() ); OUTPUT: RETVAL Wx_UserDataO* wxSizerItem::GetUserData() CODE: RETVAL = (Wx_UserDataO*) THIS->GetUserData(); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 6, 3 ) void wxSizerItem::SetUserData( data ) Wx_UserDataO* data #endif MODULE=Wx PACKAGE=Wx::PlSizer wxPlSizer* wxPlSizer::new() CODE: RETVAL = new wxPlSizer( CLASS ); OUTPUT: RETVAL %} Wx-0.9923/XS/Slider.xs000664000000000000 564012306612233 12614 0ustar00Mark000000000000############################################################################# ## Name: XS/Slider.xs ## Purpose: XS for Wx::Slider ## Author: Mattia Barbon ## Modified by: ## Created: 31/10/2000 ## RCS-ID: $Id: Slider.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2001, 2003 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::Slider void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Slider::new" ) wxSlider* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxSlider(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxSlider* newFull( CLASS, parent, id, value, minValue, maxValue, pos = wxDefaultPosition, size = wxDefaultSize, style = wxSL_HORIZONTAL, validator = (wxValidator*)&wxDefaultValidator, name = wxSliderNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id int value int minValue int maxValue wxPoint pos wxSize size long style wxValidator* validator wxString name CODE: RETVAL = new wxSlider( parent, id, value, minValue, maxValue, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxSlider::Create( parent, id, value, minValue, maxValue, pos = wxDefaultPosition, size = wxDefaultSize, style = wxSL_HORIZONTAL, validator = (wxValidator*)&wxDefaultValidator, name = wxSliderNameStr ) wxWindow* parent wxWindowID id int value int minValue int maxValue wxPoint pos wxSize size long style wxValidator* validator wxString name C_ARGS: parent, id, value, minValue, maxValue, pos, size, style, *validator, name #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) void wxSlider::ClearSel() void wxSlider::ClearTicks() #endif int wxSlider::GetLineSize() int wxSlider::GetMax() int wxSlider::GetMin() int wxSlider::GetPageSize() #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) int wxSlider::GetSelEnd() int wxSlider::GetSelStart() int wxSlider::GetThumbLength() int wxSlider::GetTickFreq() #endif int wxSlider::GetValue() void wxSlider::SetRange( minValue, maxValue ) int minValue int maxValue void wxSlider::SetTickFreq( n, pos ) int n int pos void wxSlider::SetLineSize( lineSize ) int lineSize void wxSlider::SetPageSize( pageSize ) int pageSize #if defined( __WXPERL_FORCE__ ) void wxSlider::StartSelection( startPos, endPos ) int startPos int endPos #endif #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) void wxSlider::SetThumbLength( len ) int len #endif void wxSlider::SetValue( value ) int value Wx-0.9923/XS/Sound.xsp000664000000000000 362312306612233 12641 0ustar00Mark000000000000############################################################################# ## Name: XS/Sound.xsp ## Purpose: XS++ for wxSound class ## Author: Mattia Barbon ## Modified by: ## Created: 27/06/2006 ## RCS-ID: $Id: Sound.xsp 2560 2009-05-17 08:33:45Z mbarbon $ ## Copyright: (c) 2006, 2009 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}; %typemap{wxSound*}{simple}; %{ #if WXPERL_W_VERSION_GE( 2, 5, 1 ) #include %} %name{Wx::Sound} class wxSound { %name{newDefault} wxSound(); %name{newFile} wxSound( const wxString& fileName ); %{ static void wxSound::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxSound() %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::Sound", THIS, ST(0) ); delete THIS; %}; %name{Create} bool Create( const wxString& fileName ); bool Play( unsigned flags = wxSOUND_ASYNC ); bool IsOk(); }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFile ) END_OVERLOAD( "Wx::Choicebook::new" ) wxSound* wxSound::newData( data ) SV* data CODE: STRLEN len; const wxByte* buffer = (wxByte*) SvPV( data, len ); RETVAL = new wxSound( len, buffer ); OUTPUT: RETVAL #if !defined(__WXMAC__) bool wxSound::CreateData( data ) SV* data CODE: STRLEN len; const wxByte* buffer = (wxByte*) SvPV( data, len ); RETVAL = THIS->Create( len, buffer ); OUTPUT: RETVAL #endif void Stop() CODE: wxSound::Stop(); #if !defined( __WXMSW__ ) bool IsPlaying() CODE: RETVAL = wxSound::IsPlaying(); OUTPUT: RETVAL #endif %} %{ #endif %}Wx-0.9923/XS/SpinButton.xs000664000000000000 405512306612233 13476 0ustar00Mark000000000000############################################################################# ## Name: XS/SpinButton.xs ## Purpose: XS for Wx::SpinButton ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2000 ## RCS-ID: $Id: SpinButton.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2003, 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 #include MODULE=Wx_Evt PACKAGE=Wx::SpinEvent wxSpinEvent* wxSpinEvent::new( commandType = wxEVT_NULL, id = 0 ) wxEventType commandType int id int wxSpinEvent::GetPosition() void wxSpinEvent::SetPosition( pos ) int pos MODULE=Wx PACKAGE=Wx::SpinButton void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::SpinButton::new" ) wxSpinButton* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxSpinButton(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxSpinButton* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxSP_HORIZONTAL, name = wxSPIN_BUTTON_NAME ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxSpinButton( parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxSpinButton::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxSP_HORIZONTAL, name = wxSPIN_BUTTON_NAME ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name int wxSpinButton::GetMax() int wxSpinButton::GetMin() int wxSpinButton::GetValue() void wxSpinButton::SetRange( min, max ) int min int max void wxSpinButton::SetValue( value ) int value Wx-0.9923/XS/SpinCtrl.xs000664000000000000 420012306612233 13117 0ustar00Mark000000000000############################################################################# ## Name: XS/SpinCtrl.xs ## Purpose: XS for Wx::SpinCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2000 ## RCS-ID: $Id: SpinCtrl.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2003, 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 MODULE=Wx PACKAGE=Wx::SpinCtrl void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::SpinCtrl::new" ) wxSpinCtrl* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxSpinCtrl(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxSpinCtrl* newFull( CLASS, parent, id = wxID_ANY, value = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, style = wxSP_ARROW_KEYS, min = 0, max = 100, initial = 0, name = wxT("spinCtrl") ) PlClassName CLASS wxWindow* parent wxWindowID id wxString value wxPoint pos wxSize size long style int min int max int initial wxString name CODE: RETVAL = new wxSpinCtrl( parent, id, value, pos, size, style, min, max, initial, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxSpinCtrl::Create( parent, id = wxID_ANY, value = wxEmptyString, pos = wxDefaultPosition, size = wxDefaultSize, style = wxSP_ARROW_KEYS, min = 0, max = 100, initial = 0, name = wxT("spinCtrl") ) wxWindow* parent wxWindowID id wxString value wxPoint pos wxSize size long style int min int max int initial wxString name int wxSpinCtrl::GetMin() int wxSpinCtrl::GetMax() int wxSpinCtrl::GetValue() void wxSpinCtrl::SetRange( min, max ) int min int max void wxSpinCtrl::SetValue( text ) wxString text #if !defined(__WXGTK__) void wxSpinCtrl::SetSelection( from, to ) long from long to #endif Wx-0.9923/XS/SplitterWindow.xsp000664000000000000 612412306612233 14546 0ustar00Mark000000000000############################################################################# ## Name: XS/SplitterWindow.xsp ## Purpose: XS for Wx::SplitterWindow ## Author: Mattia Barbon ## Modified by: ## Created: 02/12/2000 ## RCS-ID: $Id: SplitterWindow.xsp 2982 2010-10-06 23:43:16Z mdootson $ ## Copyright: (c) 2000-2003, 2005-2006, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %{ #include %} %module{Wx}; %name{Wx::SplitterEvent} class wxSplitterEvent { wxSplitterEvent( wxEventType type = wxEVT_NULL, wxSplitterWindow* window = NULL ); int GetSashPosition(); int GetX(); int GetY(); wxWindow* GetWindowBeingRemoved(); void SetSashPosition( int pos ); }; %{ #define wxSplitterWindowNameStr wxT("splitter") %} %name{Wx::SplitterWindow} class wxSplitterWindow { %name{newDefault} wxSplitterWindow() %code{% RETVAL = new wxSplitterWindow(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxSplitterWindow( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_3D, wxString name = wxSplitterWindowNameStr ) %code{% RETVAL = new wxSplitterWindow( parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_3D, wxString name = wxSplitterWindowNameStr ); int GetMinimumPaneSize(); int GetSashPosition(); int GetSplitMode(); wxWindow* GetWindow1(); wxWindow* GetWindow2(); void Initialize( wxWindow* window ); bool IsSplit(); bool ReplaceWindow( wxWindow* winOld, wxWindow* winNew ); #if WXPERL_W_VERSION_GE( 2, 5, 4 ) void SetFocusIgnoringChildren(); #endif void SetSashPosition( int position, bool redraw = true ); void SetMinimumPaneSize( int paneSize ); void SetSplitMode( int mode ); bool SplitHorizontally( wxWindow* window1, wxWindow* window2, int sashPosition = 0 ); bool SplitVertically( wxWindow* window1, wxWindow* window2, int sashPosition = 0 ); bool Unsplit( wxWindow* toRemove = NULL ); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) void SetSashGravity( double gravity ); double GetSashGravity(); void UpdateSize(); #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) int GetSashSize(); void SetSashSize( int width ); #endif }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::SplitterWindow::new" ) %}Wx-0.9923/XS/StandardPaths.xsp000664000000000000 320612306612233 14306 0ustar00Mark000000000000############################################################################# ## Name: XS/StandardPaths.xsp ## Purpose: XS++ for Wx::StandardPaths ## Author: Mattia Barbon ## Modified by: ## Created: 08/10/2007 ## RCS-ID: $Id: StandardPaths.xsp 2315 2008-01-18 21:47:17Z mbarbon $ ## Copyright: (c) 2007-2008 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}; #if WXPERL_W_VERSION_GE( 2, 6, 0 ) #include %typemap{wxStandardPaths*}{simple}; %typemap{ResourceCat}{simple}; #define ResourceCat wxStandardPathsBase::ResourceCat %name{Wx::StandardPaths} class wxStandardPaths { #if WXPERL_W_VERSION_GE( 2, 8, 0 ) wxString GetExecutablePath() const; #endif wxString GetConfigDir() const; wxString GetUserConfigDir() const; wxString GetDataDir() const; wxString GetLocalDataDir() const; wxString GetUserDataDir() const; wxString GetUserLocalDataDir() const; wxString GetPluginsDir() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxString GetResourcesDir() const; wxString GetLocalizedResourcesDir( const wxString& lang, ResourceCat category = wxStandardPathsBase::ResourceCat_None ); wxString GetDocumentsDir() const; wxString GetTempDir() const; #endif #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void UseAppInfo( int info ); #endif }; %{ wxStandardPaths* Get() CODE: RETVAL = (wxStandardPaths*)&wxStandardPaths::Get(); OUTPUT: RETVAL %} #endif Wx-0.9923/XS/StaticBitmap.xs000664000000000000 453212306612233 13755 0ustar00Mark000000000000############################################################################# ## Name: XS/StaticBitmap.xs ## Purpose: XS for Wx::StaticBitmap ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2000 ## RCS-ID: $Id: StaticBitmap.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2003 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include "cpp/overload.h" #include MODULE=Wx PACKAGE=Wx::StaticBitmap void wxStaticBitmap::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_wwin_n_wico, newIcon ) MATCH_REDISP( wxPliOvl_wwin_n_wbmp, newBitmap ) END_OVERLOAD( Wx::StaticBitmap::new ) wxStaticBitmap* newBitmap( cls, parent, id, bitmap, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxStaticBitmapNameStr ) SV* cls wxWindow* parent wxWindowID id wxBitmap* bitmap wxPoint pos wxSize size long style wxString name PREINIT: const char* CLASS = wxPli_get_class( aTHX_ cls ); CODE: RETVAL = new wxStaticBitmap( parent, id, *bitmap, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL #if !defined(__WXUNIVERSAL__) || defined(__WXPERL_FORCE__) wxStaticBitmap* newIcon( cls, parent, id, icon, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxStaticBitmapNameStr ) SV* cls wxWindow* parent wxWindowID id wxIcon* icon wxPoint pos wxSize size long style wxString name PREINIT: const char* CLASS = wxPli_get_class( aTHX_ cls ); CODE: RETVAL = new wxStaticBitmap( parent, id, *icon, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL #endif wxBitmap* wxStaticBitmap::GetBitmap() CODE: RETVAL = new wxBitmap( THIS->GetBitmap() ); OUTPUT: RETVAL void wxStaticBitmap::SetBitmap( bitmap ) wxBitmap* bitmap C_ARGS: *bitmap #if !defined(__WXUNIVERSAL__) || defined(__WXPERL_FORCE__) wxIcon* wxStaticBitmap::GetIcon() CODE: RETVAL = new wxIcon( THIS->GetIcon() ); OUTPUT: RETVAL void wxStaticBitmap::SetIcon( icon ) wxIcon* icon C_ARGS: *icon #endif Wx-0.9923/XS/StaticBox.xs000664000000000000 242012306612233 13263 0ustar00Mark000000000000############################################################################# ## Name: XS/StaticBox.xs ## Purpose: XS for Wx::StaticBox ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2000 ## RCS-ID: $Id: StaticBox.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2001, 2003 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::StaticBox wxStaticBox* wxStaticBox::new( parent, id, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxStaticBoxNameStr ) wxWindow* parent wxWindowID id wxString label wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxStaticBox( parent, id, label, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxStaticBox::Create( parent, id, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxStaticBoxNameStr ) wxWindow* parent wxWindowID id wxString label wxPoint pos wxSize size long style wxString name Wx-0.9923/XS/StaticLine.xs000664000000000000 251612306612233 13430 0ustar00Mark000000000000############################################################################# ## Name: XS/StaticLine.xs ## Purpose: XS for Wx::StaticLine ## Author: Mattia Barbon ## Modified by: ## Created: 10/11/2000 ## RCS-ID: $Id: StaticLine.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2003, 2006 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 PACKAGE=Wx::StaticLine #include wxStaticLine* wxStaticLine::new( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxLI_HORIZONTAL, name = wxStaticTextNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxStaticLine( parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxStaticLine::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxLI_HORIZONTAL, name = wxStaticTextNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name bool wxStaticLine::IsVertical() int wxStaticLine::GetDefaultSize() Wx-0.9923/XS/StaticText.xs000664000000000000 257112306612233 13466 0ustar00Mark000000000000############################################################################# ## Name: XS/StaticText.xs ## Purpose: XS for Wx::StaticText ## Author: Mattia Barbon ## Modified by: ## Created: 08/11/2000 ## RCS-ID: $Id: StaticText.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2001, 2003, 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 MODULE=Wx PACKAGE=Wx::StaticText wxStaticText* wxStaticText::new( parent, id, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxStaticTextNameStr ) wxWindow* parent wxWindowID id wxString label wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxStaticText( parent, id, label, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxStaticText::Create( parent, id, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, name = wxStaticTextNameStr ) wxWindow* parent wxWindowID id wxString label wxPoint pos wxSize size long style wxString name #if WXPERL_W_VERSION_GE( 2, 6, 3 ) void wxStaticText::Wrap(width) int width #endifWx-0.9923/XS/StatusBar.xs000664000000000000 421012306612233 13272 0ustar00Mark000000000000############################################################################# ## Name: XS/StatusBar.xs ## Purpose: XS for Wx::StatusBar ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: StatusBar.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2000-2003, 2005-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 MODULE=Wx PACKAGE=Wx::StatusBar wxStatusBar* wxStatusBar::new( parent, id = wxID_ANY, style = 0, name = wxEmptyString ) wxWindow* parent wxWindowID id long style wxString name CODE: RETVAL = new wxStatusBar( parent, id, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxRect* wxStatusBar::GetFieldRect( index ) int index PREINIT: wxRect rect; bool found; CODE: found = THIS->GetFieldRect( index, rect ); if( !found ) RETVAL = 0; else RETVAL = new wxRect( rect ); OUTPUT: RETVAL int wxStatusBar::GetFieldsCount() wxString wxStatusBar::GetStatusText( ir = 0 ) int ir void wxStatusBar::PushStatusText( string, n = 0 ) wxString string int n void wxStatusBar::PopStatusText( n = 0 ) int n void wxStatusBar::SetFieldsCount( number = 1 ) int number void wxStatusBar::SetMinHeight( height ) int height void wxStatusBar::SetStatusText( text, i = 0 ) wxString text int i void wxStatusBar::SetStatusWidths( ... ) PREINIT: int* widths; int i; CODE: widths = new int[items-1]; for( i = 1; i < items; ++i ) { widths[i-1] = SvIV( ST(i) ); } THIS->SetStatusWidths( items-1, widths ); delete[] widths; #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxStatusBar::SetStatusStyles( ... ) PREINIT: int* styles; int i; CODE: styles = new int[items-1]; for( i = 1; i < items; ++i ) { styles[i-1] = SvIV( ST(i) ); } THIS->SetStatusStyles( items-1, styles ); delete[] styles; #endif Wx-0.9923/XS/Stream.xs000664000000000000 740612306612233 12627 0ustar00Mark000000000000############################################################################# ## Name: XS/Stream.xs ## Purpose: XS for Wx::*Stream wrappers (using tie) ## Author: Mattia Barbon ## Modified by: ## Created: 30/03/2001 ## RCS-ID: $Id: Stream.xs 2938 2010-07-04 12:56:48Z mbarbon $ ## Copyright: (c) 2001-2003, 2007, 2010 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::Stream SV* TIEHANDLE( package, var ) const char* package void* var CODE: RETVAL = newSViv( 0 ); // as usual: XSUBpp mortalizes it for us... sv_setref_pv( RETVAL, CHAR_P package, var ); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::InputStream size_t Wx_InputStream::READ( buf, len, offset = 0 ) SV* buf IV len IV offset PREINIT: IV maxlen; CODE: if( THIS->Eof() ) { SvOK_off( buf ); XSRETURN_IV( 0 ); } maxlen = SvPOK( buf ) ? SvCUR( buf ) : 0; if( offset < 0 ) { if( ( (offset) >= 0 ? (offset) : -(offset) ) > maxlen ) { XSRETURN_IV( 0 ); } offset = maxlen + offset; } char* buffer = SvGROW( buf, (UV)offset + len + 1 ); SvPOK_on( buf ); if( offset > maxlen ) Zero( buffer + maxlen, offset - maxlen, char ); buffer += offset; RETVAL = THIS->Read( buffer, len ).LastRead(); SvCUR_set( buf, offset + RETVAL ); OUTPUT: RETVAL SV* Wx_InputStream::GETC() CODE: char value = THIS->GetC(); RETVAL = newSVpvn( &value, 1 ); OUTPUT: RETVAL SV* Wx_InputStream::SEEK( position, whence ) off_t position int whence PREINIT: static wxSeekMode s_whence[] = { wxFromStart, wxFromCurrent, wxFromEnd }; CODE: if( whence < 0 || whence > 2 ) RETVAL = &PL_sv_undef; off_t offset = THIS->SeekI( position, s_whence[whence] ); RETVAL = newSViv( offset ); OUTPUT: RETVAL SV* Wx_InputStream::TELL() CODE: off_t offset = THIS->TellI(); RETVAL = newSViv( offset ); OUTPUT: RETVAL SV* Wx_InputStream::READLINE() PREINIT: char c; size_t off = 0; char* buff; CODE: if( THIS->Eof() ) { XSRETURN_UNDEF; } RETVAL = newSViv( 0 ); buff = SvPV_nolen( RETVAL ); while( THIS->CanRead() && THIS->Read( &c, 1 ).LastRead() != 0 ) { if( SvLEN( RETVAL ) <= off ) { buff = SvGROW( RETVAL, off + 15 ); } buff[off] = c; ++off; if( c == '\n' ) break; } SvCUR_set( RETVAL, off ); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::OutputStream size_t Wx_OutputStream::WRITE( buf, len = -1, offset = 0 ) SV* buf IV len IV offset PREINIT: IV maxlen = sv_len( buf ); const char* buffer = SvPV_nolen( buf ); CODE: if( ( (offset) >= 0 ? (offset) : -(offset) ) > maxlen ) RETVAL = 0; else { if( offset >=0 ) { buffer += offset; maxlen -= offset; } else { buffer += maxlen + offset; maxlen = -offset; } len = ( len >= maxlen ) ? maxlen : len; RETVAL = THIS->Write( buffer, len ).LastWrite(); } OUTPUT: RETVAL SV* Wx_OutputStream::SEEK( position, whence ) off_t position int whence PREINIT: static wxSeekMode s_whence[] = { wxFromStart, wxFromCurrent, wxFromEnd }; CODE: if( whence < 0 || whence > 2 ) RETVAL = &PL_sv_undef; off_t offset = THIS->SeekO( position, s_whence[whence] ); RETVAL = newSViv( offset ); OUTPUT: RETVAL SV* Wx_OutputStream::TELL() CODE: off_t offset = THIS->TellO(); RETVAL = newSViv( offset ); OUTPUT: RETVAL Wx-0.9923/XS/SVGFileDC.xsp000664000000000000 153312306612233 13215 0ustar00Mark000000000000############################################################################# ## Name: XS/SVGFileDC.xsp ## Purpose: XS for Wx::SVGFileDC ## Author: Mattia Barbon ## Modified by: ## Created: 24/12/2007 ## RCS-ID: $Id: SVGFileDC.xsp 2306 2007-12-24 17:27:10Z mbarbon $ ## Copyright: (c) 2007 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}; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) #include %typemap{wxSVGFileDC*}{simple}; %name{Wx::SVGFileDC} class wxSVGFileDC { wxSVGFileDC( const wxString& filename, int width = 320, int height = 240, double dpi = 72.0 ); }; #endif Wx-0.9923/XS/TaskBarIcon.xs000664000000000000 244712306612233 13534 0ustar00Mark000000000000############################################################################# ## Name: XS/TaskBarIcon.xs ## Purpose: XS for Wx::TaskBarIcon ## Author: Mattia Barbon ## Modified by: ## Created: 03/12/2001 ## RCS-ID: $Id: TaskBarIcon.xs 2285 2007-11-11 21:31:54Z mbarbon $ ## Copyright: (c) 2001, 2004-2005, 2007 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 PACKAGE=Wx::TaskBarIcon #if defined(__WXMSW__) || \ ( WXPERL_W_VERSION_GE( 2, 5, 2 ) && defined( wxHAS_TASK_BAR_ICON ) ) #include wxTaskBarIcon* wxTaskBarIcon::new() void wxTaskBarIcon::Destroy() CODE: delete THIS; bool wxTaskBarIcon::IsOk() bool wxTaskBarIcon::IsIconInstalled() bool wxTaskBarIcon::SetIcon( icon, tooltip = wxEmptyString ) wxIcon* icon wxString tooltip CODE: RETVAL = THIS->SetIcon( *icon, tooltip ); OUTPUT: RETVAL bool wxTaskBarIcon::RemoveIcon() bool wxTaskBarIcon::PopupMenu( menu ) wxMenu* menu MODULE=Wx PACKAGE=Wx::TaskBarIconEvent wxTaskBarIconEvent* wxTaskBarIconEvent::new( evtType, tbIcon ) wxEventType evtType wxTaskBarIcon *tbIcon #endif Wx-0.9923/XS/TextAttr.xsp000664000000000000 1323412306612233 13347 0ustar00Mark000000000000############################################################################# ## Name: XS/TextAttr.xsp ## Purpose: XS for Wx::TextAttr ## Author: Mattia Barbon ## Modified by: ## Created: 24/11/2007 ## RCS-ID: $Id: TextAttr.xsp 2523 2009-02-04 23:50:57Z mbarbon $ ## Copyright: (c) 2000-2003, 2005-2009 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 %typemap{wxTextAttr*}{simple}; %typemap{const wxTextAttr&}{reference}; %typemap{wxTextAttrAlignment}{simple}; %typemap{wxFontEncoding}{simple}; %typemap{wxFontStyle}{simple}; %typemap{wxFontWeight}{simple}; %name{Wx::TextAttr} class wxTextAttr { %{ wxTextAttr* wxTextAttr::new( colText = wxNullColour, colBack = wxNullColour, font = (wxFont*)&wxNullFont ) wxColour colText wxColour colBack wxFont* font CODE: if( items == 1 ) RETVAL = new wxTextAttr(); else RETVAL = new wxTextAttr( colText, colBack, *font ); OUTPUT: RETVAL %} ## // thread OK %{ void wxTextAttr::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::TextAttr", THIS, ST(0) ); delete THIS; static void wxTextAttr::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool Apply(const wxTextAttr& style, wxTextAttr* compareWith = NULL ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) void Merge( const wxTextAttr& overlay ); #endif void SetTextColour( const wxColour& colText ); void SetBackgroundColour( const wxColour& colBack ); void SetFont( const wxFont& font, long flags = wxTEXT_ATTR_FONT ); void SetAlignment( wxTextAttrAlignment alignment ); void SetTabs( const wxArrayInt& tabs ); void SetLeftIndent( int indent, int subIndent = 0 ); void SetRightIndent( int indent ); void SetFlags( long flags ); bool HasTextColour() const; bool HasBackgroundColour() const; bool HasFont() const; bool HasAlignment() const; bool HasTabs() const; bool HasLeftIndent() const; bool HasRightIndent() const; bool HasFlag( long flag ) const; const wxColour& GetTextColour() const; const wxColour& GetBackgroundColour() const; const wxFont& GetFont() const; wxTextAttrAlignment GetAlignment() const; long GetLeftIndent() const; long GetLeftSubIndent() const; long GetRightIndent() const; long GetFlags() const; bool IsDefault() const; %{ void wxTextAttr::GetTabs() PPCODE: const wxArrayInt& tabs = THIS->GetTabs(); PUTBACK; wxPli_intarray_push( aTHX_ tabs ); SPAGAIN; %} #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxFontEncoding GetFontEncoding() const; bool HasFontEncoding() const; void SetFontEncoding( wxFontEncoding encoding ); ## wxTextAttrEx int GetOutlineLevel() const; bool HasOutlineLevel() const; void SetOutlineLevel( int level ); int GetTextEffects() const; bool HasTextEffects() const; void SetTextEffects( int effects ); int GetTextEffectFlags() const; bool HasTextEffect( int effect ) const; void SetTextEffectFlags( int effects ); #endif ## in 2.9, from wxTextAttrEx and wxRichTextAttr #if WXPERL_W_VERSION_GE( 2, 9, 0 ) ## wxTextAttrEx void SetCharacterStyleName( const wxString& name ); void SetParagraphStyleName( const wxString& name ); void SetListStyleName( const wxString& name ); void SetParagraphSpacingAfter( int spacing ); void SetParagraphSpacingBefore( int spacing ); void SetLineSpacing( int spacing ); void SetBulletStyle( int style ); void SetBulletNumber( int n ); void SetBulletText( const wxString& text ); void SetBulletName( const wxString& name ); void SetBulletFont( const wxString& bulletFont ); void SetURL( const wxString& url ); void SetPageBreak( bool pageBreak = true ); const wxString& GetCharacterStyleName() const; const wxString& GetParagraphStyleName() const; const wxString& GetListStyleName() const; int GetParagraphSpacingAfter() const; int GetParagraphSpacingBefore() const; int GetLineSpacing() const; int GetBulletStyle() const; int GetBulletNumber() const; const wxString& GetBulletText() const; const wxString& GetBulletName() const; const wxString& GetBulletFont() const; const wxString& GetURL() const; bool HasParagraphSpacingAfter() const; bool HasParagraphSpacingBefore() const; bool HasLineSpacing() const; bool HasCharacterStyleName() const; bool HasParagraphStyleName() const; bool HasListStyleName() const; bool HasBulletStyle() const; bool HasBulletNumber() const; bool HasBulletText() const; bool HasBulletName() const; bool HasURL() const; bool HasPageBreak() const; bool IsCharacterStyle() const; bool IsParagraphStyle() const; ## wxRichTextAttr #if WXPERL_W_VERSION_LT( 2, 9, 0 ) wxFont CreateFont() const; #endif bool GetFontAttributes( const wxFont& font ); void SetFontSize( int pointSize ); void SetFontStyle( wxFontStyle fontStyle ); void SetFontWeight( wxFontWeight fontWeight ); void SetFontFaceName( const wxString& faceName ); void SetFontUnderlined( bool underlined ); int GetFontSize() const; wxFontStyle GetFontStyle() const; wxFontWeight GetFontWeight() const; bool GetFontUnderlined() const; const wxString& GetFontFaceName() const; bool HasFontWeight() const; bool HasFontSize() const; bool HasFontItalic() const; bool HasFontUnderlined() const; bool HasFontFaceName() const; #endif }; Wx-0.9923/XS/TextCtrl.xsp000664000000000000 1434512306612233 13345 0ustar00Mark000000000000############################################################################# ## Name: XS/TextCtrl.xsp ## Purpose: XS for Wx::TextCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: TextCtrl.xsp 3115 2011-11-18 06:38:35Z mdootson $ ## Copyright: (c) 2000-2003, 2005-2007, 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 %typemap{wxMouseEvent&}{reference}; %typemap{wxTextAttr*}{simple}; %typemap{const wxTextAttr&}{reference}; %typemap{wxTextAttrAlignment}{simple}; %typemap{const wxKeyEvent&}{reference}; %typemap{wxTextPos}{parsed}{ %cpp_type{%wxTextPos%}; }; %name{Wx::TextUrlEvent} class wxTextUrlEvent { wxMouseEvent& GetMouseEvent(); long GetURLStart(); long GetURLEnd(); }; %name{Wx::TextCtrlBase} class wxTextCtrlBase { wxString GetValue() const; #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool IsEmpty(); #endif void SetValue( const wxString& value ); #if WXPERL_W_VERSION_GE( 2, 7, 1 ) void ChangeValue( const wxString& value ); #endif wxString GetRange( long from, long to ) const; int GetLineLength( long lineNo ) const; wxString GetLineText( long lineNo ) const; int GetNumberOfLines() const; bool IsModified() const; bool IsEditable() const; bool IsSingleLine() const; bool IsMultiLine() const; wxString GetStringSelection() const; void Clear(); void Replace( long from, long to, const wxString& value ); void Remove( long from, long to ); #if WXPERL_W_VERSION_GE( 2, 7, 1 ) bool LoadFile( const wxString& file, int fileType = wxTEXT_TYPE_ANY ); bool SaveFile( const wxString& file = wxEmptyString, int fileType = wxTEXT_TYPE_ANY ); #else bool LoadFile( const wxString& file ); bool SaveFile( const wxString& file = wxEmptyString ); #endif void MarkDirty(); void DiscardEdits(); #if WXPERL_W_VERSION_GE( 2, 7, 0 ) void SetModified( bool modified ); #endif void SetMaxLength( unsigned long len ); void WriteText( const wxString& text ); void AppendText( const wxString& text ); bool EmulateKeyPress( const wxKeyEvent& event ); bool SetStyle( long start, long end, const wxTextAttr& style ); ## bool GetStyle( long position, wxTextAttr& style ); bool SetDefaultStyle( const wxTextAttr& style ); const wxTextAttr& GetDefaultStyle() const; long XYToPosition( long x, long y ) const; void ShowPosition(long pos); void Copy(); void Cut(); void Paste(); bool CanCopy() const; bool CanCut() const; bool CanPaste() const; void Undo(); void Redo(); bool CanUndo() const; bool CanRedo() const; void SetInsertionPoint( long pos ); void SetInsertionPointEnd(); long GetInsertionPoint() const; wxTextPos GetLastPosition() const; void SetSelection( long from, long to ); void SelectAll(); void SetEditable( bool editable ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool AutoComplete( const wxArrayString& choices ); bool AutoCompleteFileNames(); #endif }; %{ void wxTextCtrlBase::GetSelection() PREINIT: long from; long to; PPCODE: THIS->GetSelection( &from, &to ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( from ) ) ); PUSHs( sv_2mortal( newSViv( to ) ) ); void wxTextCtrlBase::PositionToXY( pos ) long pos PREINIT: long x; long y; PPCODE: THIS->PositionToXY( pos, &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); void wxTextCtrlBase::HitTest( pt ) wxPoint pt PPCODE: long col, row; wxTextCtrlHitTestResult res = THIS->HitTest( pt, &col, &row ); EXTEND( SP, 3 ); PUSHs( sv_2mortal( newSViv( res ) ) ); PUSHs( sv_2mortal( newSViv( col ) ) ); PUSHs( sv_2mortal( newSViv( row ) ) ); %} %name{Wx::TextCtrl} class wxTextCtrl { #if defined( __WXMAC__ ) && WXPERL_W_VERSION_GE( 2, 8, 0 ) void MacCheckSpelling( bool check ); #endif }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::TextCtrl::new" ) wxTextCtrl* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxTextCtrl(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxTextCtrl* newFull( CLASS, parent, id, value, pos = wxDefaultPosition, size = wxDefaultSize, style = 0 , validator = (wxValidator*)&wxDefaultValidator, name = wxTextCtrlNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxString value wxPoint pos wxSize size long style wxValidator* validator wxString name CODE: RETVAL = new wxTextCtrl( parent, id, value, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxTextCtrl::Create( parent, id, value, pos = wxDefaultPosition, size = wxDefaultSize, style = 0 , validator = (wxValidator*)&wxDefaultValidator, name = wxTextCtrlNameStr ) wxWindow* parent wxWindowID id wxString value wxPoint pos wxSize size long style wxValidator* validator wxString name C_ARGS: parent, id, value, pos, size, style, *validator, name void wxTextCtrl::GetStyle( position ) long position PPCODE: wxTextAttr attr; bool retval = THIS->GetStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttr( attr ), "Wx::TextAttr" ) : &PL_sv_undef ); ## to be consistent with RichTextCtrl void wxTextCtrl::GetTextAttrStyle( position ) long position PPCODE: wxTextAttr attr; bool retval = THIS->GetStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttr( attr ), "Wx::TextAttr" ) : &PL_sv_undef ); %} Wx-0.9923/XS/TextCtrlIface.xsp000664000000000000 1052212306612233 14266 0ustar00Mark000000000000############################################################################# ## Name: viface/TextCtrlIface.xsp ## Purpose: XS++ for wxTextCtrlIface ## Author: Mark Dootson ## Modified by: ## Created: 21/11/2011 ## RCS-ID: $Id:$ ## Copyright: (c) 2011 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# %file{xspp/TextCtrlIface.h}; %module{Wx}; #if WXPERL_W_VERSION_GE( 2, 9, 2 ) %typemap{wxTextCtrlIface*}{simple}; %typemap{const wxTextAttr&}{reference}; %name{Wx::TextCtrlIface} class wxTextCtrlIface { wxString GetValue() const; void SetValue( const wxString& value ); void ChangeValue( const wxString& value ); wxString GetRange( long from, long to ) const; void WriteText( const wxString& text ); void AppendText( const wxString& text ); bool IsEmpty(); void Clear(); void Replace( long from, long to, const wxString& value ); void Remove( long from, long to ); void RemoveSelection(); void Copy(); void Cut(); void Paste(); bool CanCopy() const; bool CanCut() const; bool CanPaste() const; void Undo(); void Redo(); bool CanUndo() const; bool CanRedo() const; void SetInsertionPoint( long pos ); void SetInsertionPointEnd(); long GetInsertionPoint() const; long GetLastPosition() const; void SetSelection( long from, long to ); void SelectAll(); bool HasSelection() const; wxString GetStringSelection() const; ## void GetSelection(long *from, long *to); bool AutoCompleteFileNames(); bool AutoComplete( const wxArrayString& choices ); ## bool AutoComplete( wxTextCompleter *completer); bool IsEditable() const; void SetEditable( bool editable ); void SetMaxLength( unsigned long len ); bool SetHint(const wxString& hint); wxString GetHint() const; bool SetMargins(const wxPoint& pt); wxPoint GetMargins() const; /* implement wxTextAreaBase */ int GetLineLength( long lineNo ) const; wxString GetLineText( long lineNo ) const; int GetNumberOfLines() const; #if defined(WXPERL_IN_RICHTEXTCTRL) bool LoadFile( const wxString& file, int fileType = wxTEXT_TYPE_ANY ); bool SaveFile( const wxString& file = wxEmptyString, int fileType = wxTEXT_TYPE_ANY ); #endif bool IsModified() const; void MarkDirty(); void DiscardEdits(); void SetModified( bool modified ); #if defined(WXPERL_IN_SEARCHCTRL) bool SetStyle( long start, long end, const wxTextAttr& style ); ## bool GetStyle(long position, wxTextAttr& style) = 0; #endif #if !defined(WXPERL_IN_RICHTEXTCTRL) bool SetDefaultStyle( const wxTextAttr& style ); #endif const wxTextAttr& GetDefaultStyle() const; long XYToPosition( long x, long y ) const; ## bool PositionToXY(long pos, long *x, long *y) const; void ShowPosition(long pos); ## wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const; ## wxTextCtrlHitTestResult HitTest(const wxPoint& pt, wxTextCoord *col, wxTextCoord *row) const; }; %{ void wxTextCtrlIface::GetSelection() PREINIT: long from; long to; PPCODE: THIS->GetSelection( &from, &to ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( from ) ) ); PUSHs( sv_2mortal( newSViv( to ) ) ); %} #if defined(WXPERL_IN_SEARCHCTRL) %{ void wxTextCtrlIface::GetStyle( position ) long position PPCODE: wxTextAttr attr; bool retval = THIS->GetStyle( position, attr ); EXTEND( SP, 2 ); PUSHs( newSViv( retval ) ); PUSHs( retval ? wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTextAttr( attr ), "Wx::TextAttr" ) : &PL_sv_undef ); %} #endif %{ void wxTextCtrlIface::PositionToXY( pos ) long pos PREINIT: long x; long y; PPCODE: THIS->PositionToXY( pos, &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( x ) ) ); PUSHs( sv_2mortal( newSViv( y ) ) ); %} %{ void wxTextCtrlIface::HitTest( pt ) wxPoint pt PPCODE: long col, row; wxTextCtrlHitTestResult res = THIS->HitTest( pt, &col, &row ); EXTEND( SP, 3 ); PUSHs( sv_2mortal( newSViv( res ) ) ); PUSHs( sv_2mortal( newSViv( col ) ) ); PUSHs( sv_2mortal( newSViv( row ) ) ); %} #endif %file{-}; Wx-0.9923/XS/TextEntryDialog.xs000664000000000000 532712306612233 14462 0ustar00Mark000000000000############################################################################# ## Name: XS/TextEntryDialog.xs ## Purpose: XS for Wx::TextEntryDialog ## Author: Mattia Barbon ## Modified by: ## Created: 27/11/2000 ## RCS-ID: $Id: TextEntryDialog.xs 2180 2007-08-18 20:31:57Z mbarbon $ ## Copyright: (c) 2000-2001, 2004, 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include MODULE=Wx PACKAGE=Wx::TextEntryDialog wxTextEntryDialog* wxTextEntryDialog::new( parent, message, caption = wxGetTextFromUserPromptStr, defaultValue = wxEmptyString, style = wxTextEntryDialogStyle, pos = wxDefaultPosition ) wxWindow* parent wxString message wxString caption wxString defaultValue long style wxPoint pos wxString wxTextEntryDialog::GetValue() void wxTextEntryDialog::SetValue( string ) wxString string int wxTextEntryDialog::ShowModal() MODULE=Wx PACKAGE=Wx::PasswordEntryDialog #if WXPERL_W_VERSION_GE( 2, 6, 0 ) wxPasswordEntryDialog* wxPasswordEntryDialog::new( parent, message, caption = wxGetPasswordFromUserPromptStr, defaultValue = wxEmptyString, style = wxTextEntryDialogStyle, pos = wxDefaultPosition ) wxWindow* parent wxString message wxString caption wxString defaultValue long style wxPoint pos #endif MODULE=Wx PACKAGE=Wx::NumberEntryDialog #if WXPERL_W_VERSION_GE( 2, 5, 1 ) #include wxNumberEntryDialog* wxNumberEntryDialog::new( parent, message, prompt, caption, value, min, max, pos ) wxWindow* parent wxString message wxString prompt wxString caption long value long min long max wxPoint pos long wxNumberEntryDialog::GetValue() #endif MODULE=Wx PACKAGE=Wx PREFIX=wx long wxGetNumberFromUser( message, prompt, caption, value, min = 0, max = 100, parent = 0, pos = wxDefaultPosition ) wxString message wxString prompt wxString caption long value long min long max wxWindow* parent wxPoint pos CODE: RETVAL = wxGetNumberFromUser( message, prompt, caption, value, min, max, parent, pos ); OUTPUT: RETVAL wxString wxGetPasswordFromUser( message, caption = wxGetTextFromUserPromptStr, default_value = wxEmptyString, parent = 0 ) wxString message wxString caption wxString default_value wxWindow* parent wxString wxGetTextFromUser( message, caption = wxGetTextFromUserPromptStr, default_value = wxEmptyString, parent = 0, x = -1, y = -1, centre = true ) wxString message wxString caption wxString default_value wxWindow* parent int x int y bool centre Wx-0.9923/XS/Timer.xs000664000000000000 315312306612233 12447 0ustar00Mark000000000000############################################################################# ## Name: XS/Timer.xs ## Purpose: XS for Wx::Timer ## Author: Mattia Barbon ## Modified by: ## Created: 14/02/2001 ## RCS-ID: $Id: Timer.xs 2125 2007-08-11 14:41:28Z mbarbon $ ## Copyright: (c) 2001-2004, 2006-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include "cpp/timer.h" MODULE=Wx PACKAGE=Wx::TimerEvent int wxTimerEvent::GetInterval() #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxTimer* wxTimerEvent::GetTimer() CODE: RETVAL = &THIS->GetTimer(); OUTPUT: RETVAL #endif MODULE=Wx PACKAGE=Wx::Timer wxTimer* newDefault( Class ) SV* Class PREINIT: const char* CLASS = wxPli_get_class( aTHX_ Class ); CODE: RETVAL = new wxPliTimer( CLASS ); OUTPUT: RETVAL wxTimer* newEH( Class, owner, id = wxID_ANY ) SV* Class wxEvtHandler* owner int id PREINIT: const char* CLASS = wxPli_get_class( aTHX_ Class ); CODE: RETVAL = new wxPliTimer( CLASS, owner, id ); OUTPUT: RETVAL void wxTimer::Destroy() CODE: delete THIS; int wxTimer::GetInterval() #if WXPERL_W_VERSION_GE( 2, 5, 1 ) int wxTimer::GetId() #endif bool wxTimer::IsOneShot() bool wxTimer::IsRunning() void wxTimer::SetOwner( owner, id = -1 ) wxEvtHandler* owner int id bool wxTimer::Start( milliseconds = -1, oneshot = false ) int milliseconds bool oneshot void wxTimer::Stop() Wx-0.9923/XS/ToggleButton.xs000664000000000000 676412306612233 14017 0ustar00Mark000000000000############################################################################# ## Name: XS/ToggleButton.xs ## Purpose: XS for Wx::ToggleButton ## Author: Mattia Barbon ## Modified by: ## Created: 20/07/2001 ## RCS-ID: $Id: ToggleButton.xs 2309 2007-12-25 18:17:45Z mbarbon $ ## Copyright: (c) 2001, 2003, 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxPERL_USE_TOGGLEBTN #include MODULE=Wx PACKAGE=Wx::ToggleButton void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::ToggleButton::new" ) wxToggleButton* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxToggleButton(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxToggleButton* newFull( CLASS, parent, id, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxCheckBoxNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxString label wxPoint pos wxSize size long style wxValidator* validator wxString name CODE: RETVAL = new wxToggleButton( parent, id, label, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxToggleButton::Create( parent, id, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxCheckBoxNameStr ) wxWindow* parent wxWindowID id wxString label wxPoint pos wxSize size long style wxValidator* validator wxString name C_ARGS: parent, id, label, pos, size, style, *validator, name bool wxToggleButton::GetValue() void wxToggleButton::SetValue( value ) bool value #if WXPERL_W_VERSION_GE( 2, 9, 0 ) && !defined(__WXMSW__) MODULE=Wx PACKAGE=Wx::BitmapToggleButton void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::BitmapToggleButton::new" ) wxBitmapToggleButton* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxBitmapToggleButton(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxBitmapToggleButton* newFull( CLASS, parent, id, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxCheckBoxNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxBitmap* label wxPoint pos wxSize size long style wxValidator* validator wxString name CODE: RETVAL = new wxBitmapToggleButton( parent, id, *label, pos, size, style, *validator, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxBitmapToggleButton::Create( parent, id, label, pos = wxDefaultPosition, size = wxDefaultSize, style = 0, validator = (wxValidator*)&wxDefaultValidator, name = wxCheckBoxNameStr ) wxWindow* parent wxWindowID id wxBitmap* label wxPoint pos wxSize size long style wxValidator* validator wxString name C_ARGS: parent, id, *label, pos, size, style, *validator, name bool wxBitmapToggleButton::GetValue() void wxBitmapToggleButton::SetValue( value ) bool value #endif #endif Wx-0.9923/XS/ToolBar.xs000664000000000000 3170612306612233 12756 0ustar00Mark000000000000############################################################################# ## Name: XS/ToolBar.xs ## Purpose: XS for Wx::ToolBar ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: ToolBar.xs 3345 2012-09-15 18:56:58Z mdootson $ ## Copyright: (c) 2000-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include MODULE=Wx PACKAGE=Wx::ToolBarToolBase void wxToolBarToolBase::Destroy() CODE: delete THIS; int wxToolBarToolBase::GetId() wxControl* wxToolBarToolBase::GetControl() wxToolBarBase* wxToolBarToolBase::GetToolBar() bool wxToolBarToolBase::IsButton() bool wxToolBarToolBase::IsControl() bool wxToolBarToolBase::IsSeparator() int wxToolBarToolBase::GetStyle() wxItemKind wxToolBarToolBase::GetKind() bool wxToolBarToolBase::IsEnabled() bool wxToolBarToolBase::IsToggled() bool wxToolBarToolBase::CanBeToggled() wxBitmap* wxToolBarToolBase::GetNormalBitmap() CODE: RETVAL = new wxBitmap( THIS->GetNormalBitmap() ); OUTPUT: RETVAL wxBitmap* wxToolBarToolBase::GetDisabledBitmap() CODE: RETVAL = new wxBitmap( THIS->GetDisabledBitmap() ); OUTPUT: RETVAL wxBitmap* wxToolBarToolBase::GetBitmap1() CODE: RETVAL = new wxBitmap( THIS->GetNormalBitmap() ); OUTPUT: RETVAL wxBitmap* wxToolBarToolBase::GetBitmap2() CODE: RETVAL = new wxBitmap( THIS->GetDisabledBitmap() ); OUTPUT: RETVAL wxBitmap* wxToolBarToolBase::GetBitmap() CODE: RETVAL = new wxBitmap( THIS->GetBitmap() ); OUTPUT: RETVAL wxString wxToolBarToolBase::GetLabel() wxString wxToolBarToolBase::GetShortHelp() wxString wxToolBarToolBase::GetLongHelp() Wx_UserDataO* wxToolBarToolBase::GetClientData() CODE: RETVAL = (Wx_UserDataO*) THIS->GetClientData(); OUTPUT: RETVAL bool wxToolBarToolBase::Enable( enable ) bool enable bool wxToolBarToolBase::Toggle( enable ) bool enable bool wxToolBarToolBase::SetToggle( toggle ) bool toggle bool wxToolBarToolBase::SetShortHelp( help ) wxString help bool wxToolBarToolBase::SetLongHelp( help ) wxString help void wxToolBarToolBase::SetNormalBitmap( bmp ) wxBitmap* bmp CODE: THIS->SetNormalBitmap( *bmp ); void wxToolBarToolBase::SetDisabledBitmap( bmp ) wxBitmap* bmp CODE: THIS->SetDisabledBitmap( *bmp ); void wxToolBarToolBase::SetLabel( label ) wxString label void wxToolBarToolBase::SetBitmap1( bmp ) wxBitmap* bmp CODE: THIS->SetNormalBitmap( *bmp ); void wxToolBarToolBase::SetBitmap2( bmp ) wxBitmap* bmp CODE: THIS->SetDisabledBitmap( *bmp ); void wxToolBarToolBase::SetClientData( data = 0 ) Wx_UserDataO* data CODE: delete THIS->GetClientData(); THIS->SetClientData( data ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void wxToolBarToolBase::SetDropdownMenu( menu ) wxMenu* menu wxMenu* wxToolBarToolBase::GetDropdownMenu() #endif MODULE=Wx PACKAGE=Wx::ToolBarBase void wxToolBarBase::Destroy() CODE: delete THIS; bool wxToolBarBase::AddControl( control ) wxControl* control void wxToolBar::AddSeparator() void wxToolBarBase::AddTool( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_wbmp_wbmp_b_s_s_s, AddToolLong, 3 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_wbmp_s_s, AddToolShort, 2 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_s_wbmp_wbmp_n_s_s_s, AddToolNewLong, 3 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_s_wbmp_s_n, AddToolNewShort, 3 ) END_OVERLOAD( Wx::ToolBarBase::AddTool ) wxToolBarToolBase* wxToolBarBase::AddToolShort( toolId, bitmap1, shortHelp = wxEmptyString, longHelp = wxEmptyString ) int toolId wxBitmap* bitmap1 wxString shortHelp wxString longHelp CODE: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) RETVAL = THIS->AddTool( toolId, wxEmptyString, *bitmap1, wxNullBitmap, wxITEM_NORMAL, shortHelp, longHelp ); #else RETVAL = THIS->AddTool( toolId, *bitmap1, shortHelp, longHelp ); #endif OUTPUT: RETVAL wxToolBarToolBase* wxToolBarBase::AddToolLong( toolId, bitmap1, bitmap2 = (wxBitmap*)&wxNullBitmap, isToggle = false, clientData = 0, shortHelp = wxEmptyString, longHelp = wxEmptyString ) int toolId wxBitmap* bitmap1 wxBitmap* bitmap2 bool isToggle wxPliUserDataO* clientData wxString shortHelp wxString longHelp CODE: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) RETVAL = THIS->AddTool( toolId, wxEmptyString, *bitmap1, *bitmap2, isToggle ? wxITEM_CHECK : wxITEM_NORMAL, shortHelp, longHelp ); if( clientData ) RETVAL->SetClientData( clientData ); #else RETVAL = THIS->AddTool( toolId, *bitmap1, *bitmap2, isToggle, 0, shortHelp, longHelp ); if( clientData ) RETVAL->SetClientData( clientData ); #endif OUTPUT: RETVAL wxToolBarToolBase* wxToolBarBase::AddToolNewLong( toolId, label, bitmap1, bitmap2 = (wxBitmap*)&wxNullBitmap, kind = wxITEM_NORMAL, shortHelp = wxEmptyString, longHelp = wxEmptyString, clientData = 0 ) int toolId wxString label wxBitmap* bitmap1 wxBitmap* bitmap2 wxItemKind kind wxString shortHelp wxString longHelp wxPliUserDataO* clientData CODE: RETVAL = THIS->AddTool( toolId, label, *bitmap1, *bitmap2, kind, shortHelp, longHelp ); if( clientData ) RETVAL->SetClientData( clientData ); OUTPUT: RETVAL wxToolBarToolBase* wxToolBarBase::AddToolNewShort( toolId, label, bitmap, shortHelp = wxEmptyString, kind = wxITEM_NORMAL ) int toolId wxString label wxBitmap* bitmap wxString shortHelp wxItemKind kind CODE: RETVAL = THIS->AddTool( toolId, label, *bitmap, shortHelp, kind ); OUTPUT: RETVAL wxToolBarToolBase* wxToolBarBase::AddCheckTool( toolId, label, bitmap1, bitmap2, shortHelpString = wxEmptyString, longHelpString = wxEmptyString, clientData = NULL ) int toolId wxString label wxBitmap* bitmap1 wxBitmap* bitmap2 wxString shortHelpString wxString longHelpString wxPliUserDataO* clientData C_ARGS: toolId, label, *bitmap1, *bitmap2, shortHelpString, longHelpString, clientData wxToolBarToolBase* wxToolBarBase::AddRadioTool( toolId, label, bitmap1, bitmap2, shortHelpString = wxEmptyString, longHelpString = wxEmptyString, clientData = NULL ) int toolId wxString label wxBitmap* bitmap1 wxBitmap* bitmap2 wxString shortHelpString wxString longHelpString wxPliUserDataO* clientData C_ARGS: toolId, label, *bitmap1, *bitmap2, shortHelpString, longHelpString, clientData bool wxToolBarBase::DeleteTool( toolId ) int toolId bool wxToolBarBase::DeleteToolByPos( pos ) size_t pos void wxToolBarBase::EnableTool( toolId, enable ) int toolId bool enable #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxToolBarToolBase* wxToolBarBase::FindById( toolid ) int toolid #endif wxControl* wxToolBarBase::FindControl( toolid ) int toolid wxToolBarToolBase* wxToolBarBase::FindToolForPosition( x, y ) int x int y wxSize* wxToolBarBase::GetMargins() CODE: RETVAL = new wxSize( THIS->GetMargins() ); OUTPUT: RETVAL int wxToolBarBase::GetMaxRows() int wxToolBarBase::GetMaxCols() wxSize* wxToolBarBase::GetToolSize() CODE: RETVAL = new wxSize( THIS->GetToolSize() ); OUTPUT: RETVAL wxSize* wxToolBarBase::GetToolBitmapSize() CODE: RETVAL = new wxSize( THIS->GetToolBitmapSize() ); OUTPUT: RETVAL Wx_UserDataO* wxToolBar::GetToolClientData( toolId ) int toolId CODE: RETVAL = (Wx_UserDataO*) THIS->GetToolClientData( toolId ); OUTPUT: RETVAL bool wxToolBarBase::GetToolEnabled( toolId ) int toolId wxString wxToolBarBase::GetToolLongHelp( toolId ) int toolId int wxToolBarBase::GetToolPacking() int wxToolBarBase::GetToolSeparation() wxString wxToolBarBase::GetToolShortHelp( toolId ) int toolId bool wxToolBarBase::GetToolState( toolId ) int toolId wxToolBarToolBase* wxToolBarBase::InsertControl( pos, control ) size_t pos wxControl* control wxToolBarToolBase* wxToolBarBase::InsertSeparator( pos ) size_t pos void wxToolBarBase::InsertTool( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_n_wbmp_wbmp_b_s_s_s, InsertToolLong, 3 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_n_n_s_wbmp_wbmp_b_s_s_s, InsertToolNewLong, 4 ) END_OVERLOAD( Wx::ToolBarBase::InsertTool ) wxToolBarToolBase* wxToolBarBase::InsertToolLong( pos, toolId, bitmap1, bitmap2 = (wxBitmap*)&wxNullBitmap, isToggle = false, clientData = 0, shortHelp = wxEmptyString, longHelp = wxEmptyString ) size_t pos int toolId wxBitmap* bitmap1 wxBitmap* bitmap2 bool isToggle Wx_UserDataO* clientData wxString shortHelp wxString longHelp CODE: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) RETVAL = THIS->InsertTool( pos, toolId, wxEmptyString, *bitmap1, *bitmap2, isToggle ? wxITEM_CHECK : wxITEM_NORMAL, shortHelp, longHelp ); if( clientData ) THIS->SetClientData( clientData ); #else RETVAL = THIS->InsertTool( pos, toolId, *bitmap1, *bitmap2, isToggle, 0, shortHelp, longHelp ); if( clientData ) THIS->SetClientData( clientData ); #endif OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 5, 3 ) wxToolBarToolBase* wxToolBarBase::InsertToolNewLong( pos, toolId, label, bitmap1, bitmap2 = (wxBitmap*)&wxNullBitmap, kind = wxITEM_NORMAL, shortHelp = wxEmptyString, longHelp = wxEmptyString, clientData = 0 ) size_t pos int toolId wxString label wxBitmap* bitmap1 wxBitmap* bitmap2 wxItemKind kind Wx_UserDataO* clientData wxString shortHelp wxString longHelp CODE: RETVAL = THIS->InsertTool( pos, toolId, label, *bitmap1, *bitmap2, kind, shortHelp, longHelp, 0 ); if( clientData ) THIS->SetClientData( clientData ); OUTPUT: RETVAL #endif void wxToolBarBase::ClearTools() int wxToolBarBase::GetToolsCount() int wxToolBarBase::GetToolPos( toolId ) int toolId bool wxToolBarBase::Realize() wxToolBarToolBase* wxToolBarBase::RemoveTool( id ) int id void wxToolBarBase::SetMarginsSize( size ) wxSize size CODE: THIS->SetMargins( size ); void wxToolBarBase::SetMarginsXY( x, y ) int x int y CODE: THIS->SetMargins( x, y ); void wxToolBarBase::SetMargins( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n, SetMarginsXY ) MATCH_REDISP( wxPliOvl_wsiz, SetMarginsSize ) END_OVERLOAD( Wx::ToolBarBase::SetMargins ) void wxToolBarBase::SetMaxRowsCols( mRows, mCols ) int mRows int mCols void wxToolBarBase::SetRows( nRows ) int nRows void wxToolBarBase::SetToolBitmapSize( size ) wxSize size void wxToolBarBase::SetToolClientData( id, data ) int id Wx_UserDataO* data CODE: delete THIS->GetToolClientData( id ); THIS->SetToolClientData( id, data ); void wxToolBarBase::SetToolLongHelp( toolId, helpString ) int toolId wxString helpString void wxToolBarBase::SetToolPacking( packing ) int packing void wxToolBarBase::SetToolShortHelp( toolId, helpString ) int toolId wxString helpString void wxToolBarBase::SetToolSeparation( separation ) int separation #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void wxToolBarBase::SetToolNormalBitmap( id, bitmap ) int id wxBitmap* bitmap C_ARGS: id, *bitmap void wxToolBarBase::SetToolDisabledBitmap( id, bitmap ); int id wxBitmap* bitmap C_ARGS: id, *bitmap #endif void wxToolBarBase::ToggleTool( toolId, toggle ) int toolId bool toggle #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool wxToolBarBase::SetDropdownMenu( toolid, menu ) int toolid wxMenu* menu #endif MODULE=Wx PACKAGE=Wx::ToolBar void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::ToolBar::new" ) wxToolBar* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxToolBar(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxToolBar* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxTB_HORIZONTAL | wxNO_BORDER, name = wxPanelNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name CODE: RETVAL = new wxToolBar( parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL bool wxToolBar::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxTB_HORIZONTAL | wxNO_BORDER, name = wxPanelNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxString name Wx-0.9923/XS/Toolbook.xsp000664000000000000 357012306612233 13342 0ustar00Mark000000000000############################################################################# ## Name: XS/Toolbook.xsp ## Purpose: XS++ for Wx::Toolbook ## Author: Mattia Barbon ## Modified by: ## Created: 30/07/2006 ## RCS-ID: $Id: Toolbook.xsp 2079 2007-07-08 21:18:04Z mbarbon $ ## Copyright: (c) 2006 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}; %typemap{wxToolbook*}{simple}; %{ #if WXPERL_W_VERSION_GE( 2, 7, 0 ) #include #include %} %name{Wx::Toolbook} class wxToolbook { %name{newDefault} wxToolbook() %code{% RETVAL = new wxToolbook(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxToolbook(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxEmptyString) %code{% RETVAL = new wxToolbook( parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxEmptyString); wxToolBarBase* GetToolBar(); void Realize(); }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Toolbook::new" ) %} %{ #endif %}Wx-0.9923/XS/ToolTip.xs000664000000000000 224512306612233 12762 0ustar00Mark000000000000############################################################################# ## Name: XS/ToolTip.xs ## Purpose: XS for Wx::ToolTip ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: ToolTip.xs 2285 2007-11-11 21:31:54Z mbarbon $ ## Copyright: (c) 2000-2002, 2004, 2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxPERL_USE_TOOLTIPS #include MODULE=Wx PACKAGE=Wx::ToolTip void Enable( enable ) bool enable CODE: wxToolTip::Enable( enable ); void SetDelay( msecs ) long msecs CODE: wxToolTip::SetDelay( msecs ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void SetAutoPop( msecs ) long msecs CODE: wxToolTip::SetAutoPop( msecs ); void SetReshow( msecs ) long msecs CODE: wxToolTip::SetReshow( msecs ); #endif wxToolTip* wxToolTip::new( string ) wxString string void wxToolTip::SetTip( tip ) wxString tip wxString wxToolTip::GetTip() wxWindow* wxToolTip::GetWindow() #endif Wx-0.9923/XS/TopLevelWindow.xsp000664000000000000 557712306612233 14505 0ustar00Mark000000000000############################################################################# ## Name: XS/TopLevelWindow.xsp ## Purpose: XS++ for Wx::TopLevelWindow ## Author: Mattia Barbon ## Modified by: ## Created: 04/01/2005 ## RCS-ID: $Id: TopLevelWindow.xsp 3380 2012-09-26 23:01:45Z mdootson $ ## Copyright: (c) 2005-2007 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}; %typemap{wxTopLevelWindow*}{simple}; #if !defined(__WXMOTIF__) || WXPERL_W_VERSION_GE( 2, 5, 1 ) #include #include "cpp/overload.h" %name{Wx::TopLevelWindow} class wxTopLevelWindow { #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void RequestUserAttention( int flags = wxUSER_ATTENTION_INFO ); #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) bool IsAlwaysMaximized(); wxWindow* GetDefaultItem(); wxWindow* SetDefaultItem( wxWindow* win ); wxWindow* GetTmpDefaultItem() const; wxWindow* SetTmpDefaultItem( wxWindow* win ); bool SetTransparent( wxByte alpha ); bool CanSetTransparent(); #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool EnableCloseButton( bool enable ); #endif const wxIcon& GetIcon() const; const wxIconBundle& GetIcons() const; void SetIcon( const wxIcon& icon ); void SetIcons( const wxIconBundle& icons ); void Iconize( bool iconize ); void Maximize( bool maximize ); bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL ); bool IsFullScreen() const; bool IsActive() const; bool IsIconized() const; bool IsMaximized() const; #ifdef __WXUNIVERSAL__ bool IsUsingNativeDecorations() const; #endif #if defined(__WXMSW__) && WXPERL_W_VERSION_GE( 2, 7, 1 ) void SetLayoutDirection( wxLayoutDirection direction ); #endif void SetShape( const wxRegion& region ); #if WXPERL_W_VERSION_GE( 2, 7, 2 ) bool ShouldPreventAppExit(); #endif #if defined(__WXMSW__) && WXPERL_W_VERSION_GE( 2, 9, 3 ) wxMenu* MSWGetSystemMenu () const; #endif #if WXPERL_W_VERSION_GE( 2, 9, 4 ) bool OSXIsModified() const; void OSXSetModified( bool modified); void SetRepresentedFilename(const wxString& filename); void SetMinSize(const wxSize& minSize); void SetMaxSize(const wxSize& maxSize); #endif #ifdef __WXUNIVERSAL__ void UseNativeDecorations( bool native = true ); %{ void wxTopLevelWindow::UseNativeDecorationsByDefault( native = true ) bool native CODE: wxTopLevelWindow::UseNativeDecorationsByDefault( native ); %} #endif }; %{ ##void ##wxIconBundle::new( ... ) ## PPCODE: ## BEGIN_OVERLOAD() ## MATCH_VOIDM_REDISP( newEmpty ) ## MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_s_n, newFile, 1 ) ## MATCH_REDISP( wxPliOvl_wico, newIcon ) ## END_OVERLOAD( Wx::IconBundle::new ) %} #endif Wx-0.9923/XS/Treebook.xsp000664000000000000 513012306612233 13316 0ustar00Mark000000000000############################################################################# ## Name: XS/Treebook.xsp ## Purpose: XS++ for Wx::Treebook ## Author: Mattia Barbon ## Modified by: ## Created: 30/07/2006 ## RCS-ID: $Id: Treebook.xsp 2148 2007-08-15 17:10:50Z mbarbon $ ## Copyright: (c) 2006-2007 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}; %typemap{wxTreebook*}{simple}; %typemap{wxTreebookEvent*}{simple}; #if WXPERL_W_VERSION_GE( 2, 7, 0 ) #include %name{Wx::TreebookEvent} class wxTreebookEvent { wxTreebookEvent( wxEventType commandType = wxEVT_NULL, int id = 0, int nSel = wxNOT_FOUND, int nOldSel = wxNOT_FOUND ); int GetOldSelection() const; int GetSelection() const; }; %name{Wx::Treebook} class wxTreebook { %name{newDefault} wxTreebook() %code{% RETVAL = new wxTreebook(); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxTreebook(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxEmptyString) %code{% RETVAL = new wxTreebook( parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxEmptyString); bool InsertSubPage( size_t pos, wxWindow* page, const wxString& text, bool bSelect = false, int imageId = wxNOT_FOUND ); bool AddSubPage( wxWindow* page, const wxString& text, bool bSelect = false, int imageId = wxNOT_FOUND ); bool IsNodeExpanded( size_t pos ) const; bool ExpandNode( size_t pos, bool expand = true ); bool CollapseNode( size_t pos ); int GetPageParent( size_t pos ) const; wxTreeCtrl* GetTreeCtrl() const; }; %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::Treebook::new" ) %} #endif Wx-0.9923/XS/TreeCtrl.xs000664000000000000 4210612306612233 13134 0ustar00Mark000000000000############################################################################# ## Name: XS/TreeCtrl.xs ## Purpose: XS for Wx::TreeCtrl ## Author: Mattia Barbon ## Modified by: ## Created: 04/02/2001 ## RCS-ID: $Id: TreeCtrl.xs 3323 2012-08-09 01:17:49Z mdootson $ ## Copyright: (c) 2001-2007 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include "cpp/overload.h" MODULE=Wx PACKAGE=Wx::TreeItemData wxTreeItemData* wxPliTreeItemData::new( data = 0 ) SV_null* data CODE: RETVAL = new wxPliTreeItemData( data ); OUTPUT: RETVAL void wxTreeItemData::Destroy() CODE: delete THIS; SV_null* wxTreeItemData::GetData() CODE: RETVAL = ((wxPliTreeItemData*)THIS)->m_data; OUTPUT: RETVAL void wxTreeItemData::SetData( data = 0 ) SV_null* data CODE: ((wxPliTreeItemData*)THIS)->SetData( data ); wxTreeItemId* wxTreeItemData::GetId() CODE: RETVAL = new wxTreeItemId( THIS->GetId() ); OUTPUT: RETVAL void wxTreeItemData::SetId( id ) wxTreeItemId* id C_ARGS: *id MODULE=Wx PACKAGE=Wx::TreeItemId static void wxTreeItemId::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxTreeItemId::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::TreeItemId", THIS, ST(0) ); delete THIS; bool wxTreeItemId::IsOk() int tiid_spaceship( tid1, tid2, ... ) SV* tid1 SV* tid2 CODE: // this is not a proper spaceship method // it just allows autogeneration of != and == // anyway, comparing ids is useless RETVAL = -1; if( SvROK( tid1 ) && SvROK( tid2 ) && sv_derived_from( tid1, CHAR_P "Wx::TreeItemId" ) && sv_derived_from( tid2, CHAR_P "Wx::TreeItemId" ) ) { wxTreeItemId* id1 = (wxTreeItemId*) wxPli_sv_2_object( aTHX_ tid1, "Wx::TreeItemId" ); wxTreeItemId* id2 = (wxTreeItemId*) wxPli_sv_2_object( aTHX_ tid2, "Wx::TreeItemId" ); RETVAL = *id1 == *id2 ? 0 : 1; } else RETVAL = 1; OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::TreeEvent wxTreeEvent* wxTreeEvent::new( commandType = wxEVT_NULL, id = 0 ) wxEventType commandType int id wxTreeItemId* wxTreeEvent::GetItem() CODE: RETVAL = new wxTreeItemId( THIS->GetItem() ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void wxTreeCtrl::SetQuickBestSize( q ) bool q bool wxTreeCtrl::GetQuickBestSize() #endif int wxTreeEvent::GetKeyCode() wxKeyEvent* wxTreeEvent::GetKeyEvent() CODE: RETVAL = new wxKeyEvent ( THIS->GetKeyEvent() ); OUTPUT: RETVAL wxTreeItemId* wxTreeEvent::GetOldItem() CODE: RETVAL = new wxTreeItemId( THIS->GetOldItem() ); OUTPUT: RETVAL wxPoint* wxTreeEvent::GetPoint() CODE: RETVAL = new wxPoint( THIS->GetPoint() ); OUTPUT: RETVAL bool wxTreeEvent::IsEditCancelled() wxString wxTreeEvent::GetLabel() void wxTreeEvent::SetToolTip( tooltip ) wxString tooltip MODULE=Wx PACKAGE=Wx::TreeCtrl void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::TreeCtrl::new" ) wxTreeCtrl* newDefault( CLASS ) PlClassName CLASS CODE: RETVAL = new wxPliTreeCtrl( CLASS ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); OUTPUT: RETVAL wxTreeCtrl* newFull( CLASS, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxTR_HAS_BUTTONS, validator = (wxValidator*)&wxDefaultValidator, name = wxTreeCtrlNameStr ) PlClassName CLASS wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxValidator* validator wxString name CODE: RETVAL = new wxPliTreeCtrl( CLASS, parent, id, pos, size, style, *validator, name ); OUTPUT: RETVAL bool wxTreeCtrl::Create( parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxTR_HAS_BUTTONS, validator = (wxValidator*)&wxDefaultValidator, name = wxTreeCtrlNameStr ) wxWindow* parent wxWindowID id wxPoint pos wxSize size long style wxValidator* validator wxString name C_ARGS: parent, id, pos, size, style, *validator, name wxTreeItemId* wxTreeCtrl::AddRoot( text, image = -1, selImage = -1, data = 0 ) wxString text int image int selImage wxTreeItemData* data CODE: RETVAL = new wxTreeItemId( THIS->AddRoot( text, image, selImage, data ) ); OUTPUT: RETVAL wxTreeItemId* wxTreeCtrl::AppendItem( parent, text, image = -1, selImage = -1, data = 0 ) wxTreeItemId* parent wxString text int image int selImage wxTreeItemData* data CODE: RETVAL = new wxTreeItemId( THIS->AppendItem( *parent, text, image, selImage, data ) ); OUTPUT: RETVAL void wxTreeCtrl::Collapse( item ) wxTreeItemId* item CODE: THIS->Collapse( *item ); #if WXPERL_W_VERSION_GE( 2, 8, 3 ) void wxTreeCtrl::CollapseAll() void wxTreeCtrl::CollapseAllChildren( item ) wxTreeItemId* item C_ARGS: *item #endif void wxTreeCtrl::CollapseAndReset( item ) wxTreeItemId* item C_ARGS: *item void wxTreeCtrl::Delete( item ) wxTreeItemId* item C_ARGS: *item void wxTreeCtrl::DeleteChildren( item ) wxTreeItemId* item; C_ARGS: *item void wxTreeCtrl::DeleteAllItems() void wxTreeCtrl::EditLabel( item ) wxTreeItemId* item CODE: THIS->EditLabel( *item ); #if defined( __WXMSW__ ) #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxTreeCtrl::EndEditLabel( item, discardChanges = false ) wxTreeItemId* item bool discardChanges C_ARGS: *item, discardChanges #else void wxTreeCtrl::EndEditLabel( cancelEdit ) bool cancelEdit #endif #endif void wxTreeCtrl::EnsureVisible( item ) wxTreeItemId* item C_ARGS: *item #if WXPERL_W_VERSION_GE( 2, 7, 2 ) void wxTreeCtrl::ExpandAll() #endif void wxTreeCtrl::Expand( item ) wxTreeItemId* item C_ARGS: *item #if WXPERL_W_VERSION_GE( 2, 7, 0 ) void wxTreeCtrl::ExpandAllChildren( item ) wxTreeItemId* item C_ARGS: *item #endif void wxTreeCtrl::GetBoundingRect( item, textOnly = false ) wxTreeItemId* item bool textOnly PREINIT: wxRect rect; PPCODE: bool ret = THIS->GetBoundingRect( *item, rect, textOnly ); if( ret ) { SV* ret = sv_newmortal(); wxPli_non_object_2_sv( aTHX_ ret, new wxRect( rect ), "Wx::Rect" ); XPUSHs( ret ); } else { XSRETURN_UNDEF; } size_t wxTreeCtrl::GetChildrenCount( item, recursively = true ) wxTreeItemId* item bool recursively C_ARGS: *item, recursively int wxTreeCtrl::GetCount() wxTreeItemData* wxTreeCtrl::GetItemData( item ) wxTreeItemId* item CODE: RETVAL = (wxPliTreeItemData*) THIS->GetItemData( *item ); OUTPUT: RETVAL SV_null* wxTreeCtrl::GetPlData( item ) wxTreeItemId* item CODE: wxPliTreeItemData* data = (wxPliTreeItemData*) THIS->GetItemData( *item ); RETVAL = data ? data->m_data : 0; OUTPUT: RETVAL #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) wxTextCtrl* wxTreeCtrl::GetEditControl() #endif void wxTreeCtrl::GetFirstChild( item ) wxTreeItemId* item PREINIT: #if WXPERL_W_VERSION_GE( 2, 5, 1 ) void* cookie; #else long cookie; #endif PPCODE: wxTreeItemId ret = THIS->GetFirstChild( *item, cookie ); #if WXPERL_W_VERSION_LT( 2, 5, 1 ) if( !ret.IsOk() ) cookie = -1; #endif EXTEND( SP, 2 ); PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTreeItemId( ret ), "Wx::TreeItemId" ) ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) PUSHs( sv_2mortal( newSViv( PTR2IV( cookie ) ) ) ); #else PUSHs( sv_2mortal( newSViv( cookie ) ) ); #endif wxTreeItemId* wxTreeCtrl::GetFirstVisibleItem() CODE: RETVAL = new wxTreeItemId( THIS->GetFirstVisibleItem() ); OUTPUT: RETVAL wxImageList* wxTreeCtrl::GetImageList() OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); #if !defined( __WXMSW__ ) wxImageList* wxTreeCtrl::GetButtonsImageList() OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); #endif int wxTreeCtrl::GetIndent() int wxTreeCtrl::GetItemImage( item, which = wxTreeItemIcon_Normal ) wxTreeItemId* item wxTreeItemIcon which C_ARGS: *item, which wxString wxTreeCtrl::GetItemText( item ) wxTreeItemId* item C_ARGS: *item wxColour* wxTreeCtrl::GetItemBackgroundColour( item ) wxTreeItemId* item CODE: RETVAL = new wxColour( THIS->GetItemBackgroundColour( *item ) ); OUTPUT: RETVAL wxColour* wxTreeCtrl::GetItemTextColour( item ) wxTreeItemId* item CODE: RETVAL = new wxColour( THIS->GetItemTextColour( *item ) ); OUTPUT: RETVAL wxFont* wxTreeCtrl::GetItemFont( item ) wxTreeItemId* item CODE: RETVAL = new wxFont( THIS->GetItemFont( *item ) ); OUTPUT: RETVAL wxTreeItemId* wxTreeCtrl::GetLastChild( item ) wxTreeItemId* item CODE: RETVAL = new wxTreeItemId( THIS->GetLastChild( *item ) ); OUTPUT: RETVAL #if WXPERL_W_VERSION_GE( 2, 5, 1 ) void wxTreeCtrl::GetNextChild( item, cookie ) wxTreeItemId* item IV cookie PREINIT: void* realcookie = INT2PTR( void*, cookie ); PPCODE: wxTreeItemId ret = THIS->GetNextChild( *item, realcookie ); EXTEND( SP, 2 ); PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTreeItemId( ret ), "Wx::TreeItemId" ) ); PUSHs( sv_2mortal( newSViv( PTR2IV( realcookie ) ) ) ); #else void wxTreeCtrl::GetNextChild( item, cookie ) wxTreeItemId* item long cookie PPCODE: wxTreeItemId ret = THIS->GetNextChild( *item, cookie ); EXTEND( SP, 2 ); PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTreeItemId( ret ), "Wx::TreeItemId" ) ); PUSHs( sv_2mortal( newSViv( cookie ) ) ); #endif wxTreeItemId* wxTreeCtrl::GetNextSibling( item ) wxTreeItemId* item CODE: RETVAL = new wxTreeItemId( THIS->GetNextSibling( *item ) ); OUTPUT: RETVAL wxTreeItemId* wxTreeCtrl::GetNextVisible( item ) wxTreeItemId* item CODE: RETVAL = new wxTreeItemId( THIS->GetNextVisible( *item ) ); OUTPUT: RETVAL ## DECLARE_OVERLOAD( wtid, Wx::TreeItemId ) void wxTreeCtrl::GetParent( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( Wx::Window::GetParent ) MATCH_REDISP( wxPliOvl_wtid, GetItemParent ) END_OVERLOAD( Wx::TreeCtrl::GetParent ) wxTreeItemId* wxTreeCtrl::GetItemParent( item ) wxTreeItemId* item CODE: RETVAL = new wxTreeItemId( THIS->GetItemParent( *item ) ); OUTPUT: RETVAL wxTreeItemId* wxTreeCtrl::GetPrevSibling( item ) wxTreeItemId* item CODE: RETVAL = new wxTreeItemId( THIS->GetPrevSibling( *item ) ); OUTPUT: RETVAL wxTreeItemId* wxTreeCtrl::GetPrevVisible( item ) wxTreeItemId* item CODE: RETVAL = new wxTreeItemId( THIS->GetPrevVisible( *item ) ); OUTPUT: RETVAL wxTreeItemId* wxTreeCtrl::GetRootItem() CODE: RETVAL = new wxTreeItemId( THIS->GetRootItem() ); OUTPUT: RETVAL wxTreeItemId* wxTreeCtrl::GetSelection() CODE: RETVAL = new wxTreeItemId( THIS->GetSelection() ); OUTPUT: RETVAL void wxTreeCtrl::GetSelections() PREINIT: wxArrayTreeItemIds selections; PPCODE: size_t num = THIS->GetSelections( selections ); EXTEND( SP, (IV)num ); for( size_t i = 0; i < num; ++i ) { PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTreeItemId( selections[i] ), "Wx::TreeItemId" ) ); } wxImageList* wxTreeCtrl::GetStateImageList() OUTPUT: RETVAL CLEANUP: wxPli_object_set_deleteable( aTHX_ ST(0), false ); void wxTreeCtrl::HitTest( point ) wxPoint point PREINIT: int flags; PPCODE: wxTreeItemId ret = THIS->HitTest( point, flags ); EXTEND( SP, 2 ); PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxTreeItemId( ret ), "Wx::TreeItemId" ) ); PUSHs( sv_2mortal( newSViv( flags ) ) ); void wxTreeCtrl::InsertItem( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wtid_wtid_s_n_n, InsertItemPrev, 3 ) MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wtid_n_s_n_n, InsertItemBef, 3 ) END_OVERLOAD( Wx::TreeCtrl::InsertItem ) wxTreeItemId* wxTreeCtrl::InsertItemPrev( parent, previous, text, image = -1, selImage = -1, data = 0 ) wxTreeItemId* parent wxTreeItemId* previous wxString text int image int selImage wxTreeItemData* data CODE: RETVAL = new wxTreeItemId( THIS->InsertItem( *parent, *previous, text, image, selImage, data ) ); OUTPUT: RETVAL wxTreeItemId* wxTreeCtrl::InsertItemBef( parent, before, text, image = -1, selImage = -1, data = 0 ) wxTreeItemId* parent size_t before wxString text int image int selImage wxTreeItemData* data CODE: RETVAL = new wxTreeItemId( THIS->InsertItem( *parent, before, text, image, selImage, data ) ); OUTPUT: RETVAL bool wxTreeCtrl::IsBold( item ) wxTreeItemId* item C_ARGS: *item bool wxTreeCtrl::IsExpanded( item ) wxTreeItemId* item C_ARGS: *item bool wxTreeCtrl::IsSelected( item ) wxTreeItemId* item C_ARGS: *item bool wxTreeCtrl::IsVisible( item ) wxTreeItemId* item C_ARGS: *item #if WXPERL_W_VERSION_GE( 2, 8, 3 ) bool wxTreeCtrl::IsEmpty() #endif bool wxTreeCtrl::ItemHasChildren( item ) wxTreeItemId* item C_ARGS: *item int wxTreeCtrl::OnCompareItems( item1, item2 ) wxTreeItemId* item1 wxTreeItemId* item2 CODE: RETVAL = THIS->wxTreeCtrl::OnCompareItems( *item1, *item2 ); OUTPUT: RETVAL wxTreeItemId* wxTreeCtrl::PrependItem( parent, text, image = -1, selImage = -1, data = 0 ) wxTreeItemId* parent wxString text int image int selImage wxTreeItemData* data CODE: RETVAL = new wxTreeItemId( THIS->PrependItem( *parent, text, image, selImage, data ) ); OUTPUT: RETVAL void wxTreeCtrl::ScrollTo( item ) wxTreeItemId* item C_ARGS: *item #if WXPERL_W_VERSION_GE( 2, 5, 2 ) void wxTreeCtrl::SelectItem( item, select = true ) wxTreeItemId* item bool select C_ARGS: *item, select #else void wxTreeCtrl::SelectItem( item ) wxTreeItemId* item C_ARGS: *item #endif void wxTreeCtrl::SetIndent( indent ) int indent void wxTreeCtrl::SetImageList( list ) wxImageList* list #if !defined( __WXMSW__ ) void wxTreeCtrl::SetButtonsImageList( list ) wxImageList* list #endif void wxTreeCtrl::SetStateImageList( list ) wxImageList* list void wxTreeCtrl::AssignImageList( list ) wxImageList* list CODE: wxPli_object_set_deleteable( aTHX_ ST(1), false ); THIS->AssignImageList( list ); void wxTreeCtrl::AssignButtonsImageList( list ) wxImageList* list CODE: wxPli_object_set_deleteable( aTHX_ ST(1), false ); THIS->AssignStateImageList( list ); void wxTreeCtrl::AssignStateImageList( list ) wxImageList* list CODE: wxPli_object_set_deleteable( aTHX_ ST(1), false ); THIS->AssignStateImageList( list ); void wxTreeCtrl::SetItemBackgroundColour( item, col ) wxTreeItemId* item wxColour col C_ARGS: *item, col void wxTreeCtrl::SetItemBold( item, bold = true ) wxTreeItemId* item bool bold C_ARGS: *item, bold void wxTreeCtrl::SetItemData( item, data ) wxTreeItemId* item wxTreeItemData* data CODE: wxTreeItemData* tid = THIS->GetItemData( *item ); if( tid ) delete tid; THIS->SetItemData( *item, data ); void wxTreeCtrl::SetPlData( item, data ) wxTreeItemId* item SV_null* data CODE: wxTreeItemData* tid = THIS->GetItemData( *item ); if( tid ) delete tid; THIS->SetItemData( *item, data ? new wxPliTreeItemData( data ) : 0 ); #if defined( __WXMSW__ ) void wxTreeCtrl::SetItemDropHighlight( item, highlight = true ) wxTreeItemId* item bool highlight C_ARGS: *item, highlight #endif void wxTreeCtrl::SetItemFont( item, font ) wxTreeItemId* item wxFont* font C_ARGS: *item, *font void wxTreeCtrl::SetItemHasChildren( item, hasChildren = true ) wxTreeItemId* item bool hasChildren C_ARGS: *item, hasChildren void wxTreeCtrl::SetItemImage( item, image, which = wxTreeItemIcon_Normal ) wxTreeItemId* item int image wxTreeItemIcon which C_ARGS: *item, image, which void wxTreeCtrl::SetItemText( item, text ) wxTreeItemId* item wxString text C_ARGS: *item, text void wxTreeCtrl::SetItemTextColour( item, col ) wxTreeItemId* item wxColour col C_ARGS: *item, col void wxTreeCtrl::SortChildren( item ) wxTreeItemId* item C_ARGS: *item void wxTreeCtrl::Toggle( item ) wxTreeItemId* item C_ARGS: *item #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxTreeCtrl::UnselectItem( item ) wxTreeItemId* item C_ARGS: *item void wxTreeCtrl::ToggleItemSelection( item ) wxTreeItemId* item C_ARGS: *item #endif void wxTreeCtrl::Unselect() void wxTreeCtrl::UnselectAll() Wx-0.9923/XS/Utils.xs000664000000000000 2474412306612233 12520 0ustar00Mark000000000000############################################################################# ## Name: XS/Utils.xs ## Purpose: XS for some utility classes ## Author: Mattia Barbon ## Modified by: ## Created: 09/02/2001 ## RCS-ID: $Id: Utils.xs 3096 2011-10-13 05:52:30Z mdootson $ ## Copyright: (c) 2001-2003, 2005-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 ############################################################################# #include #include #include #include #include #include #include #include #if WXPERL_W_VERSION_GE( 2, 8, 0 ) #include #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) #ifdef __WXGTK20__ #define __WXGTK20__DEFINED #undef __WXGTK20__ #endif #include #ifdef __WXGTK20__DEFINED #define __WXGTK20__ #endif #endif #include "cpp/tipprovider.h" MODULE=Wx PACKAGE=Wx::CaretSuspend wxCaretSuspend* wxCaretSuspend::new( window ) wxWindow* window static void wxCaretSuspend::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxCaretSuspend::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::CaretSuspend", THIS, ST(0) ); delete THIS; MODULE=Wx PACKAGE=Wx::SplashScreen #ifndef wxFRAME_FLOAT_ON_PARENT #define wxFRAME_FLOAT_ON_PARENT 0 #endif #ifndef wxFRAME_TOOL_WINDOW #define wxFRAME_TOOL_WINDOW 0 #endif wxSplashScreen* wxSplashScreen::new( bitmap, splashStyle, milliseconds, parent, id = wxID_ANY, pos = wxDefaultPosition, size = wxDefaultSize, style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP ) wxBitmap* bitmap long splashStyle int milliseconds wxWindow* parent wxWindowID id wxPoint pos wxSize size long style CODE: RETVAL = new wxSplashScreen( *bitmap, splashStyle, milliseconds, parent, id, pos, size, style ); OUTPUT: RETVAL long wxSplashScreen::GetSplashStyle() wxSplashScreenWindow* wxSplashScreen::GetSplashWindow() int wxSplashScreen::GetTimeout() MODULE=Wx PACKAGE=Wx::WindowDisabler #if WXPERL_W_VERSION_GE( 2, 9, 2 ) void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newBool ) MATCH_REDISP( wxPliOvl_wwin, newWindow ) MATCH_REDISP( wxPliOvl_n, newBool ) END_OVERLOAD( "Wx::WindowDisabler::new" ) wxWindowDisabler* newWindow( CLASS, skip ) SV* CLASS wxWindow* skip CODE: RETVAL = new wxWindowDisabler( skip ); OUTPUT: RETVAL wxWindowDisabler* newBool( CLASS, disable = true ) SV* CLASS bool disable CODE: RETVAL = new wxWindowDisabler( disable ); OUTPUT: RETVAL #else wxWindowDisabler* wxWindowDisabler::new( skip = 0 ) wxWindow* skip #endif static void wxWindowDisabler::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxWindowDisabler::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::WindowDisabler", THIS, ST(0) ); delete THIS; MODULE=Wx PACKAGE=Wx::BusyCursor #if WXPERL_W_VERSION_GE( 2, 7, 0 ) wxBusyCursor* wxBusyCursor::new( cursor = wxHOURGLASS_CURSOR ) const wxCursor* cursor #else wxBusyCursor* wxBusyCursor::new( cursor = wxHOURGLASS_CURSOR ) wxCursor* cursor #endif static void wxBusyCursor::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxBusyCursor::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::BusyCursor", THIS, ST(0) ); delete THIS; MODULE=Wx PACKAGE=Wx::BusyInfo wxBusyInfo* wxBusyInfo::new( message ) wxString message static void wxBusyInfo::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxBusyInfo::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::BusyInfo", THIS, ST(0) ); delete THIS; MODULE=Wx PACKAGE=Wx::StopWatch #ifdef Pause #undef Pause #endif wxStopWatch* wxStopWatch::new() static void wxStopWatch::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxStopWatch::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::StopWatch", THIS, ST(0) ); delete THIS; void wxStopWatch::Pause() void wxStopWatch::Start( milliseconds = 0 ) long milliseconds void wxStopWatch::Resume() long wxStopWatch::Time() MODULE=Wx PACKAGE=Wx::SingleInstanceChecker #if wxUSE_SNGLINST_CHECKER wxSingleInstanceChecker* wxSingleInstanceChecker::new() static void wxSingleInstanceChecker::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxSingleInstanceChecker::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::SingleInstanceChecker", THIS, ST(0) ); delete THIS; bool wxSingleInstanceChecker::Create( name, path = wxEmptyString ) wxString name wxString path bool wxSingleInstanceChecker::IsAnotherRunning() #endif #if WXPERL_W_VERSION_GE( 2, 8, 0 ) MODULE=Wx PACKAGE=Wx::SystemOptions #define wxSystemOptions_SetOption wxSystemOptions::SetOption #define wxSystemOptions_GetOption wxSystemOptions::GetOption #define wxSystemOptions_GetOptionInt wxSystemOptions::GetOptionInt #define wxSystemOptions_HasOption wxSystemOptions::HasOption #define wxSystemOptions_IsFalse wxSystemOptions::IsFalse void SetOption( name, value ) wxString name wxString value CODE: wxSystemOptions_SetOption( name, value); void SetOptionInt( name, value ) wxString name int value CODE: wxSystemOptions_SetOption( name, value); wxString GetOption( name ) wxString name CODE: RETVAL = wxSystemOptions_GetOption( name ); OUTPUT: RETVAL int GetOptionInt( name ) wxString name CODE: RETVAL = wxSystemOptions_GetOptionInt( name ); OUTPUT: RETVAL bool HasOption( name ) wxString name CODE: RETVAL = wxSystemOptions_HasOption( name ); OUTPUT: RETVAL bool IsFalse( name ) wxString name CODE: RETVAL = wxSystemOptions_IsFalse( name ); OUTPUT: RETVAL #endif MODULE=Wx PACKAGE=Wx::SystemSettings #if WXPERL_W_VERSION_GE( 2, 5, 2 ) #define wxSystemSettings_GetSystemColour wxSystemSettings::GetColour #define wxSystemSettings_GetSystemFont wxSystemSettings::GetFont #define wxSystemSettings_GetSystemMetric wxSystemSettings::GetMetric #else #define wxSystemSettings_GetSystemColour wxSystemSettings::GetSystemColour #define wxSystemSettings_GetSystemFont wxSystemSettings::GetSystemFont #define wxSystemSettings_GetSystemMetric wxSystemSettings::GetSystemMetric #endif wxColour* GetColour( index ) wxSystemColour index CODE: RETVAL = new wxColour( wxSystemSettings_GetSystemColour( index ) ); OUTPUT: RETVAL wxColour* GetSystemColour( index ) wxSystemColour index CODE: RETVAL = new wxColour( wxSystemSettings_GetSystemColour( index ) ); OUTPUT: RETVAL wxFont* GetFont( index ) wxSystemFont index CODE: RETVAL = new wxFont( wxSystemSettings_GetSystemFont( index ) ); OUTPUT: RETVAL wxFont* GetSystemFont( index ) wxSystemFont index CODE: RETVAL = new wxFont( wxSystemSettings_GetSystemFont( index ) ); OUTPUT: RETVAL int GetMetric( index ) wxSystemMetric index CODE: RETVAL = wxSystemSettings_GetSystemMetric( index ); OUTPUT: RETVAL int GetSystemMetric( index ) wxSystemMetric index CODE: RETVAL = wxSystemSettings_GetSystemMetric( index ); OUTPUT: RETVAL wxSystemScreenType GetScreenType() CODE: RETVAL = wxSystemSettings::GetScreenType(); OUTPUT: RETVAL MODULE=Wx PACKAGE=Wx::TipProvider wxTipProvider* wxTipProvider::new( currentTip ) size_t currentTip CODE: RETVAL = new wxPliTipProvider( CLASS, currentTip ); OUTPUT: RETVAL void wxTipProvider::Destroy() CODE: delete THIS; size_t wxTipProvider::GetCurrentTip() wxString wxTipProvider::GetTip() wxString wxTipProvider::PreprocessTip( tip ) wxString tip void wxTipProvider::SetCurrentTip( number ) size_t number CODE: ((wxPliTipProvider*)THIS)->SetCurrentTip( number ); MODULE=Wx PACKAGE=Wx::Thread #if wxUSE_THREADS #include bool IsMain() CODE: RETVAL = wxThread::IsMain(); OUTPUT: RETVAL #endif MODULE=Wx PACKAGE=Wx PREFIX=wx #if WXPERL_W_VERSION_GE( 2, 5, 3 ) bool wxIsStockID( wxWindowID id ) bool wxIsStockLabel( wxWindowID id, wxString label ) #if WXPERL_W_VERSION_GE( 2, 6, 3 ) #if WXPERL_W_VERSION_GE( 2, 7, 1 ) wxString wxGetStockLabel( wxWindowID id, long flags = wxSTOCK_WITH_MNEMONIC ) #else wxString wxGetStockLabel( wxWindowID id, bool withCodes = true, wxString accelerator = wxEmptyString ) #endif #else wxString wxGetStockLabel( wxWindowID id ) #endif #endif #if WXPERL_W_VERSION_GE( 2, 7, 1 ) wxAcceleratorEntry* wxGetStockAccelerator( wxWindowID id ) CODE: RETVAL = new wxAcceleratorEntry( wxGetStockAccelerator( id ) ); OUTPUT: RETVAL wxString wxGetStockHelpString( wxWindowID id, wxStockHelpStringClient client = wxSTOCK_MENU ) #endif #if WXPERL_W_VERSION_GE( 2, 7, 0 ) bool wxLaunchDefaultBrowser( url, flags = 0 ) wxString url int flags #else #if WXPERL_W_VERSION_GE( 2, 6, 1 ) bool wxLaunchDefaultBrowser( url ) wxString url #endif #endif bool wxShowTip( parent, tipProvider, showAtStartup = true ) wxWindow* parent wxTipProvider* tipProvider bool showAtStartup wxTipProvider* wxCreateFileTipProvider( filename, currentTip ) wxString filename size_t currentTip void wxUsleep( ms ) unsigned long ms CODE: #if WXPERL_W_VERSION_LE( 2, 5, 2 ) wxUsleep( ms ); #else wxMilliSleep( ms ); #endif #if WXPERL_W_VERSION_GE( 2, 5, 3 ) void wxMicroSleep( ms ) unsigned long ms #endif void wxMilliSleep( ms ) unsigned long ms CODE: #if WXPERL_W_VERSION_LE( 2, 5, 2 ) wxUsleep( ms ); #else wxMilliSleep( ms ); #endif void wxSleep( sec ) int sec bool wxYield() bool wxSafeYield( window = 0, onlyIfNeeded = false ) wxWindow* window bool onlyIfNeeded bool wxYieldIfNeeded() void wxTrap() wxString wxGetOsDescription() long wxNewId() wxEventType wxNewEventType() void wxRegisterId( id ) long id void wxBell() void wxExit() bool wxShell( command = wxEmptyString ) wxString command #if WXPERL_W_VERSION_GE( 2, 6, 0 ) bool wxGetKeyState( key ) wxKeyCode key #endif void wxSetCursor( wxCursor* cursor) C_ARGS: *cursor MODULE=Wx PACKAGE=Wx void _utf8_on( sv ) SV* sv CODE: SvUTF8_on( sv ); void _utf8_off( sv ) SV* sv CODE: SvUTF8_off( sv ); Wx-0.9923/XS/Validators.xs000664000000000000 246312306612233 13502 0ustar00Mark000000000000############################################################################# ## Name: XS/Validators.xs ## Purpose: XS for Wx::Validator ## Author: Mattia Barbon ## Modified by: ## Created: 29/10/2000 ## RCS-ID: $Id: Validators.xs 2559 2009-05-17 08:18:03Z mbarbon $ ## Copyright: (c) 2000-2002, 2004, 2006-2007, 2009 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #include #include "cpp/validators.h" MODULE=Wx PACKAGE=Wx::Validator wxWindow* wxValidator::GetWindow() void wxValidator::SetBellOnError( doit = true ) bool doit void wxValidator::SetWindow( window ) wxWindow* window # bool # wxValidator::TransferFromWindow() # bool # wxValidator::TransferToWindow() # bool # wxValidator::Validate( parent ) # wxWindow* parent #!sub TransferFromWindow #!sub TransferToWindow #!sub Validate #!sub Clone MODULE=Wx PACKAGE=Wx::PlValidator wxPlValidator* wxPlValidator::new() CODE: RETVAL = new wxPlValidator( CLASS ); OUTPUT: RETVAL ## // thread OK void wxPlValidator::DESTROY() PREINIT: static char wxPlPlValidatorName[] = "Wx::PlValidator"; CODE: // nothing Wx-0.9923/XS/VarHScrollHelper.xsp000664000000000000 213012306612233 14720 0ustar00Mark000000000000############################################################################# ## Name: XS/VarHScrollHelper.xsp ## Purpose: XS for Wx::VarHScrollHelper ## Author: Mattia Barbon ## Modified by: ## Created: 21/08/2007 ## RCS-ID: $Id: VarHScrollHelper.xsp 2197 2007-08-21 23:10:35Z mbarbon $ ## Copyright: (c) 2007 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}; %typemap{wxVarHScrollHelper*}{simple}; %name{Wx::VarHScrollHelper} class wxVarHScrollHelper { void SetColumnCount( size_t columnCount ); bool ScrollToColumn( size_t column ); bool ScrollColumns( int columns ); bool ScrollColumnPages( int pages ); void RefreshColumn( size_t column ); void RefreshColumns( size_t from, size_t to ); size_t GetColumnCount() const; size_t GetVisibleColumnsBegin() const; size_t GetVisibleColumnsEnd() const; bool IsColumnVisible( size_t column ) const; }; Wx-0.9923/XS/VarHVScrollHelper.xsp000664000000000000 635712306612233 15065 0ustar00Mark000000000000############################################################################# ## Name: XS/VarHVScrollHelper.xsp ## Purpose: XS for Wx::VarHVScrollHelper ## Author: Mattia Barbon ## Modified by: ## Created: 20/08/2007 ## RCS-ID: $Id: VarHVScrollHelper.xsp 2197 2007-08-21 23:10:35Z mbarbon $ ## Copyright: (c) 2007 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}; %typemap{wxVarHVScrollHelper*}{simple}; %name{Wx::VarHVScrollHelper} class wxVarHVScrollHelper { void SetRowColumnCount( size_t rowCount, size_t columnCount ); void EnablePhysicalScrolling( bool vscrolling = true, bool hscrolling = true ); %{ void wxVarHVScrollHelper::ScrollToRowColumn( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n, ScrollToRowColumnRC ) MATCH_REDISP( wxPliOvl_wpos, ScrollToRowColumnPosition ) END_OVERLOAD( Wx::VarHVScrollHelper::ScrollToRowColumn ) %} %name{ScrollToRowColumnRC} bool ScrollToRowColumn( size_t row, size_t column ); %name{ScrollToRowColumnPosition} bool ScrollToRowColumn( const wxPosition &pos ); %{ void wxVarHVScrollHelper::RefreshRowColumn( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n, RefreshRowColumnRC ) MATCH_REDISP( wxPliOvl_wpos, RefreshRowColumnPosition ) END_OVERLOAD( Wx::VarHVScrollHelper::RefreshRowColumn ) %} %name{RefreshRowColumnRC} void RefreshRowColumn( size_t row, size_t column ); %name{RefreshRowColumnPosition} void RefreshRowColumn( const wxPosition &pos ); %{ void wxVarHVScrollHelper::RefreshRowsColumns( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n_n_n, RefreshRowsColumnsRC ) MATCH_REDISP( wxPliOvl_wpos_wpos, RefreshRowsColumnsPosition ) END_OVERLOAD( Wx::VarHVScrollHelper::RefreshRowsColumns ) %} %name{RefreshRowsColumnsRC} void RefreshRowsColumns( size_t fromRow, size_t toRow, size_t fromColumn, size_t toColumn ); %name{RefreshRowsColumnsPosition} void RefreshRowsColumns( const wxPosition& from, const wxPosition& to ); %{ void wxVarHVScrollHelper::VirtualHitTest( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n, VirtualHitTestXY ) MATCH_REDISP( wxPliOvl_wpoi, VirtualHitTestPoint ) END_OVERLOAD( Wx::VarHVScrollHelper::VirtualHitTest ) %} %name{VirtualHitTestXY} wxPosition VirtualHitTest( wxCoord x, wxCoord y ) const; %name{VirtualHitTestPoint} wxPosition VirtualHitTest( const wxPoint &pos ) const; wxSize GetRowColumnCount() const; wxPosition GetVisibleBegin() const; wxPosition GetVisibleEnd() const; %{ void wxVarHVScrollHelper::IsVisible( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_REDISP( wxPliOvl_n_n, IsVisibleRC ) MATCH_REDISP( wxPliOvl_wpos, IsVisiblePosition ) END_OVERLOAD( Wx::VarHVScrollHelper::IsVisible ) %} %name{IsVisibleRC} bool IsVisible( size_t row, size_t column ) const; %name{IsVisiblePosition} bool IsVisible( const wxPosition &pos ) const; }; Wx-0.9923/XS/Variant.xsp000664000000000000 610112306612233 13147 0ustar00Mark000000000000############################################################################# ## Name: XS/Variant.xsp ## Purpose: XS for Wx::variant ## Author: Mattia Barbon ## Modified by: ## Created: 05/11/2007 ## RCS-ID: $Id: Variant.xsp 2558 2009-05-17 08:15:59Z mbarbon $ ## Copyright: (c) 2007, 2009 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 %typemap{const wxDateTime&}{reference}; %typemap{const wxClassInfo*}{simple}; %name{Wx::Variant} class wxVariant { wxVariant( SV* sv ) %code%{ RETVAL = new wxVariant( wxPli_sv_2_wxvariant( aTHX_ sv ) ); %}; %{ static void wxVariant::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); ## // thread OK void wxVariant::DESTROY() CODE: wxPli_thread_sv_unregister( aTHX_ "Wx::Variant", THIS, ST(0) ); if( wxPli_object_is_deleteable( aTHX_ ST(0) ) ) delete THIS; %} void Append( const wxVariant& variant ); #if WXPERL_W_VERSION_GE( 2, 7, 0 ) void Clear(); #endif void ClearList(); bool Delete( size_t item ); size_t GetCount() const; bool GetBool() const; wxChar GetChar() const; const wxDateTime& GetDateTime() const; wxString GetString() const; wxString GetType() const; long GetLong() const; double GetDouble() const; wxObject* GetWxObjectPtr() const; %{ void wxVariant::GetArrayString() PPCODE: PUTBACK; wxPli_stringarray_push( aTHX_ THIS->GetArrayString() ); SPAGAIN; void wxVariant::GetList() PPCODE: #if WXPERL_W_VERSION_GE( 2, 9, 0 ) const wxVariantList& lst = THIS->GetList(); #else const wxList& lst = THIS->GetList(); #endif PUTBACK; wxPli_objlist_push( aTHX_ lst ); SPAGAIN; for( int i = lst.GetCount() - 0; i >= 0; --i ) wxPli_object_set_deleteable( aTHX_ SP[-i], false ); %} bool IsNull() const; bool IsType( const wxString& type ) const; bool IsValueKindOf( const wxClassInfo* type ) const; void MakeNull(); wxString MakeString() const; bool Member( const wxVariant& value ) const; void NullList(); void Insert( const wxVariant& value ); ## FIXME document ## FIXME array string and list ## operator == != [] void SetBool( bool value ) %code{% *THIS = value; %}; #if WXPERL_W_VERSION_GE( 2, 7, 0 ) void SetChar( wxChar value ) %code{% *THIS = value; %}; #endif void SetDateTime( const wxDateTime& value ) %code{% *THIS = *value; %}; void SetString( const wxString& string ) %code{% *THIS = string; %}; void SetLong( long value ) %code{% *THIS = value; %}; void SetDouble( double value ) %code{% *THIS = value; %}; void SetWxObjectPtr( wxObject* value ) %code{% *THIS = value; %}; void SetVariant( const wxVariant& value ) %code{% *THIS = *value; %}; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool Unshare(); #endif }; Wx-0.9923/XS/VarScrollHelperBase.xsp000664000000000000 223612306612233 15412 0ustar00Mark000000000000############################################################################# ## Name: XS/VarScrollHelperBase.xsp ## Purpose: XS for Wx::VarScrollHelperBase ## Author: Mattia Barbon ## Modified by: ## Created: 20/08/2007 ## RCS-ID: $Id: VarScrollHelperBase.xsp 2192 2007-08-21 21:27:40Z mbarbon $ ## Copyright: (c) 2007 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}; %typemap{wxVarScrollHelperBase*}{simple}; %name{Wx::VarScrollHelperBase} class wxVarScrollHelperBase { void EnablePhysicalScrolling( bool scrolling = true ); int VirtualHitTest( wxCoord coord ) const; void RefreshAll(); size_t GetVisibleBegin() const; size_t GetVisibleEnd() const; bool IsVisible( size_t unit ) const; int CalcScrolledPosition( int coord ) const; int CalcUnscrolledPosition( int coord ) const; void UpdateScrollbar(); void RemoveScrollbar(); void SetTargetWindow( wxWindow *target ); wxWindow* GetTargetWindow() const; }; Wx-0.9923/XS/VarVScrollHelper.xsp000664000000000000 205412306612233 14743 0ustar00Mark000000000000############################################################################# ## Name: XS/VarVScrollHelper.xsp ## Purpose: XS for Wx::VarVScrollHelper ## Author: Mattia Barbon ## Modified by: ## Created: 20/08/2007 ## RCS-ID: $Id: VarVScrollHelper.xsp 2197 2007-08-21 23:10:35Z mbarbon $ ## Copyright: (c) 2007 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}; %typemap{wxVarVScrollHelper*}{simple}; %name{Wx::VarVScrollHelper} class wxVarVScrollHelper { void SetRowCount( size_t count ); bool ScrollToRow( size_t line ); void RefreshRow( size_t line ); void RefreshRows( size_t from, size_t to ); size_t GetRowCount() const; size_t GetVisibleRowsBegin() const; size_t GetVisibleRowsEnd() const; bool ScrollRows( int lines ); bool ScrollRowPages( int pages ); bool IsRowVisible( size_t line ) const; }; Wx-0.9923/XS/VListBox.xsp000664000000000000 2057012306612233 13303 0ustar00Mark000000000000############################################################################# ## Name: XS/VListBox.xsp ## Purpose: XS++ for Wx::VListBox ## Author: Mattia Barbon ## Modified by: ## Created: 18/09/2006 ## RCS-ID: $Id: VListBox.xsp 3042 2011-03-20 06:00:15Z mdootson $ ## Copyright: (c) 2006-2007, 2010-2011 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}; %typemap{wxVListBox*}{simple}; %typemap{wxPlVListBox*}{simple}; #if WXPERL_W_VERSION_GE( 2, 5, 0 ) #include %name{Wx::VListBox} class wxVListBox { bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxVListBoxNameStr ); size_t GetItemCount() const; bool HasMultipleSelection() const; bool IsCurrent(size_t item) const; bool IsSelected(size_t item) const; size_t GetSelectedCount() const; wxPoint GetMargins() const; const wxColour& GetSelectionBackground() const; void SetItemCount( size_t count ); void Clear(); int GetSelection() const; void SetSelection( int selection ); bool Select( size_t item, bool select = true ); bool SelectRange( size_t from, size_t to ); void Toggle( size_t item ); bool SelectAll(); bool DeselectAll(); void SetMargins( wxCoord x, wxCoord y ); void SetSelectionBackground( const wxColour& col ); }; %{ #!sub wxVListBox #!sub OnDrawItem #!sub OnMeasureItem #!sub OnDrawBackground #!sub OnDrawSeparator void wxVListBox::GetFirstSelected() PPCODE: unsigned long cookie; int ret = THIS->GetFirstSelected( cookie ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( ret ) ) ); PUSHs( sv_2mortal( newSViv( cookie ) ) ); void wxVListBox::GetNextSelected( unsigned long cookie ) PPCODE: int ret = THIS->GetNextSelected( cookie ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( ret ) ) ); PUSHs( sv_2mortal( newSViv( cookie ) ) ); %} %file{xspp/vlbox.h}; %{ #include "cpp/v_cback.h" // void METH(wxDC&, const wxRect&, size_t) #define DEC_V_CBACK_VOID__WXDC_WXRECT_SIZET_const( METHOD ) \ void METHOD( wxDC& p1, const wxRect& p2, size_t p3 ) const #define DEF_V_CBACK_VOID__WXDC_WXRECT_SIZET_const_pure( CLASS, BASE, METHOD )\ void CLASS::METHOD( wxDC& p1, const wxRect& p2, size_t p3 ) const \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, \ G_SCALAR|G_DISCARD, \ "QoL", &p1, \ new wxRect( p2 ), "Wx::Rect", \ p3 ) ); \ return; \ } else \ return; \ } #define DEF_V_CBACK_VOID__WXDC_WXRECT_SIZET_const( CLASS, BASE, METHOD )\ void CLASS::METHOD( wxDC& p1, const wxRect& p2, size_t p3 ) const \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, \ G_SCALAR|G_DISCARD, \ "QoL", &p1, \ new wxRect( p2 ), "Wx::Rect", \ p3 ) ); \ return; \ } else \ BASE::METHOD( p1, p2, p3); \ } // void METH(wxDC&, wxRect&, size_t) #define DEC_V_CBACK_VOID__WXDC_WXRECTREF_SIZET_const( METHOD ) \ void METHOD( wxDC& p1, wxRect& p2, size_t p3 ) const #define DEF_V_CBACK_VOID__WXDC_WXRECTREF_SIZET_const( CLASS, BASE, METHOD )\ void CLASS::METHOD( wxDC& p1, wxRect& p2, size_t p3 ) const \ { \ dTHX; \ if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \ { \ wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, \ G_SCALAR|G_DISCARD, \ "QqL", &p1, \ &p2, "Wx::Rect", \ p3 ) ); \ return; \ } else \ BASE::METHOD( p1, p2, p3); \ } class wxPlVListBox : public wxVListBox { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlVListBox ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPlVListBox, "Wx::VListBox", true ); WXPLI_CONSTRUCTOR_6( wxPlVListBox, "Wx::VListBox", true, wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long, const wxString& ); DEC_V_CBACK_WXCOORD__VOID_const( EstimateTotalHeight ); DEC_V_CBACK_WXCOORD__SIZET_const( OnMeasureItem ); DEC_V_CBACK_VOID__WXDC_WXRECT_SIZET_const( OnDrawItem ); DEC_V_CBACK_VOID__WXDC_WXRECTREF_SIZET_const( OnDrawSeparator ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) DEC_V_CBACK_VOID__WXDC_WXRECT_SIZET_const( OnDrawBackground ); #endif }; DEF_V_CBACK_WXCOORD__VOID_const( wxPlVListBox, wxVListBox, EstimateTotalHeight ); DEF_V_CBACK_WXCOORD__SIZET_const_pure( wxPlVListBox, wxVListBox, OnMeasureItem ); DEF_V_CBACK_VOID__WXDC_WXRECT_SIZET_const_pure( wxPlVListBox, wxVListBox, OnDrawItem ); DEF_V_CBACK_VOID__WXDC_WXRECTREF_SIZET_const( wxPlVListBox, wxVListBox, OnDrawSeparator ); #if WXPERL_W_VERSION_GE( 2, 5, 1 ) DEF_V_CBACK_VOID__WXDC_WXRECT_SIZET_const( wxPlVListBox, wxVListBox, OnDrawBackground ); #endif WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlVListBox, wxVListBox ); %} %file{-}; #include "cpp/overload.h" #include "xspp/vlbox.h" %name{Wx::PlVListBox} class wxPlVListBox { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::PlVListBox::new" ) %} %name{newDefault} wxPlVListBox() %code{% RETVAL = new wxPlVListBox( CLASS ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxPlVListBox( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxVListBoxNameStr ) %code{% RETVAL = new wxPlVListBox( CLASS, parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; }; #endif Wx-0.9923/XS/VScrolledWindow.xsp000664000000000000 3143012306612233 14653 0ustar00Mark000000000000############################################################################# ## Name: XS/VScrolledWindow.xsp ## Purpose: XS++ for Wx::[HV]ScrolledWindow ## Author: Mattia Barbon ## Modified by: ## Created: 18/09/2006 ## RCS-ID: $Id: VScrolledWindow.xsp 3039 2011-03-19 14:40:15Z mdootson $ ## Copyright: (c) 2006-2007, 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}; %typemap{wxVScrolledWindow*}{simple}; %typemap{wxHScrolledWindow*}{simple}; %typemap{wxHVScrolledWindow*}{simple}; %typemap{wxPlVScrolledWindow*}{simple}; %typemap{wxPlHScrolledWindow*}{simple}; %typemap{wxPlHVScrolledWindow*}{simple}; #if WXPERL_W_VERSION_GE( 2, 5, 0 ) #include #if WXPERL_W_VERSION_GE( 2, 9, 0 ) %name{Wx::HScrolledWindow} class wxHScrolledWindow { bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr ); ## wxVarScrollHelperBase INCLUDE_COMMAND: $^X -pe "s/VarScrollHelperBase/HScrolledWindow/g" XS/VarScrollHelperBase.xs ## wxVarHScrollHelper INCLUDE_COMMAND: $^X -pe "s/VarHScrollHelper/HScrolledWindow/g" XS/VarHScrollHelper.xs }; #endif %name{Wx::VScrolledWindow} class wxVScrolledWindow { bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) ## compatibility with < 2.9 %name{SetLineCount} void SetRowCount( size_t count ); %name{ScrollToLine} bool ScrollToRow( size_t line ); %name{RefreshLine} void RefreshRow( size_t line ); %name{RefreshLines} void RefreshRows( size_t from, size_t to ); %name{GetLineCount} size_t GetRowCount() const; %name{GetFirstVisibleLine} size_t GetVisibleRowsBegin() const; %name{GetLastVisibleLine} size_t GetVisibleRowsEnd() const; %name{ScrollLines} bool ScrollRows( int lines ); %name{ScrollPages} bool ScrollRowPages( int pages ); ## wxVarScrollHelperBase INCLUDE_COMMAND: $^X -pe "s/VarScrollHelperBase/VScrolledWindow/g" XS/VarScrollHelperBase.xs ## wxVarVScrollHelper INCLUDE_COMMAND: $^X -pe "s/VarVScrollHelper/VScrolledWindow/g" XS/VarVScrollHelper.xs #else ## old interface void SetLineCount( size_t count ); bool ScrollToLine( size_t line ); void RefreshLine( size_t line ); void RefreshLines( size_t from, size_t to ); size_t GetLineCount() const; size_t GetFirstVisibleLine() const; size_t GetLastVisibleLine() const; bool ScrollLines( int lines ); bool ScrollPages( int pages ); ## forward compatibilty with 2.9 %name{SetRowCount} void SetLineCount( size_t count ); %name{ScrollToRow} bool ScrollToLine( size_t line ); %name{RefreshRow} void RefreshLine( size_t line ); %name{RefreshRows} void RefreshLines( size_t from, size_t to ); %name{GetRowCount} size_t GetLineCount() const; %name{GetVisibleRowsBegin} size_t GetFirstVisibleLine() const; %name{GetVisibleRowsEnd} size_t GetLastVisibleLine() const; %name{ScrollRows} bool ScrollLines( int lines ); %name{ScrollRowPages} bool ScrollPages( int pages ); ## already in wxVarScrollHelperBase void RefreshAll(); #if WXPERL_W_VERSION_GE( 2, 6, 0 ) size_t GetVisibleBegin() const; size_t GetVisibleEnd() const; #endif bool IsVisible( size_t line ) const; %name{IsRowVisible} bool IsVisible( size_t line ) const; #endif int HitTest( const wxPoint& pt ) const; bool Layout(); }; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) %name{Wx::HVScrolledWindow} class wxHVScrolledWindow { bool Create( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr ); ## poor man's MI support; should use dynamic_cast<> in typemap ## wxVarHScrollHelper INCLUDE_COMMAND: $^X -pe "s/VarHScrollHelper/HVScrolledWindow/g" XS/VarHScrollHelper.xs ## wxVarVScrollHelper INCLUDE_COMMAND: $^X -pe "s/VarVScrollHelper/HVScrolledWindow/g" XS/VarVScrollHelper.xs ## wxVarHVScrollHelper INCLUDE_COMMAND: $^X -pe "s/VarHVScrollHelper/HVScrolledWindow/g" XS/VarHVScrollHelper.xs }; #endif %file{xspp/vscrl.h}; %{ #if WXPERL_W_VERSION_GE( 2, 9, 0 ) class wxPlHScrolledWindow : public wxHScrolledWindow { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlHScrolledWindow ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPlHScrolledWindow, "Wx::HScrolledWindow", true ); WXPLI_CONSTRUCTOR_6( wxPlHScrolledWindow, "Wx::HScrolledWindow", true, wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long, const wxString& ); // wxVarHScrollHelper DEC_V_CBACK_WXCOORD__SIZET_const( OnGetColumnWidth ); DEC_V_CBACK_VOID__SIZET_SIZET_const( OnGetColumnsWidthHint ); DEC_V_CBACK_WXCOORD__VOID_const( EstimateTotalWidth ); }; // wxVarHScrollHelper DEF_V_CBACK_WXCOORD__SIZET_const_pure( wxPlHScrolledWindow, wxHScrolledWindow, OnGetColumnWidth ); DEF_V_CBACK_VOID__SIZET_SIZET_const( wxPlHScrolledWindow, wxHScrolledWindow, OnGetColumnsWidthHint ); DEF_V_CBACK_WXCOORD__VOID_const( wxPlHScrolledWindow, wxHScrolledWindow, EstimateTotalWidth ); WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlHScrolledWindow, wxHScrolledWindow ); #endif class wxPlVScrolledWindow : public wxVScrolledWindow { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlVScrolledWindow ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPlVScrolledWindow, "Wx::VScrolledWindow", true ); WXPLI_CONSTRUCTOR_6( wxPlVScrolledWindow, "Wx::VScrolledWindow", true, wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long, const wxString& ); // < 2.9 #if WXPERL_W_VERSION_LT( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 DEC_V_CBACK_WXCOORD__SIZET_const( OnGetLineHeight ); DEC_V_CBACK_VOID__SIZET_SIZET_const( OnGetLinesHint ); #endif // wxVarVScrollHelper #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEC_V_CBACK_WXCOORD__SIZET_const( OnGetRowHeight ); DEC_V_CBACK_VOID__SIZET_SIZET_const( OnGetRowsHeightHint ); #endif DEC_V_CBACK_WXCOORD__VOID_const( EstimateTotalHeight ); }; // < 2.9 #if WXPERL_W_VERSION_LT( 2, 9, 0 ) || WXWIN_COMPATIBILITY_2_8 DEF_V_CBACK_WXCOORD__SIZET_const_pure( wxPlVScrolledWindow, wxVScrolledWindow, OnGetLineHeight ); DEF_V_CBACK_VOID__SIZET_SIZET_const( wxPlVScrolledWindow, wxVScrolledWindow, OnGetLinesHint ); #endif // wxVarVScrollHelper #if WXPERL_W_VERSION_GE( 2, 9, 0 ) DEF_V_CBACK_WXCOORD__SIZET_const_pure( wxPlVScrolledWindow, wxVScrolledWindow, OnGetRowHeight ); DEF_V_CBACK_VOID__SIZET_SIZET_const( wxPlVScrolledWindow, wxVScrolledWindow, OnGetRowsHeightHint ); #endif DEF_V_CBACK_WXCOORD__VOID_const( wxPlVScrolledWindow, wxVScrolledWindow, EstimateTotalHeight ); WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlVScrolledWindow, wxVScrolledWindow ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) class wxPlHVScrolledWindow : public wxHVScrolledWindow { WXPLI_DECLARE_DYNAMIC_CLASS( wxPlHVScrolledWindow ); WXPLI_DECLARE_V_CBACK(); public: WXPLI_DEFAULT_CONSTRUCTOR( wxPlHVScrolledWindow, "Wx::HVScrolledWindow", true ); WXPLI_CONSTRUCTOR_6( wxPlHVScrolledWindow, "Wx::HVScrolledWindow", true, wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long, const wxString& ); // wxVarHScrollHelper DEC_V_CBACK_WXCOORD__SIZET_const( OnGetColumnWidth ); DEC_V_CBACK_VOID__SIZET_SIZET_const( OnGetColumnsWidthHint ); DEC_V_CBACK_WXCOORD__VOID_const( EstimateTotalWidth ); // wxVarVScrollHelper DEC_V_CBACK_WXCOORD__SIZET_const( OnGetRowHeight ); DEC_V_CBACK_VOID__SIZET_SIZET_const( OnGetRowsHeightHint ); DEC_V_CBACK_WXCOORD__VOID_const( EstimateTotalHeight ); }; // wxVarHScrollHelper DEF_V_CBACK_WXCOORD__SIZET_const_pure( wxPlHVScrolledWindow, wxHVScrolledWindow, OnGetColumnWidth ); DEF_V_CBACK_VOID__SIZET_SIZET_const( wxPlHVScrolledWindow, wxHVScrolledWindow, OnGetColumnsWidthHint ); DEF_V_CBACK_WXCOORD__VOID_const( wxPlHVScrolledWindow, wxHVScrolledWindow, EstimateTotalWidth ); // wxVarVScrollHelper DEF_V_CBACK_WXCOORD__SIZET_const_pure( wxPlHVScrolledWindow, wxHVScrolledWindow, OnGetRowHeight ); DEF_V_CBACK_VOID__SIZET_SIZET_const( wxPlHVScrolledWindow, wxHVScrolledWindow, OnGetRowsHeightHint ); DEF_V_CBACK_WXCOORD__VOID_const( wxPlHVScrolledWindow, wxHVScrolledWindow, EstimateTotalHeight ); WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlHVScrolledWindow, wxHVScrolledWindow ); #endif %} %file{-}; #include "cpp/overload.h" #include "xspp/vscrl.h" #if WXPERL_W_VERSION_GE( 2, 9, 0 ) %name{Wx::PlHScrolledWindow} class wxPlHScrolledWindow { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::PlHScrolledWindow::new" ) %} %name{newDefault} wxPlHScrolledWindow() %code{% RETVAL = new wxPlHScrolledWindow( CLASS ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxPlHScrolledWindow( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr ) %code{% RETVAL = new wxPlHScrolledWindow( CLASS, parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; }; #endif %name{Wx::PlVScrolledWindow} class wxPlVScrolledWindow { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::PlVScrolledWindow::new" ) %} %name{newDefault} wxPlVScrolledWindow() %code{% RETVAL = new wxPlVScrolledWindow( CLASS ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxPlVScrolledWindow( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr ) %code{% RETVAL = new wxPlVScrolledWindow( CLASS, parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; }; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) %name{Wx::PlHVScrolledWindow} class wxPlHVScrolledWindow { %{ void new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newDefault ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( "Wx::PlHVScrolledWindow::new" ) %} %name{newDefault} wxPlHVScrolledWindow() %code{% RETVAL = new wxPlHVScrolledWindow( CLASS ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; %name{newFull} wxPlHVScrolledWindow( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr ) %code{% RETVAL = new wxPlHVScrolledWindow( CLASS, parent, id, pos, size, style, name ); wxPli_create_evthandler( aTHX_ RETVAL, CLASS ); %}; }; #endif #endif Wx-0.9923/XS/Wave.xs000664000000000000 140612306612233 12270 0ustar00Mark000000000000############################################################################# ## Name: XS/Wave.xs ## Purpose: XS for Wx::Wave ## Author: Mattia Barbon ## Modified by: ## Created: 01/01/2003 ## RCS-ID: $Id: Wave.xs 2057 2007-06-18 23:03:00Z mbarbon $ ## Copyright: (c) 2003-2004 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# #if wxPERL_USE_WAVE #include MODULE=Wx PACKAGE=Wx::Wave wxWave* wxWave::new( fileName ) wxString fileName bool wxWave::IsOk() bool wxWave::Play( async = true, looped = false ) bool async bool looped #endif Wx-0.9923/XS/Window.xsp000664000000000000 1101212306612233 13027 0ustar00Mark000000000000############################################################################# ## Name: XS/Window.xsp ## Purpose: XS++ for Wx::PlWindow ## Author: Mattia Barbon ## Modified by: ## Created: 23/05/2004 ## RCS-ID: $Id: Window.xsp 3379 2012-09-26 22:35:22Z mdootson $ ## Copyright: (c) 2000-2002, 2004-2007, 2009-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}; %loadplugin{build::Wx::XSP::Overload}; %typemap{wxWindowVariant}{simple}; %typemap{wxMenu&}{reference}; %typemap{wxWindowBase*}{parsed}{%wxWindow*%}; %name{Wx::Window} class wxWindow { #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void AlwaysShowScrollbars( bool horz = true, bool vert = true ); #endif bool AcceptsFocus() const; bool AcceptsFocusFromKeyboard() const; bool DestroyChildren(); bool IsBeingDeleted(); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) %name{GetPopupMenuSelectionFromUserPoint} int GetPopupMenuSelectionFromUser( wxMenu& menu, wxPoint point ) %Overload; %name{GetPopupMenuSelectionFromUserXY} int GetPopupMenuSelectionFromUser( wxMenu& menu, int x, int y ) %Overload; #endif #if WXPERL_W_VERSION_LT( 2, 7, 0 ) wxSize GetAdjustedBestSize() const; #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxSize GetEffectiveMinSize() const; #endif const wxCursor& GetCursor() const; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) wxWindow* GetPrevSibling() const; wxWindow* GetNextSibling() const; #endif wxSize GetVirtualSize() const; %{ void wxWindow::GetVirtualSizeWH() PPCODE: int x, y; THIS->GetVirtualSize( &x, &y ); wxPli_push_2ints( x, y ); %} #if WXPERL_W_VERSION_GE( 2, 7, 2 ) wxPoint* GetScreenPosition() const %code{% RETVAL = new wxPoint( THIS->GetScreenPosition() ); %}; %{ void wxWindow::GetScreenPositionXY() PPCODE: int x, y; THIS->GetPosition( &x, &y ); EXTEND( SP, 2 ); PUSHs( sv_2mortal( newSViv( (IV) x ) ) ); PUSHs( sv_2mortal( newSViv( (IV) y ) ) ); %} const wxRect& GetScreenRect() const; #endif bool HasFlag( int flag ) const; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool HasExtraStyle( int exFlag ) const; #endif bool HasCapture() const; #if WXPERL_W_VERSION_GE( 2, 6, 0 ) bool HasTransparentBackground(); #endif bool HasScrollbar( int orient ) const; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) bool IsScrollbarAlwaysShown( int orient ); #endif bool LineUp(); bool LineDown(); bool PageUp(); bool PageDown(); void SetBackgroundColour( const wxColour& colour ); void SetOwnBackgroundColour( const wxColour& colour ); ## protected void SetInitialBestSize( wxSize size = wxDefaultSize ); #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void SetCanFocus( bool canFocus ); #endif void SetForegroundColour( const wxColour& colour ); void SetOwnForegroundColour( const wxColour& colour ); void SetFont( const wxFont& font ); void SetCursor( const wxCursor& cursor ); void SetOwnFont( const wxFont& font ); wxWindowVariant GetWindowVariant() const; void SetWindowVariant( wxWindowVariant variant ); #if WXPERL_W_VERSION_GE( 2, 8, 0 ) bool ToggleWindowStyle( int flag ); #endif #if WXPERL_W_VERSION_GE( 2, 9, 4 ) bool AcceptsFocusRecursively() const; bool HasFocus() const; void SetFocusFromKbd(); bool IsDescendant( wxWindowBase *win) const; #endif }; #if WXPERL_W_VERSION_GE( 2, 9, 0 ) %typemap{wxEventBlocker*}{simple}; %name{Wx::EventBlocker} class wxEventBlocker { wxEventBlocker( wxWindow* win, wxEventType type = wxEVT_ANY ); %{ static void wxEventBlocker::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxEventBlocker() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::EventBlocker", THIS, ST(0) ); delete THIS; %}; void Block( wxEventType eventType ); }; #endif #if WXPERL_W_VERSION_GE( 2, 7, 2 ) #include %typemap{wxWindowUpdateLocker*}{simple}; %name{Wx::WindowUpdateLocker} class wxWindowUpdateLocker { wxWindowUpdateLocker( wxWindow* win ); %{ static void wxWindowUpdateLocker::CLONE() CODE: wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); %} ## // thread OK ~wxWindowUpdateLocker() %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::WindowUpdateLocker", THIS, ST(0) ); delete THIS; %}; }; #endif Wx-0.9923/XS/Wizard.xs000664000000000000 1053612306612233 12652 0ustar00Mark000000000000############################################################################# ## Name: XS/Wizard.xs ## Purpose: XS for Wx::Wizard and related classes ## Author: Mattia Barbon ## Modified by: ## Created: 28/08/2002 ## RCS-ID: $Id: Wizard.xs 2315 2008-01-18 21:47:17Z mbarbon $ ## Copyright: (c) 2002-2004, 2006-2008 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# ## bug in 2.2 #include #include #include #include #include #include #include "cpp/overload.h" #include "cpp/wizard.h" MODULE=Wx PACKAGE=Wx::Wizard void wxWizard::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newEmpty ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( Wx::Wizard::new ) wxWizard* newEmpty( CLASS ) PlClassName CLASS CODE: RETVAL = new wxPliWizard( CLASS ); OUTPUT: RETVAL wxWizard* newFull( CLASS, parent, id = wxID_ANY, title = wxEmptyString, bitmap = (wxBitmap*)&wxNullBitmap, pos = wxDefaultPosition ) PlClassName CLASS wxWindow* parent wxWindowID id wxString title wxBitmap* bitmap wxPoint pos CODE: RETVAL = new wxPliWizard( CLASS, parent, id, title, *bitmap, pos ); OUTPUT: RETVAL bool wxWizard::Create( parent, id = wxID_ANY, title = wxEmptyString, bitmap = (wxBitmap*)&wxNullBitmap, pos = wxDefaultPosition ) wxWindow* parent wxWindowID id wxString title wxBitmap* bitmap wxPoint pos C_ARGS: parent, id, title, *bitmap, pos bool wxWizard::RunWizard( page ) wxWizardPage* page wxWizardPage* wxWizard::GetCurrentPage() wxSize* wxWizard::GetPageSize() CODE: RETVAL = new wxSize( THIS->GetPageSize() ); OUTPUT: RETVAL void wxWizard::SetPageSize( size ) wxSize size #if WXPERL_W_VERSION_GE( 2, 5, 1 ) wxSizer* wxWizard::GetPageAreaSizer() #endif #if WXPERL_W_VERSION_GE( 2, 8, 5 ) wxBitmap* wxWizard::GetBitmap() CODE: RETVAL = new wxBitmap( THIS->GetBitmap() ); OUTPUT: RETVAL void wxWizard::SetBitmap( bitmap ) wxBitmap* bitmap C_ARGS: *bitmap #endif void wxWizard::FitToPage( firstPage ) wxWizardPage* firstPage void wxWizard::SetBorder( border ) int border bool wxWizard::HasNextPage( page ) wxWizardPage* page bool wxWizard::HasPrevPage( page ) wxWizardPage* page #if WXPERL_W_VERSION_GE( 2, 9, 0 ) void wxWizard::SetBitmapBackgroundColour( colour ) wxColour colour wxColour* wxWizard::GetBitmapBackgroundColour() CODE: RETVAL = new wxColour( THIS->GetBitmapBackgroundColour() ); OUTPUT: RETVAL void wxWizard::SetBitmapPlacement( placement ) int placement int wxWizard::GetBitmapPlacement() void wxWizard::SetMinimumBitmapWidth( w ) int w int wxWizard::GetMinimumBitmapWidth() #endif MODULE=Wx PACKAGE=Wx::WizardPage void wxWizardPage::new( ... ) PPCODE: BEGIN_OVERLOAD() MATCH_VOIDM_REDISP( newEmpty ) MATCH_ANY_REDISP( newFull ) END_OVERLOAD( Wx::WizardPage::new ) wxWizardPage* newEmpty( CLASS ) PlClassName CLASS CODE: RETVAL = new wxPliWizardPage( CLASS ); OUTPUT: RETVAL wxWizardPage* newFull( CLASS, parent, bitmap = (wxBitmap*)&wxNullBitmap ) PlClassName CLASS wxWizard* parent wxBitmap* bitmap CODE: RETVAL = new wxPliWizardPage( CLASS, parent, *bitmap ); OUTPUT: RETVAL bool wxWizardPage::Create( parent, bitmap = (wxBitmap*)&wxNullBitmap ) wxWizard* parent wxBitmap* bitmap C_ARGS: parent, *bitmap wxBitmap* wxWizardPage::GetBitmap() CODE: RETVAL = new wxBitmap( THIS->GetBitmap() ); OUTPUT: RETVAL wxWizardPage* wxWizardPageSimple::GetPrev() wxWizardPage* wxWizardPageSimple::GetNext() MODULE=Wx PACKAGE=Wx::WizardPageSimple wxWizardPageSimple* wxWizardPageSimple::new( parent, prev = 0, next = 0 ) wxWizard* parent wxWizardPage* prev wxWizardPage* next void wxWizardPageSimple::SetPrev( prev ) wxWizardPage* prev void wxWizardPageSimple::SetNext( next ) wxWizardPage* next void Chain( first, second ) wxWizardPageSimple* first wxWizardPageSimple* second CODE: wxWizardPageSimple::Chain( first, second ); MODULE=Wx PACKAGE=Wx::WizardEvent bool wxWizardEvent::GetDirection() wxWizardPage* wxWizardEvent::GetPage()