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 \hyperlink{toolbar_example_02}{Toolbar Example 2}.  
\begin{DoxyCodeInclude}
   tb = elm_toolbar_add(win);
   evas\_object\_size\_hint\_weight\_set(tb, 0.0, 0.0);
   evas\_object\_size\_hint\_align\_set(tb, EVAS\_HINT\_FILL, 0.0);
   evas\_object\_show(tb);

   elm_toolbar_item_append(tb, \textcolor{stringliteral}{"document-print"}, \textcolor{stringliteral}{"Print"}, NULL, NULL);
   elm_toolbar_item_append(tb, \textcolor{stringliteral}{"folder-new"}, \textcolor{stringliteral}{"Folder"}, NULL, NULL);
   elm_toolbar_item_append(tb, \textcolor{stringliteral}{"clock"}, \textcolor{stringliteral}{"Clock"}, NULL, NULL);
   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}
   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}
   tb\_it = elm_toolbar_item_append(tb, \textcolor{stringliteral}{"mail-send"}, \textcolor{stringliteral}{"Send Mail"}, NULL, NULL);
   elm\_toolbar\_item\_menu\_set(tb\_it, 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 \hyperlink{tutorial_menu}{Menu example} for more about menu widget. 
\begin{DoxyCodeInclude}
   menu = elm\_toolbar\_item\_menu\_get(tb\_it);
   elm_menu_item_add(menu, NULL, \textcolor{stringliteral}{"emptytrash"}, \textcolor{stringliteral}{"Empty Trash"}, NULL, NULL);
   elm_menu_item_add(menu, NULL, \textcolor{stringliteral}{"trashcan\_full"}, \textcolor{stringliteral}{"Full Trash"}, NULL, NULL);

\end{DoxyCodeInclude}


See \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}
 