
    	i                     4    d dl mZmZmZ  G d d          ZdS )    )AnyDictOptionalc                   r    e Zd ZdZddZdefdZdefdZdefdZde	e
ef         fdZdefd	Zde
fd
ZdS )
ChartTitlez
    A class to represent an Excel chart title.

    This class encapsulates all title related properties and methods for the
    chart title and axis titles.
    returnNc                     d| _         d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d| _	        d| _
        dS )z3
        Initialize a ChartTitle instance.
        NF)fontnameformuladata_idlayoutoverlayhiddenlinefillpatterngradientselfs    N/srv/django_bis/venv311/lib/python3.11/site-packages/xlsxwriter/chart_title.py__init__zChartTitle.__init__   sU     /3	#'	&*&*04'+!.2	.2	1526    c                 *    | j         duo
| j         dk    S )zr
        Check if the title has a text name set.

        Returns:
            True if name has been set.
        N )r   r   s    r   has_namezChartTitle.has_name%   s     y$8b8r   c                     | j         duS )zs
        Check if the title has a formula set.

        Returns:
            True if formula has been set.
        N)r   r   s    r   has_formulazChartTitle.has_formula.   s     |4''r   c                     | j         duo| j                             dd          }| j        duo| j                            dd          }| j        }| j        }|p|p|p|S )z
        Check if the title has any formatting properties set.

        Returns:
            True if the title has line, fill, pattern, or gradient formatting.
        NdefinedF)r   getr   r   r   )r   has_linehas_fillhas_patternhas_gradients        r   has_formattingzChartTitle.has_formatting7   si     9D(LTY]]9e-L-L9D(LTY]]9e-L-Ll}B8B{BlBr   c                 8    | j         | j        | j        | j        dS )z
        Get a dictionary containing the formatting properties.

        Returns:
            A dictionary with line, fill, pattern, and gradient properties.
        r   r   r   r   r(   r   s    r   get_formattingzChartTitle.get_formattingE   s'     II|	
 
 	
r   c                     | j         S )zq
        Check if the title is explicitly hidden.

        Returns:
            True if title is hidden.
        )r   r   s    r   	is_hiddenzChartTitle.is_hiddenS   s     {r   c                     d| j         d| j        d| j        d| j        d| j        d| j        d| j        d| j        d	| j        d
| j	        d| 
                                dS )zC
        Return a string representation of the ChartTitle.
        zChartTitle(
    name = z,
    formula = z,
    hidden = z,
    font = z,
    line = z,
    fill = z,
    pattern = z,
    gradient = z,
    layout = z,
    overlay = z,
    has_formatting = z,
)
)r   r   r   r
   r   r   r   r   r   r   r&   r   s    r   __repr__zChartTitle.__repr__\   s    
) !\  !K  )	 
 )  )  "\  #m  !K  "\  %)$7$7$9$9  	
r   )r   N)__name__
__module____qualname____doc__r   boolr   r   r&   r   strr   r)   r+   r-    r   r   r   r      s         7 7 7 7 9$ 9 9 9 9(T ( ( ( (C C C C C
S#X 
 
 
 
4    
# 
 
 
 
 
 
r   r   N)typingr   r   r   r   r4   r   r   <module>r6      sa    ' & & & & & & & & &a
 a
 a
 a
 a
 a
 a
 a
 a
 a
r   