An Elementary Prefs Collection is a plain text file (normally identified with the .epc extension), consisting of instructions for the Elm Prefs Compiler.

The syntax for the elementary prefs data files follows a simple structure of \char`\"{}blocks \{ .. \}\char`\"{} that can contain \char`\"{}properties\+: ..\char`\"{}, more blocks, or both.

\label{epcref_sec_quickaccess}%
\Hypertarget{epcref_sec_quickaccess}%
Quick access to block descriptions\+: 
\begin{DoxyItemize}
\item \hyperlink{epcref_sec_page}{Page} 
\item \hyperlink{epcref_sec_items}{Items} 
\begin{DoxyItemize}
\item \hyperlink{epcref_sec_items_bool}{Bool} 
\item \hyperlink{epcref_sec_items_int}{Int} 
\item \hyperlink{epcref_sec_items_float}{Float} 
\item \hyperlink{epcref_sec_items_date}{Date} 
\item \hyperlink{epcref_sec_items_text}{Text} 
\item \hyperlink{epcref_sec_items_textarea}{Text Area} 
\end{DoxyItemize}
\end{DoxyItemize}

\begin{DoxyAuthor}{Author}
Ricardo de Almeida Gonzaga (ricardotk) \href{mailto:ricardo@profusion.mobi}{\tt ricardo@profusion.\+mobi}
\end{DoxyAuthor}
\tabulinesep=1mm
\begin{longtabu} spread 0pt [c]{*{3}{|X[-1]}|}
\hline
\multicolumn{2}{|p{(\linewidth-\tabcolsep*3-\arrayrulewidth*1)*2/3}|}{

\label{epcref_sec_page}%
\Hypertarget{epcref_sec_page}%
\hyperlink{epcref_sec_quickaccess}{Page}

}\\\cline{1-3}
{\bfseries  page }&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{
\begin{DoxyCode}
collection \{
    ..
    page \{
        name: \textcolor{stringliteral}{"main"};
        version: 1;
        title: \textcolor{stringliteral}{"Preference Widgets"};
        subtitle: \textcolor{stringliteral}{"Subtitle"};
        widget: \textcolor{stringliteral}{"elm/vertical\_frame"};

        items \{ \}
    \}
    ..
\}
\end{DoxyCode}
}\\\cline{1-3}
~&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{A \char`\"{}page\char`\"{} block is a grouping of prefs items together. A prefs widget must always be bound to a page, that can address other pages in the collection too as {\bfseries sub-\/pages}. 

}\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  name }&{\ttfamily  \mbox{[}page name\mbox{]} }\\\cline{1-2}
~&The name of the page (to be referred by the application). It must be unique within the collection. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  version }&{\ttfamily  \mbox{[}page version\mbox{]} }\\\cline{1-2}
~&The page\textquotesingle{}s version. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  title }&{\ttfamily  \mbox{[}page title\mbox{]} }\\\cline{1-2}
~&Set page\textquotesingle{}s title. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  subtitle }&{\ttfamily  \mbox{[}page subtitle\mbox{]} }\\\cline{1-2}
~&Set page\textquotesingle{}s subtitle. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  widget }&{\ttfamily  \mbox{[}page widget\mbox{]} }\\\cline{1-2}
~&Set the widget from among the available page widgets. Valid, built-\/in page widgets are\+: \begin{DoxyItemize}
\item elm/horizontal\+\_\+box \item elm/vertical\+\_\+box \item elm/horizontal\+\_\+frame \item elm/vertical\+\_\+frame \end{DoxyItemize}
\\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  style }&{\ttfamily  \mbox{[}page style\mbox{]} }\\\cline{1-2}
~&Set page\textquotesingle{}s style. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  icon }&{\ttfamily  \mbox{[}page icon\mbox{]} }\\\cline{1-2}
~&Set page\textquotesingle{}s icon. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  autosave }&{\ttfamily  \mbox{[}1 or 0\mbox{]} }\\\cline{1-2}
~&Takes a boolean value specifying whether page is autosaved (1) or not (0). The default value is 1. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
\multicolumn{2}{|p{(\linewidth-\tabcolsep*3-\arrayrulewidth*1)*2/3}|}{

\label{epcref_sec_items}%
\Hypertarget{epcref_sec_items}%
\hyperlink{epcref_sec_quickaccess}{Items}

}\\\cline{1-3}
{\bfseries  items }&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{
\begin{DoxyCode}
page \{
    ..
    items \{
        name: \textcolor{stringliteral}{"item"};
        type: INT;
        label: \textcolor{stringliteral}{"Just a item label..."};

        type \{ \}
    \}
    ..
\}
\end{DoxyCode}
}\\\cline{1-3}
~&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{An \char`\"{}item\char`\"{} block declares a new Prefs item, along with its properties. 

}\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  name }&{\ttfamily  \mbox{[}item name\mbox{]} }\\\cline{1-2}
~&The item\textquotesingle{}s name, to be referred by the application. It must be unique within the page. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  type }&{\ttfamily  \mbox{[}T\+Y\+PE\mbox{]} }\\\cline{1-2}
~&Set the type (all types must be entered in capitals) from among the available types, that are\+: \begin{DoxyItemize}
\item B\+O\+OL -\/ Checkbox. \item I\+NT -\/ Slider. \item F\+L\+O\+AT -\/ Slider. \item D\+A\+TE -\/ Date/time display and input widget. \item T\+E\+XT -\/ Single-\/line text entry. \item T\+E\+X\+T\+A\+R\+EA -\/ Text entry. \item L\+A\+B\+EL -\/ Read-\/only label. \item P\+A\+GE -\/ Prefs subpage object. \item S\+E\+P\+A\+R\+A\+T\+OR -\/ Line that serves only to divide and organize prefs item. \item S\+W\+A\+L\+L\+OW -\/ Swallows an Evas\+\_\+\+Object. \item S\+A\+VE -\/ Button that will get all the values bounded to items and save it on C\+FG file. \item A\+C\+T\+I\+ON -\/ Button that will emit a signal to .C file and call a smart callback. \item R\+E\+S\+ET -\/ Button that will return all the values bounded to items as default declared on .E\+PC file. \end{DoxyItemize}
\\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  label }&{\ttfamily  \mbox{[}a string to label\mbox{]} }\\\cline{1-2}
~&Set a string to item\textquotesingle{}s label. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  icon }&{\ttfamily  \mbox{[}item icon\mbox{]} }\\\cline{1-2}
~&This is the item icon. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  persistent }&{\ttfamily  \mbox{[}1 or 0\mbox{]} }\\\cline{1-2}
~&Takes a boolean value specifying whether item is persistent (1) or not (0). The default value is 1. A non persistent item doesn\textquotesingle{}t save its values when saved. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  editable }&{\ttfamily  \mbox{[}1 or 0\mbox{]} }\\\cline{1-2}
~&Takes a boolean value specifying whether item is editable (1) or not (0). The default value is 1. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  visible }&{\ttfamily  \mbox{[}1 or 0\mbox{]} }\\\cline{1-2}
~&Takes a boolean value specifying whether item is visible (1) or not (0). The default value is 1. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  style }&{\ttfamily  \mbox{[}item style\mbox{]} }\\\cline{1-2}
~&This is the item\textquotesingle{}s style. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  widget }&{\ttfamily  \mbox{[}item widget\mbox{]} }\\\cline{1-2}
~&This is the item\textquotesingle{}s widget, for cases where a widget differs than the default assigned to the type is desired. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
\multicolumn{2}{|p{(\linewidth-\tabcolsep*3-\arrayrulewidth*1)*2/3}|}{

\label{epcref_sec_items_bool}%
\Hypertarget{epcref_sec_items_bool}%
\hyperlink{epcref_sec_quickaccess}{Bool item sub blocks}

}\\\cline{1-3}
{\bfseries  bool }&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{
\begin{DoxyCode}
item \{
  ..
    \textcolor{keywordtype}{bool} \{
        \textcolor{keywordflow}{default}: \textcolor{keyword}{true};
    \}
  ..
\}
\end{DoxyCode}
}\\\cline{1-3}
~&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{

}\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  default }&{\ttfamily  \mbox{[}true or false\mbox{]} }\\\cline{1-2}
~&Takes a boolean value specifying whether item is checked (true) or not (false). \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
\multicolumn{2}{|p{(\linewidth-\tabcolsep*3-\arrayrulewidth*1)*2/3}|}{

\label{epcref_sec_items_int}%
\Hypertarget{epcref_sec_items_int}%
\hyperlink{epcref_sec_quickaccess}{Int item sub blocks}

}\\\cline{1-3}
{\bfseries  int }&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{
\begin{DoxyCode}
item \{
  ..
    \textcolor{keywordtype}{int} \{
        \textcolor{keywordflow}{default}: 150;
        min: 0;
        max: 300;
    \}
  ..
\}
\end{DoxyCode}
}\\\cline{1-3}
~&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{

}\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  default }&{\ttfamily  \mbox{[}value\mbox{]} }\\\cline{1-2}
~&Set a default (initial) value to the item. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  min }&{\ttfamily  \mbox{[}value\mbox{]} }\\\cline{1-2}
~&Set a minimum value to the item. Note that, without a minimum value, the widget implementing the item visually will get an available range of values bound to the minimum of the least integer number representable, and it might not be what you want.

\\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  max }&{\ttfamily  \mbox{[}value\mbox{]} }\\\cline{1-2}
~&Set a maximum value to the item. Note that, without a maximum value, the widget implementing the item visually will get an available range of values bound to the maximum of the least integer number representable, and it might not be what you want. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
\multicolumn{2}{|p{(\linewidth-\tabcolsep*3-\arrayrulewidth*1)*2/3}|}{

\label{epcref_sec_items_float}%
\Hypertarget{epcref_sec_items_float}%
\hyperlink{epcref_sec_quickaccess}{Float item sub blocks}

}\\\cline{1-3}
{\bfseries  float }&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{
\begin{DoxyCode}
item \{
  ..
    \textcolor{keywordtype}{float} \{
        \textcolor{keywordflow}{default}: 0.5;
        min: 0;
        max: 1;
    \}
  ..
\}
\end{DoxyCode}
}\\\cline{1-3}
~&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{

}\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  default }&{\ttfamily  \mbox{[}value\mbox{]} }\\\cline{1-2}
~&Set a default (initial) value to the item. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  min }&{\ttfamily  \mbox{[}value\mbox{]} }\\\cline{1-2}
~&Set a minimum value to the item. Note that, without a minimum value, the widget implementing the item visually will get an available range of values bound to the minimum of the least floating point number representable, and it might not be what you want. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  max }&{\ttfamily  \mbox{[}value\mbox{]} }\\\cline{1-2}
~&Set a maximum value to the item. Note that, without a maximum value, the widget implementing the item visually will get an available range of values bound to the maximum of the least floating point number representable, and it might not be what you want. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
\multicolumn{2}{|p{(\linewidth-\tabcolsep*3-\arrayrulewidth*1)*2/3}|}{

\label{epcref_sec_items_date}%
\Hypertarget{epcref_sec_items_date}%
\hyperlink{epcref_sec_quickaccess}{Date item sub blocks}

}\\\cline{1-3}
{\bfseries  date }&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{
\begin{DoxyCode}
item \{
  ..
    date \{
        \textcolor{keywordflow}{default}: 2012 11 05;
        min: 1900 1 1;
        max: 2200 12 31;
    \}
  ..
\}
\end{DoxyCode}
}\\\cline{1-3}
~&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{

}\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  default }&{\ttfamily  \mbox{[}year month date\mbox{]} or \char`\"{}today\char`\"{} }\\\cline{1-2}
~&Set a default (initial) date to the item. \char`\"{}today\char`\"{} will translate to current date. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  min }&{\ttfamily  \mbox{[}year month date\mbox{]} or \char`\"{}today\char`\"{} }\\\cline{1-2}
~&Set a minimum date to the item. \char`\"{}today\char`\"{} will translate to current date. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  max }&{\ttfamily  \mbox{[}year month date\mbox{]} or \char`\"{}today\char`\"{} }\\\cline{1-2}
~&Set a maximum date to the item. \char`\"{}today\char`\"{} will translate to current date. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
\multicolumn{2}{|p{(\linewidth-\tabcolsep*3-\arrayrulewidth*1)*2/3}|}{

\label{epcref_sec_items_text}%
\Hypertarget{epcref_sec_items_text}%
\hyperlink{epcref_sec_quickaccess}{Text item sub blocks}

}\\\cline{1-3}
{\bfseries  text }&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{
\begin{DoxyCode}
item \{
  ..
    text \{
        \textcolor{keywordflow}{default}: \textcolor{stringliteral}{"Default text"};
        placeholder: \textcolor{stringliteral}{"Text:"};
        accept: \textcolor{stringliteral}{"^[a-zA-Z ]$"};
        deny: \textcolor{stringliteral}{""};
    \}
  ..
\}
\end{DoxyCode}
}\\\cline{1-3}
~&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{

}\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  default }&{\ttfamily  \mbox{[}a string of text\mbox{]} }\\\cline{1-2}
~&Set a default text. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  placeholder }&{\ttfamily  \mbox{[}a string of text\mbox{]} }\\\cline{1-2}
~&Set a placeholder. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  accept }&{\ttfamily  \mbox{[}regular expression\mbox{]} }\\\cline{1-2}
~&Set an acceptance regular expression. It must be a valid one. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  deny }&{\ttfamily  \mbox{[}regular expression\mbox{]} }\\\cline{1-2}
~&Set a denial regular expression. It must be a valid one. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
\multicolumn{2}{|p{(\linewidth-\tabcolsep*3-\arrayrulewidth*1)*2/3}|}{

\label{epcref_sec_items_textarea}%
\Hypertarget{epcref_sec_items_textarea}%
\hyperlink{epcref_sec_quickaccess}{Text Area item sub blocks}

}\\\cline{1-3}
{\bfseries  textarea }&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{
\begin{DoxyCode}
item \{
  ..
    textarea \{
        \textcolor{keywordflow}{default}: \textcolor{stringliteral}{"Default text"};
        placeholder: \textcolor{stringliteral}{"No Numbers!"};
        accept: \textcolor{stringliteral}{""};
        deny: \textcolor{stringliteral}{"^[0-9]*$"};
    \}
  ..
\}
\end{DoxyCode}
}\\\cline{1-3}
~&\multicolumn{2}{p{(\linewidth-\tabcolsep*3-\arrayrulewidth*2)*2/3}|}{

}\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  default }&{\ttfamily  \mbox{[}a string of text\mbox{]} }\\\cline{1-2}
~&Set a default text. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  placeholder }&{\ttfamily  \mbox{[}a string of text\mbox{]} }\\\cline{1-2}
~&Set a placeholder. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  accept }&{\ttfamily  \mbox{[}regular expression\mbox{]} }\\\cline{1-2}
~&Set an acceptance regular expression. It must be a valid one. \\\cline{1-2}
\end{tabularx}


\\\cline{1-3}
~&\begin{tabularx}{\linewidth}{|*{2}{>{\raggedright\arraybackslash}X|}}\hline
{\ttfamily  deny }&{\ttfamily  \mbox{[}regular expression\mbox{]} }\\\cline{1-2}
~&Set a denial regular expression. It must be a valid one. \\\cline{1-2}
\end{tabularx}
\\\cline{1-3}
\end{longtabu}
