blob: 332109a31573cc7692ddefe1f94680054c744ab5 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
"""Objects used across sub-package."""
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from pptx.opc.package import XmlPart
from pptx.types import ProvidesPart
class Subshape(object):
"""Provides access to the containing part for drawing elements that occur below a shape.
Access to the part is required for example to add or drop a relationship. Provides
`self._parent` attribute to subclasses.
"""
def __init__(self, parent: ProvidesPart):
super(Subshape, self).__init__()
self._parent = parent
@property
def part(self) -> XmlPart:
"""The package part containing this object."""
return self._parent.part
|