The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#############################################################################
## Name:        ext/html/XS/HtmlTag.xsp
## Purpose:     XS for Wx::HtmlTag
## Author:      Mattia Barbon
## Modified by:
## Created:     30/11/2003
## RCS-ID:      $Id: HtmlTag.xsp 2234 2007-09-30 20:34:36Z mbarbon $
## Copyright:   (c) 2003-2004, 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};

%{
#include <wx/html/htmltag.h>
%}

%name{Wx::HtmlTag} class wxHtmlTag
{
    wxHtmlTag *GetParent() const;
    wxHtmlTag *GetFirstSibling() const;
    wxHtmlTag *GetLastSibling() const;
    wxHtmlTag *GetChildren() const;
    wxHtmlTag *GetPreviousSibling() const;
    wxHtmlTag *GetNextSibling() const;
    wxHtmlTag *GetNextTag() const;

    wxString GetName() const;

    bool HasParam(const wxString& par) const;

    wxString GetParam(const wxString& par, bool with_commas = false) const;

##    int ScanParam(const wxString& par, const wxChar *format,
##                  void *param) const;

    wxString GetAllParams() const;

    bool HasEnding() const;

#if WXPERL_W_VERSION_LT( 2, 9, 0 )
    int GetBeginPos() const;
    int GetEndPos1() const;
    int GetEndPos2() const;
#endif
};

%{

void
wxHtmlTag::GetParamAsColour( wxString par )
  PPCODE:
    wxColour col;
    bool ret = THIS->GetParamAsColour( par, &col );

    EXTEND( SP, 2 );
    XPUSHs( newSViv( ret ) );
    XPUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(),
                                   ( ret ? new wxColour( col ) : NULL ),
                                   "Wx::Colour" ) );

void
wxHtmlTag::GetParamAsInt(wxString par)
  PPCODE:
    int val;
    bool ret = THIS->GetParamAsInt( par, &val );

    EXTEND( SP, 2 );
    XPUSHs( newSViv( ret ) );
    XPUSHs( newSViv( val ) );

%}