%
% API Documentation for cssutils
% Module cssutils.stylesheets.medialist
%
% Generated by epydoc 3.0.1
% [Fri Feb 01 19:05:22 2008]
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                          Module Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{cssutils \textit{(package)}!cssutils.stylesheets \textit{(package)}!cssutils.stylesheets.medialist \textit{(module)}|(}
\section{Module cssutils.stylesheets.medialist}

    \label{cssutils:stylesheets:medialist}

MediaList implements DOM Level 2 Style Sheets MediaList.
\begin{description}
\item[{TODO:}] \leavevmode \begin{itemize}
\item {} 
delete: maybe if deleting from all, replace \emph{all} with all others?

\item {} 
is unknown media an exception?

\end{itemize}

\end{description}
\textbf{Version:} \$LastChangedRevision: 798 \$



\textbf{Date:} \$LastChangedDate: 2008-01-03 21:47:28 +0100 (Do, 03 Jan 2008) \$



\textbf{Author:} \$LastChangedBy: cthedot \$




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                           Class Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{cssutils \textit{(package)}!cssutils.stylesheets \textit{(package)}!cssutils.stylesheets.medialist \textit{(module)}!cssutils.stylesheets.medialist.MediaList \textit{(class)}|(}
\subsection{Class MediaList}

    \label{cssutils:stylesheets:medialist:MediaList}
\begin{tabular}{cccccccc}
% Line for object, linespec=[False, False]
\multicolumn{2}{r}{\settowidth{\BCL}{object}\multirow{2}{\BCL}{object}}
&&
&&
  \\\cline{3-3}
  &&\multicolumn{1}{c|}{}
&&
&&
  \\
% Line for cssutils.util.Base, linespec=[False]
\multicolumn{4}{r}{\settowidth{\BCL}{cssutils.util.Base}\multirow{2}{\BCL}{cssutils.util.Base}}
&&
  \\\cline{5-5}
  &&&&\multicolumn{1}{c|}{}
&&
  \\
% Line for object, linespec=[False, True]
\multicolumn{2}{r}{\settowidth{\BCL}{object}\multirow{2}{\BCL}{object}}
&&
&&\multicolumn{1}{|c}{}
  \\\cline{3-3}
  &&\multicolumn{1}{c|}{}
&&
&\multicolumn{1}{|c}{}&
  \\
% Line for cssutils.util.ListSeq, linespec=[True]
\multicolumn{4}{r}{\settowidth{\BCL}{cssutils.util.ListSeq}\multirow{2}{\BCL}{cssutils.util.ListSeq}}
&&\multicolumn{1}{|c}{}
  \\\cline{5-5}
  &&&&\multicolumn{1}{c|}{}
&\multicolumn{1}{|c}{}&
  \\
&&&&\multicolumn{2}{l}{\textbf{cssutils.stylesheets.medialist.MediaList}}
\end{tabular}


Provides the abstraction of an ordered collection of media,
without defining or constraining how this collection is
implemented.

A media is always an instance of MediaQuery.

An empty list is the same as a list that contains the medium ``all''.


%___________________________________________________________________________

\hypertarget{properties}{}
\pdfbookmark[3]{Properties}{properties}
\paragraph*{Properties}
\label{properties}
\begin{description}
\item[{length:}] \leavevmode 
The number of MediaQuery objects in the list.

\item[{mediaText: of type DOMString}] \leavevmode 
The parsable textual representation of this MediaList

\item[{self: a list (cssutils)}] \leavevmode 
All MediaQueries in this MediaList

\item[{valid:}] \leavevmode 
if this list is valid

\end{description}


%___________________________________________________________________________

\hypertarget{format}{}
\pdfbookmark[3]{Format}{format}
\paragraph*{Format}
\label{format}
\begin{quote}{\ttfamily \raggedright \noindent
medium~{[}~COMMA~S*~medium~{]}*
}\end{quote}

New:
\begin{quote}{\ttfamily \raggedright \noindent
<media{\_}query>~{[},~<media{\_}query>~{]}*
}\end{quote}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                Methods                                %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Methods}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_init\_\_}(\textit{self}, \textit{mediaText}={\tt None}, \textit{readonly}={\tt False})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
\begin{description}
\item[{mediaText}] \leavevmode 
unicodestring of parsable comma separared media
or a list of media

\end{description}
\setlength{\parskip}{1ex}
      Overrides: object.\_\_init\_\_

    \end{boxedminipage}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_setitem\_\_}(\textit{self}, \textit{index}, \textit{newMedium})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}

overwrites ListSeq.{\_}{\_}setitem{\_}{\_}

Any duplicate items are \textbf{not} removed.
\setlength{\parskip}{1ex}
      Overrides: cssutils.util.ListSeq.\_\_setitem\_\_

    \end{boxedminipage}

    \label{cssutils:stylesheets:medialist:MediaList:appendMedium}
    \index{cssutils \textit{(package)}!cssutils.stylesheets \textit{(package)}!cssutils.stylesheets.medialist \textit{(module)}!cssutils.stylesheets.medialist.MediaList \textit{(class)}!cssutils.stylesheets.medialist.MediaList.appendMedium \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{appendMedium}(\textit{self}, \textit{newMedium})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}

(DOM)
Adds the medium newMedium to the end of the list. If the newMedium
is already used, it is first removed.
\begin{description}
\item[{newMedium}] \leavevmode 
a string or a MediaQuery object

\end{description}

returns if newMedium is valid

DOMException
\begin{itemize}
\item {} 
INVALID{\_}CHARACTER{\_}ERR: (self)
If the medium contains characters that are invalid in the
underlying style language.

\item {} 
NO{\_}MODIFICATION{\_}ALLOWED{\_}ERR: (self)
Raised if this list is readonly.

\end{itemize}
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{append}(\textit{self}, \textit{newMedium})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}

overwrites ListSeq.append
\setlength{\parskip}{1ex}
      Overrides: cssutils.util.ListSeq.append

    \end{boxedminipage}

    \label{cssutils:stylesheets:medialist:MediaList:deleteMedium}
    \index{cssutils \textit{(package)}!cssutils.stylesheets \textit{(package)}!cssutils.stylesheets.medialist \textit{(module)}!cssutils.stylesheets.medialist.MediaList \textit{(class)}!cssutils.stylesheets.medialist.MediaList.deleteMedium \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{deleteMedium}(\textit{self}, \textit{oldMedium})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}

(DOM)
Deletes the medium indicated by oldMedium from the list.

DOMException
\begin{itemize}
\item {} 
NO{\_}MODIFICATION{\_}ALLOWED{\_}ERR: (self)
Raised if this list is readonly.

\item {} 
NOT{\_}FOUND{\_}ERR: (self)
Raised if oldMedium is not in the list.

\end{itemize}
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{cssutils:stylesheets:medialist:MediaList:item}
    \index{cssutils \textit{(package)}!cssutils.stylesheets \textit{(package)}!cssutils.stylesheets.medialist \textit{(module)}!cssutils.stylesheets.medialist.MediaList \textit{(class)}!cssutils.stylesheets.medialist.MediaList.item \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{item}(\textit{self}, \textit{index})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}

(DOM)
Returns the mediaType of the index'th element in the list.
If index is greater than or equal to the number of media in the
list, returns None.
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_repr\_\_}(\textit{self})

\setlength{\parskip}{2ex}
    repr(x)

\setlength{\parskip}{1ex}
      Overrides: object.\_\_repr\_\_ 	extit{(inherited documentation)}

    \end{boxedminipage}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_str\_\_}(\textit{self})

\setlength{\parskip}{2ex}
    str(x)

\setlength{\parskip}{1ex}
      Overrides: object.\_\_str\_\_ 	extit{(inherited documentation)}

    \end{boxedminipage}


\large{\textbf{\textit{Inherited from cssutils.util.ListSeq}}}

\begin{quote}
\_\_contains\_\_(), \_\_delitem\_\_(), \_\_getitem\_\_(), \_\_iter\_\_(), \_\_len\_\_()
\end{quote}

\large{\textbf{\textit{Inherited from object}}}

\begin{quote}
\_\_delattr\_\_(), \_\_getattribute\_\_(), \_\_hash\_\_(), \_\_new\_\_(), \_\_reduce\_\_(), \_\_reduce\_ex\_\_(), \_\_setattr\_\_()
\end{quote}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                              Properties                               %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Properties}

    \vspace{-1cm}
\hspace{\varindent}\begin{longtable}{|p{\varnamewidth}|p{\vardescrwidth}|l}
\cline{1-2}
\cline{1-2} \centering \textbf{Name} & \centering \textbf{Description}& \\
\cline{1-2}
\endhead\cline{1-2}\multicolumn{3}{r}{\small\textit{continued on next page}}\\\endfoot\cline{1-2}
\endlastfoot\raggedright l\-e\-n\-g\-t\-h\- & \raggedright (DOM readonly) The number of media in the list.&\\
\cline{1-2}
\raggedright m\-e\-d\-i\-a\-T\-e\-x\-t\- & \raggedright (DOM) The parsable textual representation of the media list.
This is a comma-separated list of media.&\\
\cline{1-2}
\multicolumn{2}{|l|}{\textit{Inherited from object}}\\
\multicolumn{2}{|p{\varwidth}|}{\raggedright \_\_class\_\_}\\
\cline{1-2}
\end{longtable}

    \index{cssutils \textit{(package)}!cssutils.stylesheets \textit{(package)}!cssutils.stylesheets.medialist \textit{(module)}!cssutils.stylesheets.medialist.MediaList \textit{(class)}|)}
    \index{cssutils \textit{(package)}!cssutils.stylesheets \textit{(package)}!cssutils.stylesheets.medialist \textit{(module)}|)}
