As a general overview of Elm\+\_\+\+Entry we are going to write an, albeit simple, functional editor.

Although intended to show how elm\+\_\+entry works, this example also makes extensive use of several other widgets. The full code can be found in \mbox{\hyperlink{entry_example_8c-example}{entry\+\_\+example.c}} and in the following lines we\textquotesingle{}ll go through the parts especific to the Elm\+\_\+\+Entry widget.

The program itself is a simple editor, with a file already set to it, that can be set to autosave or not and allows insertion of emoticons and some formatted text. As of this writing, the capabilities of format edition in the entry are very limited, so a lot of manual work is required to change the current text.

In any case, the program allows some changes by using the buttons on the top of the window and returning focus back to the main entry afterwards.

 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{screenshots/entry_example}}
\end{DoxyImageNoCaption}


We\textquotesingle{}ll begin by showing a few structures used throught the program. First, the application owns data that holds the main window and the main entry where the editting happens. Then, an auxiliary structure we\textquotesingle{}ll use later when inserting icons in our text.  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *win;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *edit\_buffer;}
\DoxyCodeLine{\}\ App\_Data;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{typedef}\ \textcolor{keyword}{struct}}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *inwin;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *naviframe;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *grid;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *settings;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ size;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ vsize;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ width,\ height;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *emo;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ App\_Data\ *ad;}
\DoxyCodeLine{\}\ App\_Inwin\_Data;}

\end{DoxyCodeInclude}
 A little convenience function will insert whatever text we need in the buffer at the current cursor\textquotesingle{}s position and set focus back to this entry. This is done mostly because clicking on any button will make them steal focus, which makes writing text more cumbersome. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_edit\_buffer\_insert(\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *e,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *text)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Entry__Group_gacf27a8e1b5f1af931284fb840c7251b0}{elm\_entry\_entry\_insert}}(e,\ text);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Focus_ga05e39b5e60ad861c63100c811855ef55}{elm\_object\_focus\_set}}(e,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 One of the buttons on the top will trigger an Elm\+\_\+\+Inwin to open and show us several icons we can insert into the text. We\textquotesingle{}ll jump over most of these functions, but when all the options are chosen, we insert the special markup text that will show the chosen icon in place. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_btn\_insert\_cb(\textcolor{keywordtype}{void}\ *data,\ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *obj\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keywordtype}{void}\ *event\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ App\_Inwin\_Data\ *aid\ =\ data;}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *size[]\ =\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}size"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}absize"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}relsize"{}}}
\DoxyCodeLine{\ \ \ \};}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *vsize[]\ =\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}full"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}ascent"{}}}
\DoxyCodeLine{\ \ \ \};}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{char}\ buf[512];}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ snprintf(buf,\ \textcolor{keyword}{sizeof}(buf),\ \textcolor{stringliteral}{"{}<item\ \%s=\%dx\%d\ vsize=\%s\ href=emoticon/\%s>"{}}}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}</item>"{}},\ size[aid-\/>size],\ aid-\/>width,\ aid-\/>height,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ vsize[aid-\/>vsize],\ aid-\/>emo);}
\DoxyCodeLine{\ \ \ \_edit\_buffer\_insert(aid-\/>ad-\/>edit\_buffer,\ buf);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9217cf1d90690dbd1960db155d1c7476}{evas\_object\_del}}(aid-\/>inwin);}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 As can be seen in that function, the program lets us add icons to our entry using all the possible configurations for them. That should help to clarify how the different combinations work out by actually seeing them in action.

The same popup window has a page to set the settings of the chosen icon, that is, the size and how the item will be placed within the line.

The size is done with two entries, limitted to accept numbers and a fixed size of characters. Changing the value in this entries will update the icon size in our struct as seen in the next two callbacks. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_width\_changed\_cb(\textcolor{keywordtype}{void}\ *data,\ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *obj,\ \textcolor{keywordtype}{void}\ *event\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ App\_Inwin\_Data\ *aid\ =\ data;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ aid-\/>width\ =\ atoi(elm\_object\_text\_get(obj));}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_height\_changed\_cb(\textcolor{keywordtype}{void}\ *data,\ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *obj,\ \textcolor{keywordtype}{void}\ *event\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ App\_Inwin\_Data\ *aid\ =\ data;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ aid-\/>height\ =\ atoi(elm\_object\_text\_get(obj));}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 The rest of the options are handled with radio buttons, since only one type of size can be used ({\ttfamily size}, {\ttfamily absize} or {\ttfamily relsize}) and for the vertical sizing it needs to choose between {\ttfamily ascent} and {\ttfamily full}. Depending on which is chosen, the {\ttfamily item} tag is formed accordingly as seen before. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *}
\DoxyCodeLine{\_page\_settings\_add(\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *parent,\ App\_Inwin\_Data\ *aid)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *box,\ *sizeopts,\ *box2,\ *sizebox,\ *vsizebox,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *rsize,\ *rabsize,\ *rrelsize,\ *rvfull,\ *rvascent,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *fwidth,\ *ewidth,\ *fheight,\ *eheight,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *binsert;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{char}\ buf[100];}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{static}\ \mbox{\hyperlink{struct__Elm__Entry__Filter__Accept__Set}{Elm\_Entry\_Filter\_Accept\_Set}}\ accept\_set\ =\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ .\mbox{\hyperlink{struct__Elm__Entry__Filter__Accept__Set_a80eee21723a962770265662319a3f016}{accepted}}\ =\ \textcolor{stringliteral}{"{}0123456789"{}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ .rejected\ =\ NULL}
\DoxyCodeLine{\ \ \ \};}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{static}\ \mbox{\hyperlink{struct__Elm__Entry__Filter__Limit__Size}{Elm\_Entry\_Filter\_Limit\_Size}}\ limit\_size\ =\ \{}
\DoxyCodeLine{\ \ \ \ \ \ \ \ .\mbox{\hyperlink{struct__Elm__Entry__Filter__Limit__Size_aea7ee771a6525ed549ca5c797e04be7a}{max\_char\_count}}\ =\ 5,}
\DoxyCodeLine{\ \ \ \ \ \ \ \ .max\_byte\_count\ =\ 0}
\DoxyCodeLine{\ \ \ \};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ box\ =\ \mbox{\hyperlink{group__Elm__Box__Group_ga49ec615c90bf8bead2158d5ffab2e445}{elm\_box\_add}}(parent);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(box,\ \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}},\ \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(box,\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}},\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ sizeopts\ =\ \mbox{\hyperlink{group__Elm__Frame__Group_ga7a1801e032f479332d8c68b17bc2e0bf}{elm\_frame\_add}}(parent);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(sizeopts,\ \textcolor{stringliteral}{"{}Size"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(sizeopts,\ \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}},\ 0.0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(sizeopts,\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}},\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(box,\ sizeopts);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(sizeopts);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ box2\ =\ \mbox{\hyperlink{group__Elm__Box__Group_ga49ec615c90bf8bead2158d5ffab2e445}{elm\_box\_add}}(parent);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(box2,\ \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}},\ \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(box2,\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}},\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}});}
\DoxyCodeLine{\ \ \ elm\_object\_content\_set(sizeopts,\ box2);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(box2);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ sizebox\ =\ \mbox{\hyperlink{group__Elm__Box__Group_ga49ec615c90bf8bead2158d5ffab2e445}{elm\_box\_add}}(parent);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga447f790a64a49b477019938dc3d5c3ff}{elm\_box\_horizontal\_set}}(sizebox,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(sizebox,\ \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(sizebox,\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}},\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(box2,\ sizebox);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(sizebox);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ rsize\ =\ \mbox{\hyperlink{group__Elm__Radio__Group_ga55ac57f03ef5a581b1fee0dce02961d2}{elm\_radio\_add}}(parent);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(rsize,\ \textcolor{stringliteral}{"{}Scale\ adjusted\ (size)"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Radio__Group_gac67d20c6bccac5b1ed81cddd76880235}{elm\_radio\_state\_value\_set}}(rsize,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Radio__Group_gae96fc2cfbb4c864641eb997a96dfa6e4}{elm\_radio\_value\_pointer\_set}}(rsize,\ \&aid-\/>size);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(sizebox,\ rsize);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(rsize);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ rabsize\ =\ \mbox{\hyperlink{group__Elm__Radio__Group_ga55ac57f03ef5a581b1fee0dce02961d2}{elm\_radio\_add}}(parent);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(rabsize,\ \textcolor{stringliteral}{"{}Absolute\ size\ (absize)"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Radio__Group_gac67d20c6bccac5b1ed81cddd76880235}{elm\_radio\_state\_value\_set}}(rabsize,\ 1);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Radio__Group_gae96fc2cfbb4c864641eb997a96dfa6e4}{elm\_radio\_value\_pointer\_set}}(rabsize,\ \&aid-\/>size);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Radio__Group_gaa597f8aaad338c0221dada51ac7e110f}{elm\_radio\_group\_add}}(rabsize,\ rsize);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(sizebox,\ rabsize);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(rabsize);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ rrelsize\ =\ \mbox{\hyperlink{group__Elm__Radio__Group_ga55ac57f03ef5a581b1fee0dce02961d2}{elm\_radio\_add}}(parent);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(rrelsize,\ \textcolor{stringliteral}{"{}Relative\ to\ line\ (relsize)"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Radio__Group_gac67d20c6bccac5b1ed81cddd76880235}{elm\_radio\_state\_value\_set}}(rrelsize,\ 2);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Radio__Group_gae96fc2cfbb4c864641eb997a96dfa6e4}{elm\_radio\_value\_pointer\_set}}(rrelsize,\ \&aid-\/>size);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Radio__Group_gaa597f8aaad338c0221dada51ac7e110f}{elm\_radio\_group\_add}}(rrelsize,\ rsize);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(sizebox,\ rrelsize);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(rrelsize);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ vsizebox\ =\ \mbox{\hyperlink{group__Elm__Box__Group_ga49ec615c90bf8bead2158d5ffab2e445}{elm\_box\_add}}(parent);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga447f790a64a49b477019938dc3d5c3ff}{elm\_box\_horizontal\_set}}(vsizebox,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(vsizebox,\ \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(vsizebox,\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}},\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(box2,\ vsizebox);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(vsizebox);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ rvfull\ =\ \mbox{\hyperlink{group__Elm__Radio__Group_ga55ac57f03ef5a581b1fee0dce02961d2}{elm\_radio\_add}}(parent);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(rvfull,\ \textcolor{stringliteral}{"{}Full\ height\ (vsize=full)"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Radio__Group_gac67d20c6bccac5b1ed81cddd76880235}{elm\_radio\_state\_value\_set}}(rvfull,\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Radio__Group_gae96fc2cfbb4c864641eb997a96dfa6e4}{elm\_radio\_value\_pointer\_set}}(rvfull,\ \&aid-\/>vsize);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(vsizebox,\ rvfull);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(rvfull);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ rvascent\ =\ \mbox{\hyperlink{group__Elm__Radio__Group_ga55ac57f03ef5a581b1fee0dce02961d2}{elm\_radio\_add}}(parent);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(rvascent,\ \textcolor{stringliteral}{"{}Ascent\ only\ (vsize=ascent)"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Radio__Group_gac67d20c6bccac5b1ed81cddd76880235}{elm\_radio\_state\_value\_set}}(rvascent,\ 1);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Radio__Group_gae96fc2cfbb4c864641eb997a96dfa6e4}{elm\_radio\_value\_pointer\_set}}(rvascent,\ \&aid-\/>vsize);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Radio__Group_gaa597f8aaad338c0221dada51ac7e110f}{elm\_radio\_group\_add}}(rvascent,\ rvfull);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(vsizebox,\ rvascent);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(rvascent);}

\end{DoxyCodeInclude}
 The first of our entries is here. There\textquotesingle{}s something worth mentioning about the way we\textquotesingle{}ll create this one. Normally, any entry regardless of whether is single line or not, will be set to scrollable, but in this case, since we are limitting how many characters can fit in them and we know we don\textquotesingle{}t need scrolling, we are not setting this flag. This makes the entry have virtually no appearance on screen, other than its text. This is because an entry is just that, a box that holds text, and in order to have some frame around it or a background color, another widget needs to provide this. When an entry is scrollable, the same scroller used internally does this. We are using frames here to provide some decoration around, then creating our entries, set them to single line, add our two filters and the callback for when their value change. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ fwidth\ =\ \mbox{\hyperlink{group__Elm__Frame__Group_ga7a1801e032f479332d8c68b17bc2e0bf}{elm\_frame\_add}}(parent);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(fwidth,\ \textcolor{stringliteral}{"{}Width"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(fwidth,\ \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}},\ 0.0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(fwidth,\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}},\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(box2,\ fwidth);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(fwidth);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ snprintf(buf,\ \textcolor{keyword}{sizeof}(buf),\ \textcolor{stringliteral}{"{}\%d"{}},\ aid-\/>width);}
\DoxyCodeLine{\ \ \ ewidth\ =\ \mbox{\hyperlink{group__Elm__Entry__Group_gafb201886fc4ee715d229ad2fddfe2ee7}{elm\_entry\_add}}(parent);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Entry__Group_ga96e162d7def2bbba34c5449d51f87fdd}{elm\_entry\_single\_line\_set}}(ewidth,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Entry__Group_ga183c0a0afb4a25eaf677deb3c544a8b6}{elm\_entry\_markup\_filter\_append}}(ewidth,\ \mbox{\hyperlink{group__Elm__Entry__Group_ga1e05b2bb8af5220b4705e9c719f6862d}{elm\_entry\_filter\_accept\_set}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \&accept\_set);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Entry__Group_ga183c0a0afb4a25eaf677deb3c544a8b6}{elm\_entry\_markup\_filter\_append}}(ewidth,\ \mbox{\hyperlink{group__Elm__Entry__Group_gad7c7596fbb344f228bfa47d890714681}{elm\_entry\_filter\_limit\_size}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \&limit\_size);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(ewidth,\ buf);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(ewidth,\ \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}},\ 0.0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(ewidth,\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}},\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}});}
\DoxyCodeLine{\ \ \ elm\_object\_content\_set(fwidth,\ ewidth);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(ewidth);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Smart__Object__Group_gac12dd6655f488cc47ce6cf00eb7d12b2}{evas\_object\_smart\_callback\_add}}(ewidth,\ \textcolor{stringliteral}{"{}changed"{}},\ \_width\_changed\_cb,\ aid);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ fheight\ =\ \mbox{\hyperlink{group__Elm__Frame__Group_ga7a1801e032f479332d8c68b17bc2e0bf}{elm\_frame\_add}}(parent);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(fheight,\ \textcolor{stringliteral}{"{}Height"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(fheight,\ \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}},\ 0.0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(fheight,\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}},\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(box2,\ fheight);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(fheight);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ snprintf(buf,\ \textcolor{keyword}{sizeof}(buf),\ \textcolor{stringliteral}{"{}\%d"{}},\ aid-\/>height);}
\DoxyCodeLine{\ \ \ eheight\ =\ \mbox{\hyperlink{group__Elm__Entry__Group_gafb201886fc4ee715d229ad2fddfe2ee7}{elm\_entry\_add}}(parent);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Entry__Group_ga96e162d7def2bbba34c5449d51f87fdd}{elm\_entry\_single\_line\_set}}(eheight,\ \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Entry__Group_ga183c0a0afb4a25eaf677deb3c544a8b6}{elm\_entry\_markup\_filter\_append}}(eheight,\ \mbox{\hyperlink{group__Elm__Entry__Group_ga1e05b2bb8af5220b4705e9c719f6862d}{elm\_entry\_filter\_accept\_set}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \&accept\_set);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Entry__Group_ga183c0a0afb4a25eaf677deb3c544a8b6}{elm\_entry\_markup\_filter\_append}}(eheight,\ \mbox{\hyperlink{group__Elm__Entry__Group_gad7c7596fbb344f228bfa47d890714681}{elm\_entry\_filter\_limit\_size}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \&limit\_size);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(eheight,\ buf);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(eheight,\ \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}},\ 0.0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(eheight,\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}},\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}});}
\DoxyCodeLine{\ \ \ elm\_object\_content\_set(fheight,\ eheight);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(eheight);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Smart__Object__Group_gac12dd6655f488cc47ce6cf00eb7d12b2}{evas\_object\_smart\_callback\_add}}(eheight,\ \textcolor{stringliteral}{"{}changed"{}},\ \_height\_changed\_cb,\ aid);}

\end{DoxyCodeInclude}
 This function ends with the button that will finally call the item into our editting string. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ binsert\ =\ \mbox{\hyperlink{group__Elm__Button_gaf5caf46d74c4e122a18da323935d25e4}{elm\_button\_add}}(parent);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(binsert,\ \textcolor{stringliteral}{"{}Insert"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(box,\ binsert);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(binsert);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Smart__Object__Group_gac12dd6655f488cc47ce6cf00eb7d12b2}{evas\_object\_smart\_callback\_add}}(binsert,\ \textcolor{stringliteral}{"{}clicked"{}},\ \_btn\_insert\_cb,\ aid);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ box;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 Then we get to the format edition. Here we can add the {\ttfamily bold} and {\ttfamily emphasis} tags to parts of our text. There\textquotesingle{}s a lot of manual work to know what to do here, since we are not implementing an entire state manager and the entry itself doesn\textquotesingle{}t, yet, support all the needed capabilities to make this simpler. We begin by getting the format we are using in our function from the button pressed. 
\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
 Next we need to find out if we need to insert an opening or a closing tag. For this, we store the current cursor position and create a selection from this point until the beginning of our text, and then get the selected text to look for any existing format tags in it. This is currently the only way in which we can find out what formats is being used in the entry. 
\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
 Once we know what tag to insert, we need a second check in the case it was a closing tag. This is because any other closing tag that comes after would be left dangling alone, so we need to remove it to keep the text consistent. 
\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
Finally, we clear our fake selections and return the cursor back to the position it had at first, since there is where we want to insert our format. 
\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
 And finish by calling our convenience function from before, to insert the text at the current cursor and give focus back to the entry. 
\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
 A checkbox on the top of our program tells us if the text we are editing will autosave or not. In it\textquotesingle{}s {\ttfamily \char`\"{}changed\char`\"{}} callback we get the value from the checkbox and call the \mbox{\hyperlink{group__Elm__Entry__Group_gaf11dbad4cd1e5309fb655910e4f14771}{elm\+\_\+entry\+\_\+autosave\+\_\+set()}} function with it. If autosave is set, we also call \mbox{\hyperlink{group__Elm__Entry__Group_gaa44cb80b64207a3706fad36d35e92bc7}{elm\+\_\+entry\+\_\+file\+\_\+save()}}. This is so the internal timer used to periodically store to disk our changes is started. 
\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
 Two more functions to show some cursor playing. Whenever we double click anywhere on our entry, we\textquotesingle{}ll find what word is the cursor placed at and select it. Likewise, for triple clicking, we select the entire line. 
\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
 And finally, the main window of the program contains the entry where we do all the edition and some helping widgets to change format, add icons or change the autosave flag. 
\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
 And the main entry of the program. Set to scroll, by default we disable autosave and we\textquotesingle{}ll begin with a file set to it because no file selector is being used here. The file is loaded with \mbox{\hyperlink{group__Elm__General_gga0813d45294f8b2213aeded2ddebe627ea1175b97770899a9423de08909a7d762c}{ELM\+\_\+\+TEXT\+\_\+\+FORMAT\+\_\+\+MARKUP\+\_\+\+UTF8}} so that any format contained in it is interpreted, otherwise the entry would load it as just text, escaping any tags found and no format or icons would be shown. Then we connect to the double and triple click signals and set focus on the entry so we can start typing right away. 
\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
