]> git.saurik.com Git - wxWidgets.git/commitdiff
Some last minute little tweaks
authorRobin Dunn <robin@alldunn.com>
Sat, 7 Sep 2002 23:17:14 +0000 (23:17 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 7 Sep 2002 23:17:14 +0000 (23:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/contrib/stc/_stcextras.py
wxPython/contrib/stc/msw/stc_.py
wxPython/demo/wxComboBox.py
wxPython/src/grid.i
wxPython/src/msw/grid.cpp
wxPython/src/msw/grid.py
wxPython/wxPython/lib/PyCrust/shell.py

index 96515ec3c53fd3587f22312007cd406125345929..eefe2c454733bc8ab1c83e5efa7c9bedf7d71da5 100644 (file)
@@ -2,3 +2,6 @@
 
 wx.wxStyledTextEventPtr       = wxStyledTextEventPtr
 wx.wxStyledTextCtrlPtr        = wxStyledTextCtrlPtr
+
+
+wxSTC_CARET_CENTER = wxSTC_CARET_STRICT
index b15920505cca7445effb162ecc9d79b21cf96013..4e9ec5fadda31138e098d17b9288d481e43716aa 100644 (file)
@@ -1794,3 +1794,6 @@ wxEVT_STC_ZOOM = stc_c.wxEVT_STC_ZOOM
 
 wx.wxStyledTextEventPtr       = wxStyledTextEventPtr
 wx.wxStyledTextCtrlPtr        = wxStyledTextCtrlPtr
+
+
+wxSTC_CARET_CENTER = wxSTC_CARET_STRICT
index 81a84dfca0297df14e5465585eb0986ede71bb2b..b3dfc92739833c1fc176aacc27e7097a9ce16ffe 100644 (file)
@@ -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.
-
-"""
index bb79465929bf64ee2d4169b7b6e10dd4b907d898..ed7a4e4e8a26f07367f93e210e5d8dba6346ccd2 100644 (file)
@@ -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
index 6460a497a9d171cdfc3fcef622b17fe129260a42..e239f48d5348bf12b5eb8e6d75e2d876da47001d 100644 (file)
@@ -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 },
index b97466845a389748f73f578cf660756da27b6fe2..7cbd1c0df1b125caaf9bd4d0e1fcf8d5e2af8d99 100644 (file)
@@ -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
index cac44aea08c083bc0dcee2ae8e1ff44e99fb6d0c..32b1b5ffecb31c087eaeb9f8b5ee0b0cdb9f2e10 100644 (file)
@@ -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.