1 #############################################################################
2 ## Name: ext/xrc/XS/XmlResource.xs
3 ## Purpose: XS for Wx::XmlResource
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: XmlResource.xs 2057 2007-06-18 23:03:00Z mbarbon $
8 ## Copyright: (c) 2001-2004, 2006 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 #############################################################################
13 #include <wx/xrc/xmlres.h>
15 #include <wx/dialog.h>
17 #include <wx/toolbar.h>
19 #include "cpp/overload.h"
21 MODULE=Wx PACKAGE=Wx::XmlResource
23 #if WXPERL_W_VERSION_GE( 2, 7, 1 )
26 wxXmlResource::new( flags = wxXRC_USE_LOCALE, domain = wxEmptyString )
33 wxXmlResource::new( flags = wxXRC_USE_LOCALE )
39 wxXmlResource::CLONE()
41 wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
45 wxXmlResource::DESTROY()
47 wxPli_thread_sv_unregister( aTHX_ "Wx::XmlResource", THIS, ST(0) );
51 wxXmlResource::Load( filemask )
54 #if WXPERL_W_VERSION_GE( 2, 6, 3 )
57 wxXmlResource::Unload( filemask )
63 wxXmlResource::InitAllHandlers()
66 wxXmlResource::AddHandler( handler )
67 wxXmlResourceHandler* handler
70 wxXmlResource::ClearHandlers()
73 wxXmlResource::LoadMenu( name )
77 wxXmlResource::LoadMenuBar( name )
81 wxXmlResource::LoadMenuBarOnParent( parent, name )
85 RETVAL = THIS->LoadMenuBar( parent, name );
89 wxXmlResource::LoadToolBar( parent, name )
94 wxXmlResource::LoadDialog( parent, name )
99 wxXmlResource::LoadOnDialog( dialog, parent, name )
104 RETVAL = THIS->LoadDialog( dialog, parent, name );
109 wxXmlResource::LoadPanel( parent, name )
114 wxXmlResource::LoadOnPanel( panel, parent, name )
119 RETVAL = THIS->LoadPanel( panel, parent, name );
124 wxXmlResource::LoadFrame( ... )
127 MATCH_REDISP( wxPliOvl_wfrm_wwin_s, LoadOnFrame )
128 MATCH_REDISP( wxPliOvl_wwin_s, LoadFrame2 )
129 END_OVERLOAD( "Wx::XmlResource::LoadFrame" )
132 wxXmlResource::LoadFrame2( parent, name )
136 RETVAL = THIS->LoadFrame( parent, name );
140 wxXmlResource::LoadOnFrame( frame, parent, name )
145 RETVAL = THIS->LoadFrame( frame, parent, name );
149 wxXmlResource::LoadBitmap( name )
152 RETVAL = new wxBitmap( THIS->LoadBitmap( name ) );
157 wxXmlResource::LoadIcon( name )
160 RETVAL = new wxIcon( THIS->LoadIcon( name ) );
165 wxXmlResource::AttachUnknownControl( name, control, parent = 0 )
171 wxXmlResource::GetFlags()
174 wxXmlResource::SetFlags( flags )
177 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
180 GetXRCID( str_id, value_if_not_found = wxID_NONE )
182 int value_if_not_found
184 RETVAL = wxXmlResource::GetXRCID( str_id, value_if_not_found );
194 RETVAL = wxXmlResource::GetXRCID( str_id );
201 wxXmlResource::GetVersion()
204 wxXmlResource::CompareVersion( major, minor, release, revision )
213 ## RETVAL = wxXmlResource::Get();
218 ##wxXmlResource::Set( res )
219 ## wxXmlResource* res
221 ## wxXmlResource::Set( res );
224 ## wxXmlResource::UpdateResources()
227 AddSubclassFactory( wxXmlSubclassFactory *factory )
229 wxPli_detach_object( aTHX_ ST(0) ); // avoid destructor
230 wxXmlResource::AddSubclassFactory( factory );
232 #if WXPERL_W_VERSION_GE( 2, 7, 1 )
235 wxXmlResource::GetDomain()
238 wxXmlResource::SetDomain( const wxChar* domain )