
    Mi                        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)zGraphic 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      n/var/www/eduai.edurigo.com/storigo/production/storigo_env/lib/python3.13/site-packages/pptx/shapes/graphfrm.pyr   GraphicFrame.__init__%   s    .)    c                f    U R                   (       d  [        S5      eU R                  R                  $ )zThe |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15K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)zUnconditionally 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                  $ )zOptional 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     $$--yy%%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#   