#include <wx/resource.h>
#include <wx/tooltip.h>
#include <wx/caret.h>
-#ifdef NOT_READY_YET
#include <wx/fontenum.h>
-#endif
%}
//----------------------------------------------------------------------
%import windows.i
%import misc.i
%import gdi.i
+%import events.i
//---------------------------------------------------------------------------
// Dialog Functions
%}
//----------------------------------------------------------------------
-#ifdef NOT_READY_YET
%{
class wxPyFontEnumerator : public wxFontEnumerator {
wxPyFontEnumerator() {}
~wxPyFontEnumerator() {}
- bool EnumerateFamilies(int fixedWidthOnly = FALSE);
- bool EnumerateEncodings(const char* family = "");
-
- DEC_PYCALLBACK_BOOL_STRING(OnFontFamily);
+ DEC_PYCALLBACK_BOOL_STRING(OnFacename);
DEC_PYCALLBACK_BOOL_STRINGSTRING(OnFontEncoding);
PYPRIVATE;
};
-IMP_PYCALLBACK_BOOL_STRING(wxPyFontEnumerator, wxFontEnumerator, OnFontFamily);
+IMP_PYCALLBACK_BOOL_STRING(wxPyFontEnumerator, wxFontEnumerator, OnFacename);
IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEncoding);
%}
%name(wxFontEnumerator) class wxPyFontEnumerator {
public:
- wxPyFontEnumerator() {}
- ~wxPyFontEnumerator() {}
+ wxPyFontEnumerator();
+ ~wxPyFontEnumerator();
+ void _setSelf(PyObject* self);
%pragma(python) addtomethod = "__init__:self._setSelf(self)"
- bool EnumerateFamilies(int fixedWidthOnly = FALSE);
- bool EnumerateEncodings(const char* family = "");
+ bool EnumerateFacenames(
+ wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all
+ bool fixedWidthOnly = FALSE);
+ bool EnumerateEncodings(const char* facename = "");
+
+ //wxArrayString* GetEncodings();
+ //wxArrayString* GetFacenames();
+ %addmethods {
+ PyObject* GetEncodings() {
+ wxArrayString* arr = self->GetEncodings();
+ PyObject* list = PyList_New(0);
+ for (size_t x=0; x<arr->GetCount(); x++)
+ PyList_Append(list, PyString_FromString((*arr)[x]));
+ return list;
+ }
+
+ PyObject* GetFacenames() {
+ wxArrayString* arr = self->GetFacenames();
+ PyObject* list = PyList_New(0);
+ for (size_t x=0; x<arr->GetCount(); x++)
+ PyList_Append(list, PyString_FromString((*arr)[x]));
+ return list;
+ }
+ }
+};
+
+//----------------------------------------------------------------------
- bool base_OnFontFamily(const wxString& family);
- bool base_OnFontEncoding(const wxString& family,
- const wxString& encoding);
+class wxBusyCursor {
+public:
+ wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR);
+ ~wxBusyCursor();
};
-#endif
+
+//----------------------------------------------------------------------
+
+void wxPostEvent(wxEvtHandler *dest, wxEvent& event);
+
+//----------------------------------------------------------------------
//----------------------------------------------------------------------
//----------------------------------------------------------------------