Thanks, I'll add it once I get done with some cleaning up of the items
wxLua creates in the Lua registry table.

-John

On Nov 30, 2007 2:47 AM, Hakkı Doğusan <[EMAIL PROTECTED]> wrote:
> Hi,
>
> (using cvs, winxp, mingw)
>
> I added following to wxcore_image.i line ~450 (may not be a good place):
>
> // hd... ///////////////////////////////////////////////////////////////
> %include "wx/fs_mem.h"
>
> %class %noclassinfo wxMemoryFSHandler
>      // from wxMemoryFSHandlerBase
>      // Remove file from memory FS and free occupied memory
>      static void RemoveFile(const wxString& filename);
>      virtual bool CanOpen(const wxString& location);
>      // from wxMemoryFSHandlerBase
>
>      static void AddFile(const wxString& filename, const wxString&
> textdata);
>
>      //static void AddFile(const wxString& filename,
>      //                    const void *binarydata,
>      //                    size_t size)
>
> %if %wxchkver_2_8_5 //#if wxABI_VERSION >= 20805
>      static void AddFileWithMimeType(const wxString& filename, const
> wxString& textdata, const wxString& mimetype);
>
>      //static void AddFileWithMimeType(const wxString& filename,
>      //                                const void *binarydata, size_t size,
>      //                                const wxString& mimetype)
> %endif
>
> %if wxLUA_USE_wxImage && wxUSE_IMAGE
>      static void AddFile(const wxString& filename, const wxImage& image,
> long type);
>
>      static void AddFile(const wxString& filename, const wxBitmap&
> bitmap, long type);
> %endif
>
> %endclass
> ///////////////////////////////////////////////////////////////////////////////
>
>
> Lua sample translated from wx' help:
>
> -------------------------------------------------------------------------------
>      --/* XPM */
>      local logo_xpm = {
>      --/* columns rows colors chars-per-pixel */
>      "32 32 6 1",
>      "  c black",
>      ". c navy",
>      "X c red",
>      "o c yellow",
>      "O c gray100",
>      "+ c None",
>      --/* pixels */
>      "++++++++++++++++++++++++++++++++",
>      "++++++++++++++++++++++++++++++++",
>      "++++++++++++++++++++++++++++++++",
>      "++++++++++++++++++++++++++++++++",
>      "++++++++++++++++++++++++++++++++",
>      "++++++++              ++++++++++",
>      "++++++++ ............ ++++++++++",
>      "++++++++ ............ ++++++++++",
>      "++++++++ .OO......... ++++++++++",
>      "++++++++ .OO......... ++++++++++",
>      "++++++++ .OO......... ++++++++++",
>      "++++++++ .OO......              ",
>      "++++++++ .OO...... oooooooooooo ",
>      "         .OO...... oooooooooooo ",
>      " XXXXXXX .OO...... oOOooooooooo ",
>      " XXXXXXX .OO...... oOOooooooooo ",
>      " XOOXXXX ......... oOOooooooooo ",
>      " XOOXXXX ......... oOOooooooooo ",
>      " XOOXXXX           oOOooooooooo ",
>      " XOOXXXXXXXXX ++++ oOOooooooooo ",
>      " XOOXXXXXXXXX ++++ oOOooooooooo ",
>      " XOOXXXXXXXXX ++++ oOOooooooooo ",
>      " XOOXXXXXXXXX ++++ oooooooooooo ",
>      " XOOXXXXXXXXX ++++ oooooooooooo ",
>      " XXXXXXXXXXXX ++++              ",
>      " XXXXXXXXXXXX ++++++++++++++++++",
>      "              ++++++++++++++++++",
>      "++++++++++++++++++++++++++++++++",
>      "++++++++++++++++++++++++++++++++",
>      "++++++++++++++++++++++++++++++++",
>      "++++++++++++++++++++++++++++++++",
>      "++++++++++++++++++++++++++++++++"};
>
>      --wxBusyCursor bcur;
>      --already called by cpp:
>      --wxFileSystem::AddHandler(new wxMemoryFSHandler);
>
>      wx.wxMemoryFSHandler.AddFile("logo.xpm", wx.wxBitmap(logo_xpm),
> wx.wxBITMAP_TYPE_XPM);
>      wx.wxMemoryFSHandler.AddFile("about.htm",
>                                 "<html><body>About: " ..
>                                 "<img
> src=\"memory:logo.xpm\"></body></html>");
>
>      local dlg = wx.wxDialog(wx.NULL, -1, "About");
>      local topsizer = wx.wxBoxSizer(wx.wxVERTICAL);
>      local html = wx.wxHtmlWindow(dlg, -1, wx.wxDefaultPosition,
>                              wx.wxSize(380, 160), wx.wxHW_SCROLLBAR_NEVER);
>      html:SetBorders(0);
>      html:LoadPage("memory:about.htm");
>      html:SetSize(html:GetInternalRepresentation():GetWidth(),
>                    html:GetInternalRepresentation():GetHeight());
>      topsizer:Add(html, 1, wx.wxALL, 10);
>      topsizer:Add(wx.wxStaticLine(dlg, -1), 0, wx.wxEXPAND + wx.wxLEFT +
> wx.wxRIGHT, 10);
>      topsizer:Add(wx.wxButton(dlg, wx.wxID_OK, "Ok"),
>                    0, wx.wxALL + wx.wxALIGN_RIGHT, 15);
>      dlg:SetAutoLayout(true);
>      dlg:SetSizer(topsizer);
>      topsizer:Fit(dlg);
>      dlg:Centre();
>      dlg:ShowModal();
>      dlg:Destroy();
>
>      wx.wxMemoryFSHandler.RemoveFile("logo.xpm");
>      wx.wxMemoryFSHandler.RemoveFile("about.htm");
> -------------------------------------------------------------------------------
>
>
> --
> Regards,
> Hakki Dogusan
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell.  From the desktop to the data center, Linux is going
> mainstream.  Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> wxlua-users mailing list
> wxlua-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to