Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / cpp / tipprovider.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        cpp/tipprovider.h
3 // Purpose:     C++ wrapper for wxTipProvider
4 // Author:      Mattia Barbon
5 // Modified by:
6 // Created:     07/09/2001
7 // RCS-ID:      $Id: tipprovider.h 2239 2007-10-07 19:16:59Z mbarbon $
8 // Copyright:   (c) 2001-2002, 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 <wx/tipdlg.h>
14
15 class wxPliTipProvider:public wxTipProvider
16 {
17     WXPLI_DECLARE_V_CBACK();
18 public:
19     wxPliTipProvider( const char* package, size_t currentTip )
20         :wxTipProvider( currentTip ),
21          m_callback( "Wx::TipProvider" )
22     {
23         dTHX;
24         m_callback.SetSelf( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), this,
25                                                    package ) );
26     }
27
28     void SetCurrentTip( size_t currentTip ) { m_currentTip = currentTip; }
29
30     DEC_V_CBACK_WXSTRING__VOID( GetTip );
31     DEC_V_CBACK_WXSTRING__WXSTRING( PreprocessTip );
32 };
33
34 DEF_V_CBACK_WXSTRING__VOID_pure( wxPliTipProvider, wxTipProvider, GetTip );
35 DEF_V_CBACK_WXSTRING__WXSTRING( wxPliTipProvider, wxTipProvider, PreprocessTip );
36
37 // Local variables: //
38 // mode: c++ //
39 // End: //