Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / cpp / wizard.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        cpp/wizard.h
3 // Purpose:     c++ wrapper for wxWizard/wxWizardPage
4 // Author:      Mattia Barbon
5 // Modified by:
6 // Created:     28/08/2002
7 // RCS-ID:      $Id: wizard.h 2057 2007-06-18 23:03:00Z mbarbon $
8 // Copyright:   (c) 2002-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 #define DEC_V_CBACK_BOOL__WXWIZARDPAGE( NAME ) \
14     bool NAME( wxWizardPage* page )
15
16 #define DEF_V_CBACK_BOOL__WXWIZARDPAGE( CLASS, BASE, METHOD )                \
17     DEF_V_CBACK_BOOL__WXOBJECTsP_( wxWizardPage*, CLASS,                     \
18                                   return BASE::METHOD( p1 ),                 \
19                                   METHOD, wxPli_NOCONST )
20
21 #define DEC_V_CBACK_WXWIZARDPAGE__VOID_const( NAME ) \
22     wxWizardPage* NAME() const
23
24 #define DEF_V_CBACK_WXWIZARDPAGE__VOID_const_pure( CLASS, BASE, METHOD )     \
25     DEF_V_CBACK_WXOBJECTsP__VOID_( wxWizardPage*, Wx::WizardPage,            \
26                                    CLASS, return NULL, METHOD, wxPli_CONST )
27
28 class wxPliWizard : public wxWizard
29 {
30     WXPLI_DECLARE_DYNAMIC_CLASS( wxPliWizard );
31     WXPLI_DECLARE_V_CBACK();
32 public:
33     WXPLI_DEFAULT_CONSTRUCTOR( wxPliWizard, "Wx::Wizard", true );
34     WXPLI_CONSTRUCTOR_5( wxPliWizard, "Wx::Wizard", true,
35                          wxWindow*, wxWindowID, const wxString&,
36                          const wxBitmap&, const wxPoint& ); 
37
38     DEC_V_CBACK_BOOL__WXWIZARDPAGE( HasPrevPage );
39     DEC_V_CBACK_BOOL__WXWIZARDPAGE( HasNextPage );
40 };
41
42 WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliWizard, wxWizard );
43
44 DEF_V_CBACK_BOOL__WXWIZARDPAGE( wxPliWizard, wxWizard, HasPrevPage );
45 DEF_V_CBACK_BOOL__WXWIZARDPAGE( wxPliWizard, wxWizard, HasNextPage );
46
47 class wxPliWizardPage : public wxWizardPage
48 {
49     WXPLI_DECLARE_DYNAMIC_CLASS( wxPliWizardPage );
50     WXPLI_DECLARE_V_CBACK();
51 public:
52     wxPliWizardPage( const char* package )
53         : wxWizardPage(),
54           m_callback( "Wx::WizardPage" )
55     {
56         m_callback.SetSelf( wxPli_make_object( this, package ), true );
57     }
58
59     wxPliWizardPage( const char* package, wxWizard* parent,
60                      const wxBitmap& bitmap )
61         :wxWizardPage( parent, bitmap ),
62          m_callback( "Wx::WizardPage" )
63     {
64         m_callback.SetSelf( wxPli_make_object( this, package ), true );
65     }
66
67     DEC_V_CBACK_WXWIZARDPAGE__VOID_const( GetPrev );
68     DEC_V_CBACK_WXWIZARDPAGE__VOID_const( GetNext );
69 };
70
71 WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPliWizardPage, wxWizardPage );
72
73 DEF_V_CBACK_WXWIZARDPAGE__VOID_const_pure( wxPliWizardPage, wxWizardPage,
74                                            GetPrev );
75 DEF_V_CBACK_WXWIZARDPAGE__VOID_const_pure( wxPliWizardPage, wxWizardPage,
76                                            GetNext );
77
78 // local variables:
79 // mode: c++
80 // end: