wx.FileSys.MemoryFSHandler Class Reference

Inheritance diagram for wx.FileSys.MemoryFSHandler:

wx.FileSys.FileSystemHandler wx.Object

List of all members.

Public Member Functions

 MemoryFSHandler ()
override FSFile OpenFile (FileSystem fs, string location)

Static Public Member Functions

Functions to add files to the virtual file system in memory.
static void Add (string filename, byte[] binaryData)
static void Add (string filename, string text)
static void Add (string filename, wx.Bitmap image, wx.BitmapType type)
static void Add (string filename, wx.Image image, wx.BitmapType type)
static void Remove (string filename)


Detailed Description

This FileSystem handler can store arbitrary data in memory stream and make them accessible via URL. It is particularly suitable for storing bitmaps from resources or included XPM files so that they can be used with wx.HTML.

Filenames are prefixed with "memory:", e.g. "memory:myfile.html".


Constructor & Destructor Documentation

wx.FileSys.MemoryFSHandler.MemoryFSHandler (  ) 


Member Function Documentation

static void wx.FileSys.MemoryFSHandler.Add ( string  filename,
byte[]  binaryData 
) [static]

static void wx.FileSys.MemoryFSHandler.Add ( string  filename,
string  text 
) [static]

static void wx.FileSys.MemoryFSHandler.Add ( string  filename,
wx.Bitmap  image,
wx.BitmapType  type 
) [static]

Adds an image as a file of the specified type. Please note, that the type argument shall be something like wx.BitmapType.wxBITMAP_TYPE_PNG that wxWidgets can save.

static void wx.FileSys.MemoryFSHandler.Add ( string  filename,
wx.Image  image,
wx.BitmapType  type 
) [static]

Adds an image as a file of the specified type. Please note, that the type argument shall be something like wx.BitmapType.wxBITMAP_TYPE_PNG that wxWidgets can save.

override FSFile wx.FileSys.MemoryFSHandler.OpenFile ( FileSystem  fs,
string  location 
) [virtual]

Returns an instance of FSFile that provides a stream over the data as denoted by location.

Parameters:
location absolute location of the desired data.
fs is the parent file system. This parameter still exists maybe because of historical reasons. The manual 2.6.3. refers to wxZipFSHandler as a reference for using this parameter but this class in the meanwhile explicitely refers to a freshly created file system to avoid infinite recursions (as the remark says).

Implements wx.FileSys.FileSystemHandler.

static void wx.FileSys.MemoryFSHandler.Remove ( string  filename  )  [static]


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads