Toolbar widgets have support to items with menus.

This kind of item will display a menu when selected by the user.

Let\textquotesingle{}s start populating a toolbar with some regular items, the same way we started \mbox{\hyperlink{toolbar_example_02}{Toolbar Example 2}}.  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   tb = \mbox{\hyperlink{group__Elm__Toolbar_ga0c0841ae232ebd6a9628b868d4e95b6f}{elm\_toolbar\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga2af897b00f32bebf08705929276386f5}{evas\_object\_size\_hint\_weight\_set}}(tb, 0.0, 0.0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga44b67b368e5cda723129c2852bd81ead}{evas\_object\_size\_hint\_align\_set}}(tb, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}}, 0.0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(tb);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Toolbar_ga0c0738e7d5aba471520113b15184be6e}{elm\_toolbar\_item\_append}}(tb, \textcolor{stringliteral}{"{}document-\/print"{}}, \textcolor{stringliteral}{"{}Print"{}}, NULL, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Toolbar_ga0c0738e7d5aba471520113b15184be6e}{elm\_toolbar\_item\_append}}(tb, \textcolor{stringliteral}{"{}folder-\/new"{}}, \textcolor{stringliteral}{"{}Folder"{}}, NULL, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Toolbar_ga0c0738e7d5aba471520113b15184be6e}{elm\_toolbar\_item\_append}}(tb, \textcolor{stringliteral}{"{}clock"{}}, \textcolor{stringliteral}{"{}Clock"{}}, NULL, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Toolbar_ga0c0738e7d5aba471520113b15184be6e}{elm\_toolbar\_item\_append}}(tb, \textcolor{stringliteral}{"{}refresh"{}}, \textcolor{stringliteral}{"{}Update"{}}, NULL, NULL);}

\end{DoxyCodeInclude}
 The only difference is that we\textquotesingle{}ll keep the default shrink mode, that adds an item with a menu of hidden items.

So, a important thing to do is to set a parent for toolbar menus, or they will use the toolbar as parent, and its size will be restricted to that. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Toolbar_ga7521ff3cdc135c0dd7a0e6d325db7b1e}{elm\_toolbar\_menu\_parent\_set}}(tb, win);}

\end{DoxyCodeInclude}
 Not only items\textquotesingle{} menus will respect this parent, but also the own toolbar menu, used to show hidden items.

Next, let\textquotesingle{}s add an item set to display a menu\+: 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   tb\_it = \mbox{\hyperlink{group__Elm__Toolbar_ga0c0738e7d5aba471520113b15184be6e}{elm\_toolbar\_item\_append}}(tb, \textcolor{stringliteral}{"{}mail-\/send"{}}, \textcolor{stringliteral}{"{}Send Mail"{}}, NULL, NULL);}
\DoxyCodeLine{   elm\_toolbar\_item\_menu\_set(tb\_it, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}

\end{DoxyCodeInclude}
 Now, to add two options to this item, we can get the menu object and use it as a regular elm\+\_\+menu. See \mbox{\hyperlink{tutorial_menu}{Menu example}} for more about menu widget. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   menu = elm\_toolbar\_item\_menu\_get(tb\_it);}
\DoxyCodeLine{   elm\_menu\_item\_add(menu, NULL, \textcolor{stringliteral}{"{}emptytrash"{}}, \textcolor{stringliteral}{"{}Empty Trash"{}}, NULL, NULL);}
\DoxyCodeLine{   elm\_menu\_item\_add(menu, NULL, \textcolor{stringliteral}{"{}trashcan\_full"{}}, \textcolor{stringliteral}{"{}Full Trash"{}}, NULL, NULL);}

\end{DoxyCodeInclude}
 See \mbox{\hyperlink{toolbar_example_03_8c-example}{toolbar\+\_\+example\+\_\+03.c}}, whose window should look like this picture\+:

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