ó
    ˆ*£hÛ  ã                  óú   • 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JrJr  SSKJr  SS	KJr  \(       a&  SS
KJ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\	5      r! " S S\5      r"g)z€Graphic Frame shape and related objects.

A graphic frame is a common container for table, chart, smart art, and media
objects.
é    )Úannotations)ÚTYPE_CHECKINGÚcast)ÚMSO_SHAPE_TYPE)Ú	BaseShape)ÚParentedElementProxy)ÚGRAPHIC_DATA_URI_CHARTÚGRAPHIC_DATA_URI_OLEOBJÚGRAPHIC_DATA_URI_TABLE)ÚTable)Úlazyproperty)ÚChart)ÚShadowFormat)ÚCT_GraphicalObjectDataÚCT_GraphicalObjectFrame)Ú	ChartPart)ÚBaseSlidePart)ÚProvidesPartc                  óÐ   ^ • \ 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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rU =r$ )ÚGraphicFrameé   z~Container shape for table, chart, smart art, and media objects.

Corresponds to a `p:graphicFrame` element in the shape tree.
c                ó0   >• [         TU ]  X5        Xl        g ©N)ÚsuperÚ__init__Ú_graphicFrame)ÚselfÚgraphicFrameÚparentÚ	__class__s      €ÚQ/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pptx/shapes/graphfrm.pyr   ÚGraphicFrame.__init__%   s   ø€ Ü‰Ñ˜Ô.Ø)Õó    c                óf   • U R                   (       d  [        S5      eU R                  R                  $ )z„The |Chart| object containing the chart in this graphic frame.

Raises |ValueError| if this graphic frame does not contain a chart.
zshape does not contain a chart)Ú	has_chartÚ
ValueErrorÚ
chart_partÚchart©r   s    r!   r(   ÚGraphicFrame.chart)   s'   € ð �~�~ÜÐ=Ó>Ð>Ø�‰×$Ñ$Ð$r#   c                ó”   • U R                   R                  nUc  [        S5      e[        SU R                  R                  U5      5      $ )zBThe |ChartPart| object containing the chart in this graphic frame.z+this graphic frame does not contain a chartr   )r   Ú	chart_rIdr&   r   ÚpartÚrelated_part)r   r,   s     r!   r'   ÚGraphicFrame.chart_part3   sC   € ð ×&Ñ&×0Ñ0ˆ	ØÑÜÐJÓKÐKÜ�K §¡×!7Ñ!7¸	Ó!BÓCÐCr#   c                ó<   • U R                   R                  [        :H  $ )z•|True| if this graphic frame contains a chart object. |False| otherwise.

When |True|, the chart object can be accessed using the `.chart` property.
)r   ÚgraphicData_urir	   r)   s    r!   r%   ÚGraphicFrame.has_chart;   ó   € ð ×!Ñ!×1Ñ1Ô5KÑKÐKr#   c                ó<   • U R                   R                  [        :H  $ )z•|True| if this graphic frame contains a table object, |False| otherwise.

When |True|, the table object can be accessed using the `.table` property.
)r   r1   r   r)   s    r!   Ú	has_tableÚGraphicFrame.has_tableC   r3   r#   c                ó¢   • U R                   R                  (       d  [        S5      e[        U R                   R                  U R
                  5      $ )zû_OleFormat object for this graphic-frame shape.

Raises `ValueError` on a GraphicFrame instance that does not contain an OLE object.

An shape that contains an OLE object will have `.shape_type` of either
`EMBEDDED_OLE_OBJECT` or `LINKED_OLE_OBJECT`.
znot an OLE-object shape)r   Ú
has_oleobjr&   Ú
_OleFormatÚgraphicDataÚ_parentr)   s    r!   Ú
ole_formatÚGraphicFrame.ole_formatK   s<   € ð ×!Ñ!×,×,ÜÐ6Ó7Ð7Ü˜$×,Ñ,×8Ñ8¸$¿,¹,ÓGÐGr#   c                ó   • [        S5      e)zÅUnconditionally raises |NotImplementedError|.

Access to the shadow effect for graphic-frame objects is content-specific (i.e. different
for charts, tables, etc.) and has not yet been implemented.
z1shadow property on GraphicFrame not yet supported)ÚNotImplementedErrorr)   s    r!   ÚshadowÚGraphicFrame.shadowX   s   € ô "Ð"UÓVÐVr#   c                ó"  • U R                   R                  nU[        :X  a  [        R                  $ U[
        :X  a  [        R                  $ U[        :X  a;  U R                   R                  (       a  [        R                  $ [        R                  $ g)a@  Optional member of `MSO_SHAPE_TYPE` identifying the type of this shape.

Possible values are `MSO_SHAPE_TYPE.CHART`, `MSO_SHAPE_TYPE.TABLE`,
`MSO_SHAPE_TYPE.EMBEDDED_OLE_OBJECT`, `MSO_SHAPE_TYPE.LINKED_OLE_OBJECT`.

This value is `None` when none of these four types apply, for example when the shape
contains SmartArt.
N)r   r1   r	   r   ÚCHARTr   ÚTABLEr
   Úis_embedded_ole_objÚEMBEDDED_OLE_OBJECTÚLINKED_OLE_OBJECT)r   r1   s     r!   Ú
shape_typeÚGraphicFrame.shape_typea   s~   € ð ×,Ñ,×<Ñ<ˆØÔ4Ó4Ü!×'Ñ'Ð'ØÔ 6Ó6Ü!×'Ñ'Ð'ØÔ 7Ó7ð ×%Ñ%×9×9ô ×2Ñ2ðô $×5Ñ5ðð r#   c                ó¤   • U R                   (       d  [        S5      eU R                  R                  R                  R
                  n[        X5      $ )zyThe |Table| object contained in this graphic frame.

Raises |ValueError| if this graphic frame does not contain a table.
zshape does not contain a table)r5   r&   r   Úgraphicr:   Útblr   )r   rL   s     r!   ÚtableÚGraphicFrame.tabley   s?   € ð �~�~ÜÐ=Ó>Ð>Ø× Ñ ×(Ñ(×4Ñ4×8Ñ8ˆÜ�SÓÐr#   )r   )r   r   r   r   )Úreturnr   )rO   r   )rO   Úbool)rO   r9   )rO   r   )rO   r   )rO   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Úpropertyr(   r'   r%   r5   r<   r   r@   rH   rM   Ú__static_attributes__Ú__classcell__©r    s   @r!   r   r      s·   ø† ñ÷
*ð ó%ó ð%ð óDó ðDð óLó ðLð óLó ðLð ó
Hó ð
Hð óWó ðWð óó ðð. ó ó ö r#   r   c                  óx   ^ • \ rS rSr% SrS\S'   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$ )r9   é…   z.Provides attributes on an embedded OLE object.r   r-   c                ó0   >• [         TU ]  X5        Xl        g r   )r   r   Ú_graphicData)r   r:   r   r    s      €r!   r   Ú_OleFormat.__init__Š   s   ø€ Ü‰Ñ˜Ô-Ø'Õr#   c                ó€   • U R                   R                  nUc  gU R                  R                  U5      R                  $ )z’Optional bytes of OLE object, suitable for loading or saving as a file.

This value is `None` if the embedded object does not represent a "file".
N)r]   Úblob_rIdr-   r.   Úblob)r   r`   s     r!   ra   Ú_OleFormat.blobŽ   s9   € ð ×$Ñ$×-Ñ-ˆØÑØØ�y‰y×%Ñ% hÓ/×4Ñ4Ð4r#   c                ó.   • U R                   R                  $ )a  str "progId" attribute of this embedded OLE object.

The progId is a str like "Excel.Sheet.12" that identifies the "file-type" of the embedded
object, or perhaps more precisely, the application (aka. "server" in OLE parlance) to be
used to open this object.
)r]   ÚprogIdr)   s    r!   Úprog_idÚ_OleFormat.prog_id™   s   € ð × Ñ ×'Ñ'Ð'r#   c                ó.   • U R                   R                  $ )zDTrue when OLE object should appear as an icon (rather than preview).)r]   Ú
showAsIconr)   s    r!   Úshow_as_iconÚ_OleFormat.show_as_icon£   s   € ð × Ñ ×+Ñ+Ð+r#   )r]   )r:   r   r   r   )rO   zbytes | None)rO   z
str | None)rO   zbool | None)rQ   rR   rS   rT   rU   Ú__annotations__r   rV   ra   re   ri   rW   rX   rY   s   @r!   r9   r9   …   sM   ø‡ Ù8à
Ó÷(ð ó5ó ð5ð ó(ó ð(ð ó,ó ö,r#   r9   N)#rU   Ú
__future__r   Útypingr   r   Úpptx.enum.shapesr   Úpptx.shapes.baser   Úpptx.sharedr   Ú	pptx.specr	   r
   r   Ú
pptx.tabler   Ú	pptx.utilr   Úpptx.chart.chartr   Úpptx.dml.effectr   Úpptx.oxml.shapes.graphfrmr   r   Úpptx.parts.chartr   Úpptx.parts.slider   Ú
pptx.typesr   r   r9   © r#   r!   Ú<module>r{      s^   ðñõ #ç &å +Ý &Ý ,÷ñ õ
 Ý "æÝ&Ý,ßYÝ*Ý.Ý'ôc �9ô c ôL!,Ð%õ !,r#   