1 #############################################################################
2 ## Name: ext/grid/lib/Wx/Grid.pm
3 ## Purpose: Wx::Grid (pulls in all Wx::Grid* stuff)
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: Grid.pm 2170 2007-08-17 22:53:11Z mbarbon $
8 ## Copyright: (c) 2001-2002, 2004-2007 Mattia Barbon
9 ## Licence: This program is free software; you can redistribute it and/or
10 ## modify it under the same terms as Perl itself
11 #############################################################################
18 use vars qw($VERSION);
22 Wx::load_dll( 'adv' );
23 Wx::wx_boot( 'Wx::Grid', $VERSION );
28 # properly setup inheritance tree
33 package Wx::Grid; @ISA = qw(Wx::ScrolledWindow);
34 package Wx::GridWindow; @ISA = qw(Wx::Grid);
35 package Wx::GridEvent; @ISA = qw(Wx::NotifyEvent);
36 package Wx::GridSizeEvent; @ISA = qw(Wx::NotifyEvent);
37 package Wx::GridRangeSelectEvent; @ISA = qw(Wx::NotifyEvent);
38 package Wx::GridEditorCreatedEvent; @ISA = qw(Wx::CommandEvent);
40 package Wx::GridCellRenderer;
41 package Wx::GridCellStringRenderer; @ISA = qw(Wx::GridCellRenderer);
42 package Wx::GridCellNumberRenderer; @ISA = qw(Wx::GridCellRenderer);
43 package Wx::GridCellFloatRenderer; @ISA = qw(Wx::GridCellRenderer);
44 package Wx::GridCellBoolRenderer; @ISA = qw(Wx::GridCellRenderer);
45 package Wx::GridCellAutoWrapStringRenderer; @ISA = qw(Wx::GridCellStringRenderer);
46 package Wx::GridCellEnumRenderer; @ISA = qw(Wx::GridCellStringRenderer);
47 package Wx::GridCellDateTimeRenderer; @ISA = qw(Wx::GridCellStringRenderer);
48 package Wx::PlGridCellRenderer; @ISA = qw(Wx::GridCellRenderer);
50 package Wx::GridCellEditor;
51 package Wx::GridCellEditorEvtHandler; @ISA = qw(Wx::EvtHandler);
52 package Wx::GridCellBoolEditor; @ISA = qw(Wx::GridCellEditor);
53 package Wx::GridCellTextEditor; @ISA = qw(Wx::GridCellEditor);
54 package Wx::GridCellFloatEditor; @ISA = qw(Wx::GridCellEditor);
55 package Wx::GridCellNumberEditor; @ISA = qw(Wx::GridCellEditor);
56 package Wx::GridCellChoiceEditor; @ISA = qw(Wx::GridCellEditor);
57 package Wx::GridCellAutoWrapStringEditor; @ISA = qw(Wx::GridCellTextEditor);
58 package Wx::GridCellEnumEditor; @ISA = qw(Wx::GridCellChoiceEditor);
59 package Wx::PlGridCellEditor; @ISA = qw(Wx::GridCellEditor);
61 package Wx::GridTableBase;
62 package Wx::PlGridTable; @ISA = qw(Wx::GridTableBase);
68 # this is for make_ovl_list to find constants
72 Wx::_match( @_, $Wx::_wgco, 1 ) && return $this->CellToRectCo( @_ );
73 Wx::_match( @_, $Wx::_n_n, 2 ) && return $this->CellToRectXY( @_ );
74 Wx::_croak Wx::_ovl_error;
81 die $name unless defined &{$name . 'XY'} && defined &{$name . 'Co'};
88 Wx::_match( \@_, \$Wx::_wgco, 1 ) && return \$this->${name}Co( \@_ );
89 Wx::_match( \@_, \$Wx::_n_n, 2 ) && return \$this->${name}XY( \@_ );
90 Wx::_croak Wx::_ovl_error;
101 #!sub MakeCellVisible
102 #!sub GetDefaultEditorForCell
104 foreach my $i ( qw(GetCellValue IsInSelection IsVisible MakeCellVisible
105 GetDefaultEditorForCell) )
106 { _create_ovls( $i ); }
111 Wx::_match( @_, $Wx::_wgco_wgco_b, 3 ) && return $this->SelectBlockPP( @_ );
112 Wx::_match( @_, $Wx::_n_n_n_n_b, 5 ) && return $this->SelectBlockXYWH( @_ );
113 Wx::_croak Wx::_ovl_error;
119 Wx::_match( @_, $Wx::_wgco_s, 2 ) && return $this->SetCellValueCo( @_ );
120 Wx::_match( @_, $Wx::_n_n_s, 3 ) && return $this->SetCellValueXY( @_ );
121 Wx::_croak Wx::_ovl_error;