Add wxFileSystemHandler for "data" scheme
This notably allows embedding images directly in HTML. Closes #24138.
This commit is contained in:
parent
68eaff5c02
commit
ca405352e0
14 changed files with 306 additions and 1 deletions
31
include/wx/fs_data.h
Normal file
31
include/wx/fs_data.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/fs_data.h
|
||||
// Purpose: DATA scheme file system.
|
||||
// Author: Vyacheslav Lisovski
|
||||
// Copyright: (c) 2023 Vyacheslav Lisovski
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_FS_DATA_H_
|
||||
#define _WX_FS_DATA_H_
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_FILESYSTEM
|
||||
|
||||
#include "wx/filesys.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxDataSchemeFSHandler
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_BASE wxDataSchemeFSHandler : public wxFileSystemHandler
|
||||
{
|
||||
public:
|
||||
virtual bool CanOpen(const wxString& location) override;
|
||||
virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location) override;
|
||||
};
|
||||
|
||||
#endif // wxUSE_FILESYSTEM
|
||||
|
||||
#endif // _WX_FS_DATA_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue