@pymethod list|PyCDocTemplate|GetDocumentList|Return a list of all open documents.
| 212 | |
| 213 | // @pymethod list|PyCDocTemplate|GetDocumentList|Return a list of all open documents. |
| 214 | PyObject * |
| 215 | PyCDocTemplate::GetDocumentList(PyObject *self, PyObject *args) |
| 216 | { |
| 217 | if (!PyArg_ParseTuple(args,":GetDocumentList")) |
| 218 | return NULL; |
| 219 | CPythonDocTemplate *pTemplate = GetTemplate(self); |
| 220 | PyObject *newOb = PyList_New(0); |
| 221 | POSITION posDoc = pTemplate->GetFirstDocPosition(); |
| 222 | while (posDoc) { |
| 223 | CDocument* pDoc = pTemplate->GetNextDoc(posDoc); |
| 224 | PyList_Append(newOb, ui_assoc_object::make(PyCDocument::type, pDoc)->GetGoodRet()); |
| 225 | } |
| 226 | return newOb; |
| 227 | } |
| 228 | |
| 229 | // @pymethod <o PyCDocument>|PyCDocTemplate|FindOpenDocument|Returns an existing document with the specified file name. |
| 230 | PyObject * |
no test coverage detected