Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / docview / cpp / dv_constants.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        ext/docview/cpp/dv_constants.cpp
3 // Purpose:     constants for Wx::DocView
4 // Author:      Simon Flack
5 // Created:     11/09/2002
6 // RCS-ID:      $Id: dv_constants.cpp 2057 2007-06-18 23:03:00Z mbarbon $
7 // Copyright:   (c) 2002-2005 Mattia Barbon
8 // Licence:     This program is free software; you can redistribute it and/or
9 //              modify it under the same terms as Perl itself
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include "cpp/constants.h"
13
14 double docview_constant( const char* name, int arg )
15 {
16     // !package: Wx
17     // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> }
18     // !tag: docview
19 #define r( n ) \
20     if( strEQ( name, #n ) ) \
21         return n;
22
23     WX_PL_CONSTANT_INIT();
24     //  if( strlen( name ) >= 7 )
25     //      fl = name[6];
26     //  else
27     //      fl = 0;
28
29     switch( fl )
30     {
31       case 'D':
32          r( wxDEFAULT_TEMPLATE_FLAGS );
33          r( wxDEFAULT_DOCMAN_FLAGS );
34          r( wxDOC_SDI );
35          r( wxDOC_MDI );
36          r( wxDOC_NEW );
37          r( wxDOC_SILENT );
38          break;
39       case 'T':
40          r( wxTEMPLATE_VISIBLE );
41          r( wxTEMPLATE_INVISIBLE );
42          break;
43       case 'M':
44          r( wxMAX_FILE_HISTORY );
45          break;
46     }
47 #undef r
48
49     WX_PL_CONSTANT_CLEANUP();
50 }
51
52 wxPlConstants docview_module( &docview_constant );