Sha256: 8b5e6ae8cb1d023f348adde8cd08189b68bb1cb2c740d0f51fcefe3ab1150cb7
Contents?: true
Size: 803 Bytes
Versions: 2
Compression:
Stored size: 803 Bytes
Contents
/* * wxXRC.cpp * * Created on: 04.11.2012 * Author: hanmac */ #include "wxWizard.hpp" #if wxUSE_XRC namespace RubyWX { namespace XRC { DLL_LOCAL VALUE _xrc_load_file(VALUE self,VALUE name) { wxXmlResource *old = wxXmlResource::Get(); if(rb_block_given_p()) wxXmlResource::Set(new wxXmlResource); wxXmlResource::Get()->InitAllHandlers(); wxXmlResource::Get()->LoadFile(unwrap<wxString>(name)); if(rb_block_given_p()) { rb_yield(Qnil); wxXmlResource::Get()->Unload(unwrap<wxString>(name)); wxXmlResource::Get()->ClearHandlers(); wxXmlResource::Set(old); } return self; } } } #endif DLL_LOCAL void Init_WXXRC(VALUE rb_mWX) { #if wxUSE_XRC using namespace RubyWX::XRC; rb_define_module_function(rb_mWX,"xrc_load_file",RUBY_METHOD_FUNC(_xrc_load_file),1); #endif }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rwx-0.0.1.1.dev | ext/wxXRC.cpp |
rwx-0.0.1.dev | ext/wxXRC.cpp |