X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4f22cf8ddb6d4c75eee97d1320ba20f7c82753c8..18ba9da6b94a34129b6b04494033905a213a0114:/utils/wxPython/src/controls.i?ds=sidebyside diff --git a/utils/wxPython/src/controls.i b/utils/wxPython/src/controls.i index 7b5098130e..5e92ebe7ad 100644 --- a/utils/wxPython/src/controls.i +++ b/utils/wxPython/src/controls.i @@ -16,12 +16,19 @@ #include "helpers.h" #include #include +#include +#include #ifdef __WXMSW__ #if wxUSE_OWNER_DRAWN #include #endif #endif + +#ifdef __WXGTK__ +#include +#endif + %} //---------------------------------------------------------------------- @@ -48,7 +55,9 @@ wxValidator wxPyDefaultValidator; // Non-const default because of SWIG class wxControl : public wxWindow { public: +#ifdef __WXMSW__ void Command(wxCommandEvent& event); +#endif wxString GetLabel(); void SetLabel(const wxString& label); }; @@ -139,7 +148,7 @@ public: //---------------------------------------------------------------------- -class wxComboBox : public wxControl { +class wxComboBox : public wxChoice { public: wxComboBox(wxWindow* parent, wxWindowID id, char* value = "", const wxPoint& pos = wxPyDefaultPosition, @@ -173,7 +182,7 @@ public: // TODO: void SetClientData(const int n, char* data); void SetInsertionPoint(long pos); void SetInsertionPointEnd(); - void SetSelection(int n, bool select = TRUE); + void SetSelection(int n); %name(SetMark)void SetSelection(long from, long to); void SetValue(const wxString& text); }; @@ -213,6 +222,19 @@ public: }; +//---------------------------------------------------------------------- + + +class wxStaticLine : public wxControl { +public: + wxStaticLine( wxWindow *parent, wxWindowID id, + const wxPoint &pos = wxPyDefaultPosition, + const wxSize &size = wxPyDefaultSize, + long style = wxLI_HORIZONTAL, + const char* name = "staticLine" ); +}; + + //---------------------------------------------------------------------- class wxStaticText : public wxControl { @@ -251,7 +273,20 @@ public: int FindString(const wxString& string); // TODO: char* GetClientData(const int n); int GetSelection(); - // TODO: int GetSelections(int **selections); + + // int GetSelections(int **selections); + %addmethods { + PyObject* GetSelections() { + wxArrayInt lst; + self->GetSelections(lst); + PyObject *tup = PyTuple_New(lst.GetCount()); + for(int i=0; i