From: Robin Dunn Date: Sat, 7 Sep 2002 23:17:14 +0000 (+0000) Subject: Some last minute little tweaks X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1e6796a093c94cfb6de545594fcb625cafb7a8a4 Some last minute little tweaks git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/contrib/stc/_stcextras.py b/wxPython/contrib/stc/_stcextras.py index 96515ec3c5..eefe2c4547 100644 --- a/wxPython/contrib/stc/_stcextras.py +++ b/wxPython/contrib/stc/_stcextras.py @@ -2,3 +2,6 @@ wx.wxStyledTextEventPtr = wxStyledTextEventPtr wx.wxStyledTextCtrlPtr = wxStyledTextCtrlPtr + + +wxSTC_CARET_CENTER = wxSTC_CARET_STRICT diff --git a/wxPython/contrib/stc/msw/stc_.py b/wxPython/contrib/stc/msw/stc_.py index b15920505c..4e9ec5fadd 100644 --- a/wxPython/contrib/stc/msw/stc_.py +++ b/wxPython/contrib/stc/msw/stc_.py @@ -1794,3 +1794,6 @@ wxEVT_STC_ZOOM = stc_c.wxEVT_STC_ZOOM wx.wxStyledTextEventPtr = wxStyledTextEventPtr wx.wxStyledTextCtrlPtr = wxStyledTextCtrlPtr + + +wxSTC_CARET_CENTER = wxSTC_CARET_STRICT diff --git a/wxPython/demo/wxComboBox.py b/wxPython/demo/wxComboBox.py index 81a84dfca0..b3dfc92739 100644 --- a/wxPython/demo/wxComboBox.py +++ b/wxPython/demo/wxComboBox.py @@ -22,8 +22,8 @@ class TestComboBox(wxPanel): wxPoint(8, 10)) wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 18)) - cb = wxComboBox(self, 500, "default value", wxPoint(80, 50), wxSize(95, -1), - sampleList, wxCB_DROPDOWN|wxTE_PROCESS_ENTER) + cb = wxComboBox(self, 500, "default value", wxPoint(90, 50), wxSize(95, -1), + sampleList, wxCB_DROPDOWN)#|wxTE_PROCESS_ENTER) EVT_COMBOBOX(self, 500, self.EvtComboBox) EVT_TEXT(self, 500, self.EvtText) EVT_TEXT_ENTER(self, 500, self.EvtTextEnter) @@ -32,7 +32,7 @@ class TestComboBox(wxPanel): cb.Append("foo", "This is some client data for this item") - cb = wxComboBox(self, 501, "default value", wxPoint(80, 80), wxSize(95, -1), + cb = wxComboBox(self, 501, "default value", wxPoint(90, 80), wxSize(95, -1), [], wxCB_SIMPLE) for item in sampleList: cb.Append(item, string.upper(item)) @@ -65,12 +65,15 @@ def runTest(frame, nb, log): +overview = """\ +A combobox is like a combination of an edit control and a listbox. It can be displayed as static list with editable or read-only text field; or a drop-down list with text field; or a drop-down list without a text field. +""" +if __name__ == '__main__': + import sys,os + import run + run.main(['', os.path.basename(sys.argv[0])]) -overview = """\ -A combobox is like a combination of an edit control and a listbox. It can be displayed as static list with editable or read-only text field; or a drop-down list with text field; or a drop-down list without a text field. - -""" diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index bb79465929..ed7a4e4e8a 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -1474,6 +1474,7 @@ public: bool CreateGrid( int numRows, int numCols, WXGRIDSELECTIONMODES selmode = wxGrid::wxGridSelectCells ); void SetSelectionMode(WXGRIDSELECTIONMODES selmode); + WXGRIDSELECTIONMODES GetSelectionMode(); // ------ grid dimensions @@ -1529,7 +1530,7 @@ public: void EndBatch(); int GetBatchCount(); void ForceRefresh(); - void Refresh(bool eraseb=TRUE, wxRect* rect= NULL); + void Refresh(bool eraseb=TRUE, const wxRect* rect= NULL); // ------ edit control functions @@ -1762,6 +1763,13 @@ public: bool IsInSelection( int row, int col ); // TODO: ??? bool IsInSelection( const wxGridCellCoords& coords ) +// TODO: These need typemaps +// wxGridCellCoordsArray GetSelectedCells() const; +// wxGridCellCoordsArray GetSelectionBlockTopLeft() const; +// wxGridCellCoordsArray GetSelectionBlockBottomRight() const; +// wxArrayInt GetSelectedRows() const; +// wxArrayInt GetSelectedCols() const; + // This function returns the rectangle that encloses the block of cells // limited by TopLeft and BottomRight cell in device coords and clipped diff --git a/wxPython/src/msw/grid.cpp b/wxPython/src/msw/grid.cpp index 6460a497a9..e239f48d53 100644 --- a/wxPython/src/msw/grid.cpp +++ b/wxPython/src/msw/grid.cpp @@ -7458,6 +7458,34 @@ static PyObject *_wrap_wxGrid_SetSelectionMode(PyObject *self, PyObject *args, P return _resultobj; } +#define wxGrid_GetSelectionMode(_swigobj) (_swigobj->GetSelectionMode()) +static PyObject *_wrap_wxGrid_GetSelectionMode(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + WXGRIDSELECTIONMODES _result; + wxGrid * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxGrid_GetSelectionMode",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxGrid_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGrid_GetSelectionMode. Expected _wxGrid_p."); + return NULL; + } + } +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = (WXGRIDSELECTIONMODES )wxGrid_GetSelectionMode(_arg0); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + #define wxGrid_GetNumberRows(_swigobj) (_swigobj->GetNumberRows()) static PyObject *_wrap_wxGrid_GetNumberRows(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -14427,6 +14455,7 @@ static PyMethodDef gridcMethods[] = { { "wxGrid_ProcessTableMessage", (PyCFunction) _wrap_wxGrid_ProcessTableMessage, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetNumberCols", (PyCFunction) _wrap_wxGrid_GetNumberCols, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_GetNumberRows", (PyCFunction) _wrap_wxGrid_GetNumberRows, METH_VARARGS | METH_KEYWORDS }, + { "wxGrid_GetSelectionMode", (PyCFunction) _wrap_wxGrid_GetSelectionMode, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_SetSelectionMode", (PyCFunction) _wrap_wxGrid_SetSelectionMode, METH_VARARGS | METH_KEYWORDS }, { "wxGrid_CreateGrid", (PyCFunction) _wrap_wxGrid_CreateGrid, METH_VARARGS | METH_KEYWORDS }, { "new_wxGrid", (PyCFunction) _wrap_new_wxGrid, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/grid.py b/wxPython/src/msw/grid.py index b97466845a..7cbd1c0df1 100644 --- a/wxPython/src/msw/grid.py +++ b/wxPython/src/msw/grid.py @@ -955,6 +955,9 @@ class wxGridPtr(wxScrolledWindowPtr): def SetSelectionMode(self, *_args, **_kwargs): val = apply(gridc.wxGrid_SetSelectionMode,(self,) + _args, _kwargs) return val + def GetSelectionMode(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectionMode,(self,) + _args, _kwargs) + return val def GetNumberRows(self, *_args, **_kwargs): val = apply(gridc.wxGrid_GetNumberRows,(self,) + _args, _kwargs) return val diff --git a/wxPython/wxPython/lib/PyCrust/shell.py b/wxPython/wxPython/lib/PyCrust/shell.py index cac44aea08..32b1b5ffec 100644 --- a/wxPython/wxPython/lib/PyCrust/shell.py +++ b/wxPython/wxPython/lib/PyCrust/shell.py @@ -233,6 +233,7 @@ class Shell(wxStyledTextCtrl): self.autoCallTip = 1 self.CallTipSetBackground(wxColour(255, 255, 232)) self.wrap() + self.SetEndAtLastLine(false) def showIntro(self, text=''): """Display introductory text in the shell.""" @@ -243,6 +244,7 @@ class Shell(wxStyledTextCtrl): self.write(self.interp.introText) except AttributeError: pass + wxCallAfter(self.ScrollToLine, 0) def setBuiltinKeywords(self): """Create pseudo keywords as part of builtins.