示例#1
0
class PP_PLACEHOLDER_TYPE(XmlEnumeration):
    """
    Specifies one of the 18 distinct types of placeholder.

    Alias: ``PP_PLACEHOLDER``

    Example::

        from pptx.enum.shapes import PP_PLACEHOLDER

        placeholder = slide.placeholders[0]
        assert placeholder.type == PP_PLACEHOLDER.TITLE
    """

    __ms_name__ = "PpPlaceholderType"

    __url__ = (
        "http://msdn.microsoft.com/en-us/library/office/ff860759(v=office.15" ").aspx"
    )

    __members__ = (
        XmlMappedEnumMember("BITMAP", 9, "clipArt", "Clip art placeholder"),
        XmlMappedEnumMember("BODY", 2, "body", "Body"),
        XmlMappedEnumMember("CENTER_TITLE", 3, "ctrTitle", "Center Title"),
        XmlMappedEnumMember("CHART", 8, "chart", "Chart"),
        XmlMappedEnumMember("DATE", 16, "dt", "Date"),
        XmlMappedEnumMember("FOOTER", 15, "ftr", "Footer"),
        XmlMappedEnumMember("HEADER", 14, "hdr", "Header"),
        XmlMappedEnumMember("MEDIA_CLIP", 10, "media", "Media Clip"),
        XmlMappedEnumMember("OBJECT", 7, "obj", "Object"),
        XmlMappedEnumMember(
            "ORG_CHART",
            11,
            "dgm",
            "SmartArt placeholder. Organization char" "t is a legacy name.",
        ),
        XmlMappedEnumMember("PICTURE", 18, "pic", "Picture"),
        XmlMappedEnumMember("SLIDE_IMAGE", 101, "sldImg", "Slide Image"),
        XmlMappedEnumMember("SLIDE_NUMBER", 13, "sldNum", "Slide Number"),
        XmlMappedEnumMember("SUBTITLE", 4, "subTitle", "Subtitle"),
        XmlMappedEnumMember("TABLE", 12, "tbl", "Table"),
        XmlMappedEnumMember("TITLE", 1, "title", "Title"),
        ReturnValueOnlyEnumMember("VERTICAL_BODY", 6, "Vertical Body"),
        ReturnValueOnlyEnumMember("VERTICAL_OBJECT", 17, "Vertical Object"),
        ReturnValueOnlyEnumMember("VERTICAL_TITLE", 5, "Vertical Title"),
        ReturnValueOnlyEnumMember(
            "MIXED",
            -2,
            "Return value only; multiple placeholders of differ" "ing types.",
        ),
    )
示例#2
0
class PP_MEDIA_TYPE(Enumeration):
    """
    Indicates the OLE media type.

    Example::

        from pptx.enum.shapes import PP_MEDIA_TYPE

        movie = slide.shapes[0]
        assert movie.media_type == PP_MEDIA_TYPE.MOVIE
    """

    __ms_name__ = "PpMediaType"

    __url__ = "https://msdn.microsoft.com/en-us/library/office/ff746008.aspx"

    __members__ = (
        EnumMember("MOVIE", 3, "Video media such as MP4."),
        EnumMember("OTHER", 1, "Other media types"),
        EnumMember("SOUND", 1, "Audio media such as MP3."),
        ReturnValueOnlyEnumMember(
            "MIXED",
            -2,
            "Return value only; indicates multiple media types,"
            " typically for a collection of shapes. May not be applicable in"
            " python-pptx.",
        ),
    )
示例#3
0
class MSO_CONNECTOR_TYPE(XmlEnumeration):
    """
    Specifies a type of connector.

    Alias: ``MSO_CONNECTOR``

    Example::

        from pptx.enum.shapes import MSO_CONNECTOR
        from pptx.util import Cm

        shapes = prs.slides[0].shapes
        connector = shapes.add_connector(
            MSO_CONNECTOR.STRAIGHT, Cm(2), Cm(2), Cm(10), Cm(10)
        )
        assert connector.left.cm == 2
    """

    __ms_name__ = "MsoConnectorType"

    __url__ = "http://msdn.microsoft.com/en-us/library/office/ff860918.aspx"

    __members__ = (
        XmlMappedEnumMember("CURVE", 3, "curvedConnector3", "Curved connector."),
        XmlMappedEnumMember("ELBOW", 2, "bentConnector3", "Elbow connector."),
        XmlMappedEnumMember("STRAIGHT", 1, "line", "Straight line connector."),
        ReturnValueOnlyEnumMember(
            "MIXED",
            -2,
            "Return value only; indicates a combination of othe" "r states.",
        ),
    )
示例#4
0
class FOOBAR(Enumeration):
    """
    Enumeration docstring
    """

    __ms_name__ = "MsoFoobar"

    __url__ = "http://msdn.microsoft.com/foobar.aspx"

    __members__ = (
        EnumMember("READ_WRITE", 1, "Readable and settable"),
        ReturnValueOnlyEnumMember("READ_ONLY", -2, "Return value only"),
    )
示例#5
0
class FOOBAR(Enumeration):
    """
    Enumeration docstring
    """

    __ms_name__ = 'MsoFoobar'

    __url__ = 'http://msdn.microsoft.com/foobar.aspx'

    __members__ = (
        EnumMember('READ_WRITE', 1, 'Readable and settable'),
        ReturnValueOnlyEnumMember('READ_ONLY', -2, 'Return value only'),
    )
示例#6
0
class XMLFOO(XmlEnumeration):
    """
    XmlEnumeration docstring
    """

    __ms_name__ = "MsoXmlFoobar"

    __url__ = "http://msdn.microsoft.com/msoxmlfoobar.aspx"

    __members__ = (
        XmlMappedEnumMember(None, None, None, "No setting"),
        XmlMappedEnumMember("XML_RW", 42, "attrVal", "Read/write setting"),
        ReturnValueOnlyEnumMember("RO", -2, "Return value only;"),
    )
示例#7
0
class XMLFOO(XmlEnumeration):
    """
    XmlEnumeration docstring
    """

    __ms_name__ = 'MsoXmlFoobar'

    __url__ = 'http://msdn.microsoft.com/msoxmlfoobar.aspx'

    __members__ = (
        XmlMappedEnumMember(None, None, None, 'No setting'),
        XmlMappedEnumMember('XML_RW', 42, 'attrVal', 'Read/write setting'),
        ReturnValueOnlyEnumMember('RO', -2, 'Return value only;'),
    )
示例#8
0
class MSO_SHAPE_TYPE(Enumeration):
    """
    Specifies the type of a shape

    Alias: ``MSO``

    Example::

        from pptx.enum.shapes import MSO_SHAPE_TYPE

        assert shape.type == MSO_SHAPE_TYPE.PICTURE
    """

    __ms_name__ = "MsoShapeType"

    __url__ = (
        "http://msdn.microsoft.com/en-us/library/office/ff860759(v=office.15" ").aspx"
    )

    __members__ = (
        EnumMember("AUTO_SHAPE", 1, "AutoShape"),
        EnumMember("CALLOUT", 2, "Callout shape"),
        EnumMember("CANVAS", 20, "Drawing canvas"),
        EnumMember("CHART", 3, "Chart, e.g. pie chart, bar chart"),
        EnumMember("COMMENT", 4, "Comment"),
        EnumMember("DIAGRAM", 21, "Diagram"),
        EnumMember("EMBEDDED_OLE_OBJECT", 7, "Embedded OLE object"),
        EnumMember("FORM_CONTROL", 8, "Form control"),
        EnumMember("FREEFORM", 5, "Freeform"),
        EnumMember("GROUP", 6, "Group shape"),
        EnumMember("IGX_GRAPHIC", 24, "SmartArt graphic"),
        EnumMember("INK", 22, "Ink"),
        EnumMember("INK_COMMENT", 23, "Ink Comment"),
        EnumMember("LINE", 9, "Line"),
        EnumMember("LINKED_OLE_OBJECT", 10, "Linked OLE object"),
        EnumMember("LINKED_PICTURE", 11, "Linked picture"),
        EnumMember("MEDIA", 16, "Media"),
        EnumMember("OLE_CONTROL_OBJECT", 12, "OLE control object"),
        EnumMember("PICTURE", 13, "Picture"),
        EnumMember("PLACEHOLDER", 14, "Placeholder"),
        EnumMember("SCRIPT_ANCHOR", 18, "Script anchor"),
        EnumMember("TABLE", 19, "Table"),
        EnumMember("TEXT_BOX", 17, "Text box"),
        EnumMember("TEXT_EFFECT", 15, "Text effect"),
        EnumMember("WEB_VIDEO", 26, "Web video"),
        ReturnValueOnlyEnumMember("MIXED", -2, "Mixed shape types"),
    )