X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b1462dfa3496ba7288691376c1de4c890d90787c..b854b7b82e033d1dbd9d300402df50ec5e1e8b74:/utils/wxPython/src/misc2.i diff --git a/utils/wxPython/src/misc2.i b/utils/wxPython/src/misc2.i index 8ca4431d38..cffc30fd28 100644 --- a/utils/wxPython/src/misc2.i +++ b/utils/wxPython/src/misc2.i @@ -274,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(); @@ -320,6 +322,26 @@ public: 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; + } + } }; //---------------------------------------------------------------------- @@ -333,6 +355,7 @@ public: //---------------------------------------------------------------------- void wxPostEvent(wxEvtHandler *dest, wxEvent& event); +void wxWakeUpIdle(); //---------------------------------------------------------------------- //----------------------------------------------------------------------