2 % automatically generated by HelpGen from
3 % /home/vasek/fs\_mem.h at 27/Feb/00 19:23:10
6 \section{\class{wxMemoryFSHandler
}}\label{wxmemoryfshandler
}
8 This
\helpref{wxFileSystem
}{wxfilesystem
} handler can store arbitrary
9 data in memory stream and make them accessible via URL. It is particularly
10 suitable for storing bitmaps from resources or included XPM files so that
11 they can be used with wxHTML.
13 Filenames are prefixed with "memory:", e.g. "memory:myfile.html".
22 void MyFrame::OnAbout(wxCommandEvent&)
26 wxMemoryFSHandler::AddFile("logo.pcx", wxBITMAP(logo), wxBITMAP_TYPE_PCX);
27 wxMemoryFSHandler::AddFile("about.htm",
29 "<img src=\"memory:logo.pcx\"></body></html>");
31 wxDialog dlg(this, -
1, wxString(_("About")));
34 topsizer = new wxBoxSizer(wxVERTICAL);
35 html = new wxHtmlWindow(&dlg, -
1, wxDefaultPosition,
36 wxSize(
380,
160), wxHW_SCROLLBAR_NEVER);
38 html->LoadPage("memory:about.htm");
39 html->SetSize(html->GetInternalRepresentation()->GetWidth(),
40 html->GetInternalRepresentation()->GetHeight());
41 topsizer->Add(html,
1, wxALL,
10);
42 topsizer->Add(new wxStaticLine(&dlg, -
1),
0, wxEXPAND | wxLEFT | wxRIGHT,
10);
43 topsizer->Add(new wxButton(&dlg, wxID_OK, "Ok"),
44 0, wxALL | wxALIGN_RIGHT,
15);
45 dlg.SetAutoLayout(true);
46 dlg.SetSizer(topsizer);
51 wxMemoryFSHandler::RemoveFile("logo.pcx");
52 wxMemoryFSHandler::RemoveFile("about.htm");
57 \wxheading{Derived from
}
59 \helpref{wxFileSystemHandler
}{wxfilesystemhandler
}
61 \wxheading{Include files
}
66 \latexignore{\rtfignore{\wxheading{Members
}}}
69 \membersection{wxMemoryFSHandler::wxMemoryFSHandler
}\label{wxmemoryfshandlerwxmemoryfshandler
}
71 \func{}{wxMemoryFSHandler
}{\void}
75 \membersection{wxMemoryFSHandler::AddFile
}\label{wxmemoryfshandleraddfile
}
77 \func{static void
}{AddFile
}{\param{const wxString\&
}{filename
},
\param{wxImage\&
}{image
},
\param{long
}{type
}}
79 \func{static void
}{AddFile
}{\param{const wxString\&
}{filename
},
\param{const wxBitmap\&
}{bitmap
},
\param{long
}{type
}}
81 \func{static void
}{AddFile
}{\param{const wxString\&
}{filename
},
\param{const wxString\&
}{textdata
}}
83 \func{static void
}{AddFile
}{\param{const wxString\&
}{filename
},
\param{const void*
}{binarydata
},
\param{size
\_t }{size
}}
85 Add file to list of files stored in memory. Stored
86 data (bitmap, text or raw data)
87 will be copied into private memory stream and available under
88 name "memory:" + filename.
92 \membersection{wxMemoryFSHandler::RemoveFile
}\label{wxmemoryfshandlerremovefile
}
94 \func{static void
}{RemoveFile
}{\param{const wxString\&
}{filename
}}
96 Remove file from memory FS and free occupied memory.