Custom element class
| 167 | |
| 168 | |
| 169 | class CT_Shape(ElementBase): |
| 170 | """<p:sp> Custom element class""" |
| 171 | def _init(self): |
| 172 | _required_child(self, 'p:nvSpPr') |
| 173 | _required_child(self, 'p:spPr') |
| 174 | |
| 175 | # children ------------------------ |
| 176 | nvSpPr = property(lambda self: _child(self, 'p:nvSpPr')) |
| 177 | spPr = property(lambda self: _child(self, 'p:spPr')) |
| 178 | txBody = property(lambda self: _get_child_or_append(self, 'p:txBody')) |
| 179 | |
| 180 | # convenience accessors |
| 181 | id = property(lambda self: self.nvSpPr.cNvPr.id) |
| 182 | name = property(lambda self: self.nvSpPr.cNvPr.name) |
| 183 | |
| 184 | |
| 185 | class CT_ShapeNonVisual(ElementBase): |
no test coverage detected
searching dependent graphs…