Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / dnd / cpp / dn_constants.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        ext/dnd/cpp/dn_constants.cpp
3 // Purpose:     constants for Wx::DND
4 // Author:      Mattia Barbon
5 // Modified by:
6 // Created:     12/08/2001
7 // RCS-ID:      $Id: dn_constants.cpp 2057 2007-06-18 23:03:00Z mbarbon $
8 // Copyright:   (c) 2001-2003 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 #include <wx/dnd.h>
15
16 const int Get = wxDataObjectBase::Get;
17 const int Set = wxDataObjectBase::Set;
18 const int Both = wxDataObjectBase::Both;
19
20 double dnd_constant( const char* name, int arg )
21 {
22     // !package: Wx
23     // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> }
24     // !tag: dnd
25 #define r( n ) \
26     if( strEQ( name, #n ) ) \
27         return n;
28
29     WX_PL_CONSTANT_INIT();
30
31     switch( fl )
32     {
33     case 'B':
34         r( Both );
35         break;
36     case 'D':
37 #if wxPERL_USE_DRAG_AND_DROP
38         r( wxDragError );
39         r( wxDragNone );
40         r( wxDragMove );
41         r( wxDragCopy );
42         r( wxDragLink );
43         r( wxDragCancel );
44
45         r( wxDrag_CopyOnly );
46         r( wxDrag_AllowMove );
47         r( wxDrag_DefaultMove );
48 #endif
49         break;
50     case 'G':
51         r( Get );
52         break;
53     case 'S':
54         r( Set );
55         break;
56     }
57 #undef r
58
59   WX_PL_CONSTANT_CLEANUP();
60 }
61
62 wxPlConstants dnd_module( &dnd_constant );
63