This code places an Elementary file selector entry widget on a window, along with some other checkboxes.

Those are there just as knobs on the file selector entry\textquotesingle{}s state.

Here\textquotesingle{}s how we instantiate it\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ ic\ =\ \mbox{\hyperlink{group__Elm__Icon_gac369f2d67be417e5cff81e8f001ff326}{elm\_icon\_add}}(win);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Icon_gab764b4c6c90543f254c013eff6a6db66}{elm\_icon\_standard\_set}}(ic,\ \textcolor{stringliteral}{"{}file"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gab09d6bf93b5435230b41ceca2abe783a}{evas\_object\_size\_hint\_aspect\_set}}(ic,\ \mbox{\hyperlink{Evas__Common_8h_ac68b577b7c0b79c356f01926e4a8099faeaf1e019f2dbfbbc2da9ab1fe1f175f6}{EVAS\_ASPECT\_CONTROL\_VERTICAL}},\ 1,\ 1);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{/*\ file\ selector\ entry\ */}}
\DoxyCodeLine{\ \ \ fs\_entry\ =\ \mbox{\hyperlink{group__Elm__File__Selector__Entry_ga3f9edab2eff01d8c498b6124409f526c}{elm\_fileselector\_entry\_add}}(win);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(fs\_entry,\ \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}},\ 0);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Fileselector_ga0a29bfd628ae0dc1cc0d1a3334580802}{elm\_fileselector\_path\_set}}(fs\_entry,\ \textcolor{stringliteral}{"{}/tmp"{}});}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(fs\_entry,\ \textcolor{stringliteral}{"{}Select\ a\ file"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__General_ga0531ec8867c72def7c780601764ca642}{elm\_object\_part\_content\_set}}(fs\_entry,\ \textcolor{stringliteral}{"{}button\ icon"{}},\ ic);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(vbox,\ fs\_entry);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(fs\_entry);}

\end{DoxyCodeInclude}
 Note that we set on it\textquotesingle{}s button both icon and label decorations. It\textquotesingle{}s set to exhibit the path of (and list the contents of, when internal file selector is launched) the {\ttfamily \char`\"{}/tmp\char`\"{}} directory, also, with \mbox{\hyperlink{group__Elm__File__Selector__Entry_gaa6be3beb4e8dbc297c8e426ae0df4b53}{elm\+\_\+fileselector\+\_\+entry\+\_\+path\+\_\+set()}}. What follows are checkboxes to exercise some of its API functions\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\ \ \ ck\ =\ \mbox{\hyperlink{group__Elm__Check_ga467a6a6215c116a18664aa40fc95f4e3}{elm\_check\_add}}(win);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(ck,\ \textcolor{stringliteral}{"{}editable\ selection"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Check_gaa011e6d86f82142698760cf0cc4fd0a4}{elm\_check\_state\_set}}(ck,\ \mbox{\hyperlink{group__Elm__Fileselector_ga72f29bc1a9070aea636d95188717ee14}{elm\_fileselector\_is\_save\_get}}(fs\_entry));}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Smart__Object__Group_gac12dd6655f488cc47ce6cf00eb7d12b2}{evas\_object\_smart\_callback\_add}}(ck,\ \textcolor{stringliteral}{"{}changed"{}},\ \_current\_sel\_toggle,\ fs\_entry);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(hbox,\ ck);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(ck);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ ck\ =\ \mbox{\hyperlink{group__Elm__Check_ga467a6a6215c116a18664aa40fc95f4e3}{elm\_check\_add}}(win);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(ck,\ \textcolor{stringliteral}{"{}\(\backslash\)"{}inwin\(\backslash\)"{}\ mode"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Check_gaa011e6d86f82142698760cf0cc4fd0a4}{elm\_check\_state\_set}}(ck,\ elm\_fileselector\_entry\_inwin\_mode\_get(fs\_entry));}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Smart__Object__Group_gac12dd6655f488cc47ce6cf00eb7d12b2}{evas\_object\_smart\_callback\_add}}(ck,\ \textcolor{stringliteral}{"{}changed"{}},\ \_inwin\_mode\_toggle,\ fs\_entry);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(hbox,\ ck);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(ck);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ ck\ =\ \mbox{\hyperlink{group__Elm__Check_ga467a6a6215c116a18664aa40fc95f4e3}{elm\_check\_add}}(win);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(ck,\ \textcolor{stringliteral}{"{}folders\ only"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Check_gaa011e6d86f82142698760cf0cc4fd0a4}{elm\_check\_state\_set}}(ck,\ \mbox{\hyperlink{group__Elm__Fileselector_ga0a195d1435ed3440fcfb0a6d799ae68e}{elm\_fileselector\_folder\_only\_get}}(fs\_entry));}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Smart__Object__Group_gac12dd6655f488cc47ce6cf00eb7d12b2}{evas\_object\_smart\_callback\_add}}(ck,\ \textcolor{stringliteral}{"{}changed"{}},\ \_folder\_only\_toggle,\ fs\_entry);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(hbox,\ ck);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(ck);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ ck\ =\ \mbox{\hyperlink{group__Elm__Check_ga467a6a6215c116a18664aa40fc95f4e3}{elm\_check\_add}}(win);}
\DoxyCodeLine{\ \ \ elm\_object\_text\_set(ck,\ \textcolor{stringliteral}{"{}expandable"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Check_gaa011e6d86f82142698760cf0cc4fd0a4}{elm\_check\_state\_set}}(ck,\ \mbox{\hyperlink{group__Elm__Fileselector_ga07ea4bc495413dd301a888c3413e9bd5}{elm\_fileselector\_expandable\_get}}(fs\_entry));}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Smart__Object__Group_gac12dd6655f488cc47ce6cf00eb7d12b2}{evas\_object\_smart\_callback\_add}}(ck,\ \textcolor{stringliteral}{"{}changed"{}},\ \_expandable\_toggle,\ fs\_entry);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(hbox,\ ck);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(ck);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Smart__Object__Group_gac12dd6655f488cc47ce6cf00eb7d12b2}{evas\_object\_smart\_callback\_add}}(fs\_entry,\ \textcolor{stringliteral}{"{}file,chosen"{}},\ \_file\_chosen,\ NULL);}

\end{DoxyCodeInclude}
 The checkboxes will toggle whether the file selector entry\textquotesingle{}s internal file selector\+:
\begin{DoxyItemize}
\item must have an editable text entry for file names (thus, be in \char`\"{}save dialog mode\char`\"{})
\item is to be raised as an \char`\"{}inner window\char`\"{} (note it\textquotesingle{}s the default behavior) or as a dedicated window
\item is to populate its view with folders only
\item is to expand its folders, in its view, {\bfseries{in place}}, and not repainting it entirely just with the contents of a sole directory.
\end{DoxyItemize}

Observe how the entry\textquotesingle{}s text will match the string coming from the {\ttfamily \char`\"{}file,chosen\char`\"{}} smart event\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{/*\ hook\ on\ the\ file,chosen\ smart\ callback\ */}}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_file\_chosen(\textcolor{keywordtype}{void}\ \ \ \ \ \ \ \ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *obj\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{void}\ \ \ \ \ \ \ \ *event\_info)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *file\ =\ event\_info;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (file)}
\DoxyCodeLine{\ \ \ \ \ printf(\textcolor{stringliteral}{"{}File\ chosen:\ \%s\(\backslash\)n"{}},\ file);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{else}}
\DoxyCodeLine{\ \ \ \ \ printf(\textcolor{stringliteral}{"{}File\ selection\ canceled.\(\backslash\)n"{}});}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
Whenever you dismiss or acknowledges the file selector, after it\textquotesingle{}s raised, the {\ttfamily event\+\_\+info} string will contain the last selection on it (if any was made).

Try, also, to type in a valid system path and, then, open the file selector\textquotesingle{}s window\+: it will start the file browsing there, for you.

This is how the example, just after called, should look like\+:

 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{fileselector_entry_example_00}}
\end{DoxyImageNoCaption}


Click on the file selector entry to raise its internal file selector, which will be contained on an {\bfseries{\char`\"{}inner window\char`\"{}}}\+:

 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{fileselector_entry_example_01}}
\end{DoxyImageNoCaption}


Toggle the \char`\"{}inwin mode\char`\"{} switch off and, if you click on the file selector entry again, you\textquotesingle{}ll get {\bfseries{two}} windows, the original one (note the last selection there!)

 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{fileselector_entry_example_02}}
\end{DoxyImageNoCaption}


and the file selector\textquotesingle{}s new one

 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{fileselector_entry_example_03}}
\end{DoxyImageNoCaption}


Play with the checkboxes to get the behavior changes on the file selector entry. The respective API calls on the widget coming from those knobs where shown in the code already.

See the full \mbox{\hyperlink{fileselector_entry_example_c}{source code}} for this example. 