mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-09 05:20:08 +01:00
Add dummy stub classes
to be used when the metafile classes are not implemented.
This commit is contained in:
@@ -22,7 +22,29 @@ ITEMS = [ 'wxMetafile',
|
||||
'wxMetafileDC',
|
||||
]
|
||||
|
||||
stubCode = """\
|
||||
#if !wxUSE_METAFILE
|
||||
|
||||
class wxMetafile : public wxObject
|
||||
{
|
||||
public:
|
||||
wxMetafile(const wxString& filename = wxEmptyString) { wxPyRaiseNotImplemented(); }
|
||||
~wxMetafile() {}
|
||||
bool IsOk() { return false; }
|
||||
bool Play(wxDC* dc) { return false; }
|
||||
bool SetClipboard(int width = 0, int height = 0) { return false; }
|
||||
};
|
||||
|
||||
class wxMetafileDC : public wxMemoryDC
|
||||
{
|
||||
public:
|
||||
wxMetafileDC(const wxString& filename = wxEmptyString) { wxPyRaiseNotImplemented(); }
|
||||
~wxMetafileDC() {}
|
||||
wxMetafile* Close() { return NULL; }
|
||||
};
|
||||
|
||||
#endif
|
||||
"""
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
def run():
|
||||
@@ -35,6 +57,7 @@ def run():
|
||||
# customizing the generated code and docstrings.
|
||||
|
||||
module.addHeaderCode('#include <wx/metafile.h>')
|
||||
module.addHeaderCode(stubCode)
|
||||
|
||||
c = module.find('wxMetafile')
|
||||
c.addPrivateCopyCtor()
|
||||
|
||||
Reference in New Issue
Block a user