@pymethod |win32ui|CreateView|Creates a generic view object.
| 415 | |
| 416 | // @pymethod <o PyCScrollView>|win32ui|CreateView|Creates a generic view object. |
| 417 | PyObject * PyCScrollView::create(PyObject *self, PyObject *args) |
| 418 | { |
| 419 | PyObject *doc; |
| 420 | // @pyparm <o PyCDocument>|doc||The document to use with the view. |
| 421 | if (!PyArg_ParseTuple(args, "O:CreateView", &doc)) |
| 422 | return NULL; |
| 423 | if (!ui_base_class::is_uiobject(doc, &PyCDocument::type)) |
| 424 | RETURN_TYPE_ERR("Argument must be a PyCDocument"); |
| 425 | CDocument *pDoc = PyCDocument::GetDoc( doc ); |
| 426 | GUI_BGN_SAVE; |
| 427 | CPythonView *pView = new CPythonView(); |
| 428 | ((CProtectedView *)pView)->SetDocument(pDoc); |
| 429 | GUI_END_SAVE; |
| 430 | return ui_assoc_object::make( PyCScrollView::type, pView, TRUE ); |
| 431 | } |
| 432 | |
| 433 | // @pymethod <o PyCDC>|PyCScrollView|GetDC|Gets the view's current DC. |
| 434 | static PyObject * |
nothing calls this directly
no test coverage detected