
    ~Zi                        S r SSKJr  SSKJrJr  SSKJr  SSKJ	r	  SSK
Jr  SSKJr  \(       a&  SSKJrJr  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJr   " S S\5      r " S S\5      rg)z-Base shape-related objects such as BaseShape.    )annotations)TYPE_CHECKINGcast)ActionSetting)ShadowFormat)ElementProxy)lazyproperty)MSO_SHAPE_TYPEPP_PLACEHOLDER)ShapeElement)CT_Placeholder)BaseSlidePart)ProvidesPart)Lengthc                    ^  \ rS rSrSrSU 4S jjrSS jrSS jr\S S j5       r	\
S!S j5       r\
S"S j5       r\
S"S	 j5       r\
S"S
 j5       r\
S#S j5       r\R                   S$S j5       r\
S"S j5       r\
S#S j5       r\R                   S$S j5       r\
S%S j5       r\R                   S&S j5       r\
S'S j5       r\
S(S j5       r\
S)S j5       r\R                   S*S j5       r\S+S j5       r\
S,S j5       r\
S-S j5       r\
S#S j5       r\R                   S$S j5       r\
S#S j5       r\R                   S$S j5       rSrU =r$ ).	BaseShape   zZBase class for shape objects.

Subclasses include |Shape|, |Picture|, and |GraphicFrame|.
c                :   > [         TU ]  5         Xl        X l        g N)super__init___element_parent)self	shape_elmparent	__class__s      j/var/www/eduai.edurigo.com/question_generate/ques_gen_env/lib/python3.13/site-packages/pptx/shapes/base.pyr   BaseShape.__init__   s    !    c                ^    [        U[        5      (       d  gU R                  UR                  L $ )z|True| if this shape object proxies the same element as *other*.

Equality for proxy objects is defined as referring to the same XML element, whether or not
they are the same proxy object instance.
F
isinstancer   r   r   others     r   __eq__BaseShape.__eq__    s'     %++}}..r    c                ^    [        U[        5      (       d  gU R                  UR                  L$ )NTr"   r$   s     r   __ne__BaseShape.__ne__*   s%    %++}}ENN22r    c                X    U R                   R                  R                  n[        X5      $ )a  |ActionSetting| instance providing access to click behaviors.

Click behaviors are hyperlink-like behaviors including jumping to a hyperlink (web page)
or to another slide in the presentation. The click action is that defined on the overall
shape, not a run of text within the shape. An |ActionSetting| object is always returned,
even when no click behavior is defined on the shape.
)r   _nvXxPrcNvPrr   )r   r-   s     r   click_actionBaseShape.click_action/   s$     %%++U))r    c                    U R                   $ )z`lxml` element for this shape, e.g. a CT_Shape instance.

Note that manipulating this element improperly can produce an invalid presentation file.
Make sure you know what you're doing if you use this to change the underlying XML.
)r   r   s    r   elementBaseShape.element;   s     }}r    c                    g)z|True| if this shape is a graphic frame containing a chart object.

|False| otherwise. When |True|, the chart object can be accessed using the ``.chart``
property.
F r1   s    r   	has_chartBaseShape.has_chartD        r    c                    g)z|True| if this shape is a graphic frame containing a table object.

|False| otherwise. When |True|, the table object can be accessed using the ``.table``
property.
Fr5   r1   s    r   	has_tableBaseShape.has_tableO   r8   r    c                    g)z&|True| if this shape can contain text.Fr5   r1   s    r   has_text_frameBaseShape.has_text_frameZ   s     r    c                .    U R                   R                  $ )zMRead/write. Integer distance between top and bottom extents of shape in EMUs.r   cyr1   s    r   heightBaseShape.height`   s     }}r    c                $    XR                   l        g r   r@   r   values     r   rB   rC   e        r    c                .    U R                   R                  $ )z[True if this shape is a placeholder.

A shape is a placeholder if it has a <p:ph> element.
)r   
has_ph_elmr1   s    r   is_placeholderBaseShape.is_placeholderi   s     }}'''r    c                .    U R                   R                  $ )zInteger distance of the left edge of this shape from the left edge of the slide.

Read/write. Expressed in English Metric Units (EMU)
r   xr1   s    r   leftBaseShape.leftq        }}r    c                $    XR                   l        g r   rM   rE   s     r   rO   rP   y       r    c                .    U R                   R                  $ )z%Name of this shape, e.g. 'Picture 7'.)r   
shape_namer1   s    r   nameBaseShape.name}   s     }}'''r    c                L    XR                   R                  R                  l        g r   )r   r,   r-   rV   rE   s     r   rV   rW      s    +0##(r    c                B    [        SU R                  R                  5      $ )zThe package part containing this shape.

A |BaseSlidePart| subclass in this case. Access to a slide part should only be required if
you are extending the behavior of |pp| API objects.
r   )r   r   partr1   s    r   rZ   BaseShape.part   s     OT\\%6%677r    c                `    U R                   R                  nUc  [        S5      e[        U5      $ )zProvides access to placeholder-specific properties such as placeholder type.

Raises |ValueError| on access if the shape is not a placeholder.
zshape is not a placeholder)r   ph
ValueError_PlaceholderFormat)r   r]   s     r   placeholder_formatBaseShape.placeholder_format   s/     ]]:9::!"%%r    c                .    U R                   R                  $ )zDegrees of clockwise rotation.

Read/write float. Negative values can be assigned to indicate counter-clockwise rotation,
e.g. assigning -45.0 will change setting to 315.0.
r   rotr1   s    r   rotationBaseShape.rotation   s     }}   r    c                $    XR                   l        g r   rc   rE   s     r   re   rf      s    !r    c                @    [        U R                  R                  5      $ )z|ShadowFormat| object providing access to shadow for this shape.

A |ShadowFormat| object is always returned, even when no shadow is
explicitly defined on this shape (i.e. it inherits its shadow
behavior).
)r   r   spPrr1   s    r   shadowBaseShape.shadow   s     DMM..//r    c                .    U R                   R                  $ )zmRead-only positive integer identifying this shape.

The id of a shape is unique among all shapes on a slide.
)r   shape_idr1   s    r   rm   BaseShape.shape_id   s     }}%%%r    c                D    [        [        U 5      R                   S35      e)z~A member of MSO_SHAPE_TYPE classifying this shape by type.

Like ``MSO_SHAPE_TYPE.CHART``. Must be implemented by subclasses.
z! does not implement `.shape_type`)NotImplementedErrortype__name__r1   s    r   
shape_typeBaseShape.shape_type   s"     "T$Z%8%8$99Z"[\\r    c                .    U R                   R                  $ )z|Distance from the top edge of the slide to the top edge of this shape.

Read/write. Expressed in English Metric Units (EMU)
r   yr1   s    r   topBaseShape.top   rQ   r    c                $    XR                   l        g r   rv   rE   s     r   rx   ry      rS   r    c                .    U R                   R                  $ )zmDistance between left and right extents of this shape.

Read/write. Expressed in English Metric Units (EMU).
r   cxr1   s    r   widthBaseShape.width   s     }}r    c                $    XR                   l        g r   r|   rE   s     r   r~   r      rG   r    )r   r   )r   r   r   r   )r%   objectreturnbool)r   r   )r   r   )r   r   )r   r   )rF   r   )r   str)rF   r   )r   r   )r   r_   )r   float)rF   r   )r   r   r   int)r   r
   )rr   
__module____qualname____firstlineno____doc__r   r&   r)   r	   r.   propertyr2   r6   r:   r=   rB   setterrJ   rO   rV   rZ   r`   re   rj   rm   rs   rx   r~   __static_attributes____classcell__r   s   @r   r   r      s   

/3
 	* 	*        
     ]]! ! ( (   
[[    ( ( 
[[1 1 8 8 & & ! ! __" " 0 0 & & ] ]   	ZZ        \\! !r    r   c                  l   ^  \ rS rSrSrSU 4S jjr\S	S j5       r\S
S j5       r\SS j5       r	Sr
U =r$ )r_      zProvides properties specific to placeholders, such as the placeholder type.

Accessed via the :attr:`~.BaseShape.placeholder_format` property of a placeholder shape,
c                0   > [         TU ]  U5        Xl        g r   )r   r   _ph)r   r2   r   s     r   r   _PlaceholderFormat.__init__   s    !r    c                    U R                   $ )z*The `p:ph` element proxied by this object.r   r1   s    r   r2   _PlaceholderFormat.element   s     xxr    c                .    U R                   R                  $ )z$Integer placeholder 'idx' attribute.)r   idxr1   s    r   r   _PlaceholderFormat.idx   s     xx||r    c                .    U R                   R                  $ )zcPlaceholder type.

A member of the :ref:`PpPlaceholderType` enumeration, e.g. PP_PLACEHOLDER.CHART
)r   rq   r1   s    r   rq   _PlaceholderFormat.type   s     xx}}r    r   )r2   r   )r   r   r   )r   r   )rr   r   r   r   r   r   r   r2   r   rq   r   r   r   s   @r   r_   r_      sI    
      r    r_   N)r   
__future__r   typingr   r   pptx.actionr   pptx.dml.effectr   pptx.sharedr   	pptx.utilr	   pptx.enum.shapesr
   r   pptx.oxml.shapesr   pptx.oxml.shapes.sharedr   pptx.parts.slider   
pptx.typesr   r   r   r   r_   r5   r    r   <module>r      sJ    3 " & % ( $ "?-6.' B! B!J r    