Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / grid / cpp / gr_constants.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        ext/grid/cpp/gr_constants.cpp
3 // Purpose:     constants for Wx::Grid
4 // Author:      Mattia Barbon
5 // Modified by:
6 // Created:     04/12/2001
7 // RCS-ID:      $Id: gr_constants.cpp 2170 2007-08-17 22:53:11Z mbarbon $
8 // Copyright:   (c) 2001-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 /////////////////////////////////////////////////////////////////////////////
12
13 #include "cpp/constants.h"
14
15 double grid_constant( const char* name, int arg )
16 {
17     // !package: Wx
18     // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> }
19     // !tag: grid
20 #define r( n ) \
21     if( strEQ( name, #n ) ) \
22         return n;
23
24     WX_PL_CONSTANT_INIT();
25
26     switch( fl )
27     {
28     case 'G':
29         r( wxGRIDTABLE_REQUEST_VIEW_GET_VALUES );
30         r( wxGRIDTABLE_REQUEST_VIEW_SEND_VALUES );
31         r( wxGRIDTABLE_NOTIFY_ROWS_INSERTED );
32         r( wxGRIDTABLE_NOTIFY_ROWS_APPENDED );
33         r( wxGRIDTABLE_NOTIFY_ROWS_DELETED );
34         r( wxGRIDTABLE_NOTIFY_COLS_INSERTED );
35         r( wxGRIDTABLE_NOTIFY_COLS_APPENDED );
36         r( wxGRIDTABLE_NOTIFY_COLS_DELETED );
37
38         // !export: wxGridSelectCells wxGridSelectRows wxGridSelectColumns
39         if( strEQ( name, "wxGridSelectCells" ) )
40             return wxGrid::wxGridSelectCells;
41         if( strEQ( name, "wxGridSelectRows" ) )
42             return wxGrid::wxGridSelectRows;
43         if( strEQ( name, "wxGridSelectColumns" ) )
44             return wxGrid::wxGridSelectColumns;
45         break;
46     }
47 #undef r
48
49   WX_PL_CONSTANT_CLEANUP();
50 }
51
52 wxPlConstants grid_module( &grid_constant );