1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
|
#############################################################################
## Name: ext/html/XS/HtmlListBox.xsp
## Purpose: XS++ for Wx::HtmlListBox
## Author: Mattia Barbon
## Modified by:
## Created: 19/09/2006
## RCS-ID: $Id: HtmlListBox.xsp 2129 2007-08-11 21:29:29Z mbarbon $
## Copyright: (c) 2006-2007 Mattia Barbon
## Licence: This program is free software; you can redistribute it and/or
## modify it under the same terms as Perl itself
#############################################################################
%module{Wx};
%typemap{wxHtmlListBox*}{simple};
%typemap{wxPlHtmlListBox*}{simple};
%typemap{wxSimpleHtmlListBox*}{simple};
%typemap{wxFileSystem*}{simple};
#if WXPERL_W_VERSION_GE( 2, 5, 0 )
%{
#include <wx/clntdata.h>
#include "cpp/helpers.h"
#include <wx/htmllbox.h>
#include "cpp/overload.h"
#include "cpp/htmllbox.h"
%}
%file{cpp/htmllbox.h};
%{
#include "cpp/v_cback.h"
// bool METH(size_t)
#define DEC_V_CBACK_WXSTRING__SIZET_( METHOD, CONST ) \
wxString METHOD( size_t ) CONST
#define DEF_V_CBACK_WXSTRING__SIZET_( CLASS, CALLBASE, METHOD, CONST )\
wxString CLASS::METHOD( size_t p1 ) CONST \
{ \
dTHX; \
if( wxPliFCback( aTHX_ &m_callback, #METHOD ) ) \
{ \
wxAutoSV ret( aTHX_ wxPliCCback( aTHX_ &m_callback, G_SCALAR, \
"L", p1 ) ); \
wxString value; \
WXSTRING_INPUT( value, wxChar*, ret ); \
return value; \
} else \
CALLBASE; \
}
#define DEC_V_CBACK_WXSTRING__SIZET_const( METHOD ) \
DEC_V_CBACK_WXSTRING__SIZET_( METHOD, wxPli_CONST )
#define DEF_V_CBACK_WXSTRING__SIZET_const_pure( CLASS, BASE, METHOD ) \
DEF_V_CBACK_WXSTRING__SIZET_( CLASS, return wxEmptyString, METHOD, wxPli_CONST )
class wxPlHtmlListBox : public wxHtmlListBox {
WXPLI_DECLARE_DYNAMIC_CLASS( wxPlHtmlListBox );
WXPLI_DECLARE_V_CBACK();
public:
WXPLI_DEFAULT_CONSTRUCTOR( wxPlHtmlListBox, "Wx::HtmlListBox", true );
WXPLI_CONSTRUCTOR_6( wxPlHtmlListBox, "Wx::HtmlListBox", true,
wxWindow*, wxWindowID, const wxPoint&,
const wxSize&, long, const wxString& );
DEC_V_CBACK_WXCOORD__VOID_const( EstimateTotalHeight );
DEC_V_CBACK_WXSTRING__SIZET_const( OnGetItem );
};
WXPLI_IMPLEMENT_DYNAMIC_CLASS( wxPlHtmlListBox, wxHtmlListBox );
DEF_V_CBACK_WXCOORD__VOID_const( wxPlHtmlListBox, wxHtmlListBox,
EstimateTotalHeight );
DEF_V_CBACK_WXSTRING__SIZET_const_pure( wxPlHtmlListBox, wxHtmlListBox,
OnGetItem );
%}
%file{-};
%name{Wx::HtmlListBox} class wxHtmlListBox
{
bool Create( wxWindow *parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxVListBoxNameStr );
};
%{
wxFileSystem*
wxHtmlListBox::GetFileSystem()
CODE:
RETVAL = &THIS->GetFileSystem();
OUTPUT: RETVAL
CLEANUP:
wxPli_object_set_deleteable( aTHX_ ST(0), false );
%}
%name{Wx::PlHtmlListBox} class wxPlHtmlListBox
{
%name{newDefault} wxPlHtmlListBox()
%code{% RETVAL = new wxPlHtmlListBox( CLASS ); %};
%name{newFull} wxPlHtmlListBox( wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxEmptyString )
%code{% RETVAL = new wxPlHtmlListBox( CLASS, parent, id, pos, size,
style, name );
%};
};
%{
void
new( ... )
PPCODE:
BEGIN_OVERLOAD()
MATCH_VOIDM_REDISP( newDefault )
MATCH_ANY_REDISP( newFull )
END_OVERLOAD( "Wx::PlHtmlListBox::new" )
%}
#if WXPERL_W_VERSION_GE( 2, 7, 2 )
%name{Wx::SimpleHtmlListBox} class wxSimpleHtmlListBox
{
%name{newDefault} wxSimpleHtmlListBox()
%code{% RETVAL = new wxSimpleHtmlListBox;
wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
%};
%name{newFull} wxSimpleHtmlListBox( wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
wxArrayString choices,
long style = 0,
const wxValidator& validator = wxDefaultValidatorPtr,
const wxString& name = wxSimpleHtmlListBoxNameStr )
%code{% RETVAL = new wxSimpleHtmlListBox( parent, id, pos, size,
choices, style, *validator,
name );
wxPli_create_evthandler( aTHX_ RETVAL, CLASS );
%};
bool Create( wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
wxArrayString choices,
long style = 0,
const wxValidator& validator = wxDefaultValidatorPtr,
const wxString& name = wxSimpleHtmlListBoxNameStr );
void SetSelection( int n );
int GetSelection() const;
unsigned int GetCount() const;
wxString GetString( unsigned int n ) const;
## wxArrayString GetStrings() const;
void SetString( unsigned int n, const wxString& s );
## void Clear();
%{
void
wxSimpleHtmlListBox::Clear()
CODE:
THIS->wxVListBox::Clear();
%}
void Delete( unsigned int n );
%name{AppendStrings} void Append( const wxArrayString& strings );
%name{AppendString} void Append( const wxString& item );
%name{AppendData} void Append( const wxString& item,
wxPliUserDataCD* data );
};
%{
void
new( ... )
PPCODE:
BEGIN_OVERLOAD()
MATCH_VOIDM_REDISP( newDefault )
MATCH_ANY_REDISP( newFull )
END_OVERLOAD( "Wx::SimpleHtmlListBox::new" )
void
Append( ... )
PPCODE:
BEGIN_OVERLOAD()
MATCH_REDISP( wxPliOvl_arr, AppendStrings )
MATCH_REDISP( wxPliOvl_s_s, AppendData )
MATCH_REDISP( wxPliOvl_s, AppendString )
END_OVERLOAD( Wx::SimpleHtmlListBox::Append )
%}
#endif
#endif
|