X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/06c0fba410b3573cdcba1409b6cdf0ae67050e7f..b854b7b82e033d1dbd9d300402df50ec5e1e8b74:/utils/wxPython/src/misc2.i?ds=sidebyside diff --git a/utils/wxPython/src/misc2.i b/utils/wxPython/src/misc2.i index 11c4529e05..cffc30fd28 100644 --- a/utils/wxPython/src/misc2.i +++ b/utils/wxPython/src/misc2.i @@ -19,9 +19,7 @@ #include #include #include -#ifdef NOT_READY_YET #include -#endif %} //---------------------------------------------------------------------- @@ -34,6 +32,7 @@ %import windows.i %import misc.i %import gdi.i +%import events.i //--------------------------------------------------------------------------- // Dialog Functions @@ -275,6 +274,8 @@ public: wxWindow *GetWindow(); %name(MoveXY)void Move(int x, int y); void Move(const wxPoint& pt); + %name(SetSizeWH) void SetSize(int width, int height); + void SetSize(const wxSize& size); void Show(int show = TRUE); void Hide(); void OnSetFocus(); @@ -292,7 +293,6 @@ public: %} //---------------------------------------------------------------------- -#ifdef NOT_READY_YET %{ class wxPyFontEnumerator : public wxFontEnumerator { @@ -300,34 +300,64 @@ public: 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; xGetCount(); 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; xGetCount(); 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); +void wxWakeUpIdle(); + +//---------------------------------------------------------------------- //---------------------------------------------------------------------- //----------------------------------------------------------------------