adjusted indentation with astyle; added Id keyword
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -9,58 +9,58 @@
|
||||
/**
|
||||
@class wxMemoryFSHandler
|
||||
@wxheader{fs_mem.h}
|
||||
|
||||
This wxFileSystem handler can store arbitrary
|
||||
|
||||
This wxFileSystem 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 wxHTML.
|
||||
|
||||
|
||||
Filenames are prefixed with "memory:", e.g. "memory:myfile.html".
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
@code
|
||||
#ifndef __WXMSW__
|
||||
#include "logo.xpm"
|
||||
#endif
|
||||
|
||||
|
||||
void MyFrame::OnAbout(wxCommandEvent&)
|
||||
{
|
||||
wxBusyCursor bcur;
|
||||
wxFileSystem::AddHandler(new wxMemoryFSHandler);
|
||||
wxMemoryFSHandler::AddFile("logo.pcx", wxBITMAP(logo), wxBITMAP_TYPE_PCX);
|
||||
wxMemoryFSHandler::AddFile("about.htm",
|
||||
wxMemoryFSHandler::AddFile("about.htm",
|
||||
"htmlbodyAbout: "
|
||||
"img src=\"memory:logo.pcx\"/body/html");
|
||||
|
||||
|
||||
wxDialog dlg(this, -1, wxString(_("About")));
|
||||
wxBoxSizer *topsizer;
|
||||
wxHtmlWindow *html;
|
||||
topsizer = new wxBoxSizer(wxVERTICAL);
|
||||
html = new wxHtmlWindow(, -1, wxDefaultPosition,
|
||||
html = new wxHtmlWindow(, -1, wxDefaultPosition,
|
||||
wxSize(380, 160), wxHW_SCROLLBAR_NEVER);
|
||||
html-SetBorders(0);
|
||||
html-LoadPage("memory:about.htm");
|
||||
html-SetSize(html-GetInternalRepresentation()-GetWidth(),
|
||||
html-SetSize(html-GetInternalRepresentation()-GetWidth(),
|
||||
html-GetInternalRepresentation()-GetHeight());
|
||||
topsizer-Add(html, 1, wxALL, 10);
|
||||
topsizer-Add(new wxStaticLine(, -1), 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
|
||||
topsizer-Add(new wxButton(, wxID_OK, "Ok"),
|
||||
topsizer-Add(new wxButton(, wxID_OK, "Ok"),
|
||||
0, wxALL | wxALIGN_RIGHT, 15);
|
||||
dlg.SetAutoLayout(@true);
|
||||
dlg.SetSizer(topsizer);
|
||||
topsizer-Fit();
|
||||
dlg.Centre();
|
||||
dlg.ShowModal();
|
||||
|
||||
|
||||
wxMemoryFSHandler::RemoveFile("logo.pcx");
|
||||
wxMemoryFSHandler::RemoveFile("about.htm");
|
||||
}
|
||||
@endcode
|
||||
|
||||
|
||||
@library{wxbase}
|
||||
@category{FIXME}
|
||||
|
||||
|
||||
@seealso
|
||||
wxMemoryFSHandler::AddFileWithMimeType
|
||||
*/
|
||||
@@ -74,9 +74,9 @@ public:
|
||||
|
||||
//@{
|
||||
/**
|
||||
Add file to list of files stored in memory. Stored
|
||||
Add file to list of files stored in memory. Stored
|
||||
data (bitmap, text or raw data)
|
||||
will be copied into private memory stream and available under
|
||||
will be copied into private memory stream and available under
|
||||
name "memory:" + @e filename.
|
||||
|
||||
The @e type argument is one of @c wxBITMAP_TYPE_XXX constants.
|
||||
@@ -88,9 +88,9 @@ public:
|
||||
*/
|
||||
static void AddFile(const wxString& filename, wxImage& image,
|
||||
long type);
|
||||
static void AddFile(const wxString& filename,
|
||||
const wxBitmap& bitmap,
|
||||
long type);
|
||||
static void AddFile(const wxString& filename,
|
||||
const wxBitmap& bitmap,
|
||||
long type);
|
||||
//@}
|
||||
|
||||
//@{
|
||||
@@ -106,10 +106,10 @@ public:
|
||||
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);
|
||||
static void AddFileWithMimeType(const wxString& filename,
|
||||
const void* binarydata,
|
||||
size_t size,
|
||||
const wxString& mimetype);
|
||||
//@}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user