Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / dnd / cpp / dropsource.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        ext/dnd/cpp/dropsource.h
3 // Purpose:     c++ wrapper for wxPliDropSource
4 // Author:      Mattia Barbon
5 // Modified by:
6 // Created:     16/08/2001
7 // RCS-ID:      $Id: dropsource.h 2057 2007-06-18 23:03:00Z mbarbon $
8 // Copyright:   (c) 2001, 2004 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 <wx/dnd.h>
14 #include "cpp/v_cback.h"
15
16 class wxPliDropSource:public wxDropSource
17 {
18     WXPLI_DECLARE_V_CBACK();
19 public:
20 #if defined( __WXMSW__ ) || defined( __WXMAC__ )
21     wxPliDropSource( const char* package, wxWindow* win,
22                      const wxCursor& c1, const wxCursor& c2,
23                      const wxCursor& c3 )
24         :wxDropSource( win, c1, c2, c3 ),
25          m_callback( "Wx::DropSource" )
26     {
27         m_callback.SetSelf( wxPli_make_object( this, package ) );
28     }
29
30     wxPliDropSource( const char* package, wxDataObject& data, wxWindow* win,
31                      const wxCursor& c1, const wxCursor& c2,
32                      const wxCursor& c3 )
33         :wxDropSource( data, win, c1, c2, c3 ),
34          m_callback( "Wx::DropSource" )
35     {
36         m_callback.SetSelf( wxPli_make_object( this, package ) );
37     }
38 #else
39     wxPliDropSource( const char* package, wxWindow* win,
40                      const wxIcon& c1, const wxIcon& c2,
41                      const wxIcon& c3 )
42         :wxDropSource( win, c1, c2, c3 ),
43          m_callback( "Wx::DropSource" )
44     {
45         m_callback.SetSelf( wxPli_make_object( this, package ) );
46     }
47
48     wxPliDropSource( const char* package, wxDataObject& data, wxWindow* win,
49                      const wxIcon& c1, const wxIcon& c2,
50                      const wxIcon& c3 )
51         :wxDropSource( data, win, c1, c2, c3 ),
52          m_callback( "Wx::DropSource" )
53     {
54         m_callback.SetSelf( wxPli_make_object( this, package ) );
55     }
56 #endif
57
58     DEC_V_CBACK_BOOL__WXDRAGRESULT( GiveFeedback );
59 };
60
61 DEF_V_CBACK_BOOL__WXDRAGRESULT( wxPliDropSource, wxDropSource, GiveFeedback );
62
63 // Local variables: //
64 // mode: c++ //
65 // End: //
66