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}
\begin{TabularC}{3}
\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{TabularC}{2}
\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{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  version }&{\ttfamily  \mbox{[}page version\mbox{]} }\\\cline{1-2}
~&The page's version. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  title }&{\ttfamily  \mbox{[}page title\mbox{]} }\\\cline{1-2}
~&Set page's title. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  subtitle }&{\ttfamily  \mbox{[}page subtitle\mbox{]} }\\\cline{1-2}
~&Set page's subtitle. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  style }&{\ttfamily  \mbox{[}page style\mbox{]} }\\\cline{1-2}
~&Set page's style. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  icon }&{\ttfamily  \mbox{[}page icon\mbox{]} }\\\cline{1-2}
~&Set page's icon. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


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

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

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

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

}\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  name }&{\ttfamily  \mbox{[}item name\mbox{]} }\\\cline{1-2}
~&The item's name, to be referred by the application. It must be unique within the page. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  type }&{\ttfamily  \mbox{[}T\-Y\-P\-E\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\-O\-L -\/ Checkbox. \item I\-N\-T -\/ Slider. \item F\-L\-O\-A\-T -\/ Slider. \item D\-A\-T\-E -\/ Date/time display and input widget. \item T\-E\-X\-T -\/ Single-\/line text entry. \item T\-E\-X\-T\-A\-R\-E\-A -\/ Text entry. \item L\-A\-B\-E\-L -\/ Read-\/only label. \item P\-A\-G\-E -\/ Prefs subpage object. \item S\-E\-P\-A\-R\-A\-T\-O\-R -\/ Line that serves only to divide and organize prefs item. \item S\-W\-A\-L\-L\-O\-W -\/ Swallows an Evas\-\_\-\-Object. \item S\-A\-V\-E -\/ Button that will get all the values bounded to items and save it on C\-F\-G file. \item A\-C\-T\-I\-O\-N -\/ Button that will emit a signal to .C file and call a smart callback. \item R\-E\-S\-E\-T -\/ Button that will return all the values bounded to items as default declared on .E\-P\-C file. \end{DoxyItemize}
\\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  label }&{\ttfamily  \mbox{[}a string to label\mbox{]} }\\\cline{1-2}
~&Set a string to item's label. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  icon }&{\ttfamily  \mbox{[}item icon\mbox{]} }\\\cline{1-2}
~&This is the item icon. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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't save its values when saved. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  style }&{\ttfamily  \mbox{[}item style\mbox{]} }\\\cline{1-2}
~&This is the item's style. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  widget }&{\ttfamily  \mbox{[}item widget\mbox{]} }\\\cline{1-2}
~&This is the item's widget, for cases where a widget differs than the default assigned to the type is desired. \\\cline{1-2}
\end{TabularC}


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

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

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

}\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


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

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

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

}\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  default }&{\ttfamily  \mbox{[}value\mbox{]} }\\\cline{1-2}
~&Set a default (initial) value to the item. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


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

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

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

}\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  default }&{\ttfamily  \mbox{[}value\mbox{]} }\\\cline{1-2}
~&Set a default (initial) value to the item. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


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

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

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

}\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


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

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

}\\\cline{1-2}
{\bfseries  text }&\multicolumn{2}{p{(\linewidth-\tabcolsep*2-\arrayrulewidth*2)*2/2}|}{
\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-2}
~&\multicolumn{2}{p{(\linewidth-\tabcolsep*2-\arrayrulewidth*2)*2/2}|}{

}\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  default }&{\ttfamily  \mbox{[}a string of text\mbox{]} }\\\cline{1-2}
~&Set a default text. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  placeholder }&{\ttfamily  \mbox{[}a string of text\mbox{]} }\\\cline{1-2}
~&Set a placeholder. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


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

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

}\\\cline{1-2}
{\bfseries  textarea }&\multicolumn{2}{p{(\linewidth-\tabcolsep*2-\arrayrulewidth*2)*2/2}|}{
\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-2}
~&\multicolumn{2}{p{(\linewidth-\tabcolsep*2-\arrayrulewidth*2)*2/2}|}{

}\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  default }&{\ttfamily  \mbox{[}a string of text\mbox{]} }\\\cline{1-2}
~&Set a default text. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\hline
{\ttfamily  placeholder }&{\ttfamily  \mbox{[}a string of text\mbox{]} }\\\cline{1-2}
~&Set a placeholder. \\\cline{1-2}
\end{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}


\\\cline{1-2}
~&\begin{TabularC}{2}
\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{TabularC}
\\\cline{1-2}
\end{TabularC}
