\section{menu.h File Reference}
\label{menu_8h}\index{menu.h@{menu.h}}
Interface to the ROX menu system. 

\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef gboolean($\ast$) {\bf ROXMenu\-Pre\-Filter} (Gtk\-Widget $\ast$menu, Gtk\-Widget $\ast$window, gpointer udata)
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
Gtk\-Widget $\ast$ {\bf rox\_\-menu\_\-build} (Gtk\-Widget $\ast$window, Gtk\-Item\-Factory\-Entry $\ast$menu\_\-items, int n\_\-menu, const gchar $\ast$menu\_\-name, const gchar $\ast$accel\_\-name)
\item 
void {\bf rox\_\-menu\_\-attach} (Gtk\-Widget $\ast$menu, Gtk\-Widget $\ast$window, gboolean on\_\-button\_\-press, {\bf ROXMenu\-Pre\-Filter} filter, gpointer udata)
\item 
void {\bf rox\_\-menu\_\-attach\_\-to\_\-applet} (Gtk\-Widget $\ast$menu, Gtk\-Widget $\ast$applet, {\bf ROXMenu\-Pre\-Filter} filter, gpointer udata)
\item 
Gtk\-Widget $\ast$ {\bf rox\_\-menu\_\-get\_\-widget} (Gtk\-Widget $\ast$menu, const char $\ast$path)
\end{CompactItemize}


\subsection{Detailed Description}
Interface to the ROX menu system. 



\subsection{Typedef Documentation}
\index{menu.h@{menu.h}!ROXMenuPreFilter@{ROXMenuPreFilter}}
\index{ROXMenuPreFilter@{ROXMenuPreFilter}!menu.h@{menu.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}typedef gboolean($\ast$) {\bf ROXMenu\-Pre\-Filter}(Gtk\-Widget $\ast$menu, Gtk\-Widget $\ast$window, gpointer udata)}\label{menu_8h_61e79da39c739241cc1ea1cbc20a7bbf}


Type of function called before a menu is shown. This allows a program to update the menu, record state information, or even veto the display of the menu.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftrightarrow$} {\em menu}]the menu to show \item[\mbox{$\leftarrow$} {\em window}]the widget which triggered the menu show event \item[\mbox{$\leftrightarrow$} {\em udata}]additional data passed to the function which attached the menu to the window (either \doxyref{rox\_\-menu\_\-attach()}{p.}{menu_8c_ca8a2383d83d9802abbd47a8686048d1} or \doxyref{rox\_\-menu\_\-attach\_\-to\_\-applet()}{p.}{menu_8c_99da30f5eae32bc72d47b52d05834519}). \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]{\tt TRUE} to show the applet or {\tt FALSE} to ignore the event \end{Desc}


\subsection{Function Documentation}
\index{menu.h@{menu.h}!rox_menu_attach@{rox\_\-menu\_\-attach}}
\index{rox_menu_attach@{rox\_\-menu\_\-attach}!menu.h@{menu.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void rox\_\-menu\_\-attach (Gtk\-Widget $\ast$ {\em menu}, Gtk\-Widget $\ast$ {\em window}, gboolean {\em on\_\-button\_\-press}, {\bf ROXMenu\-Pre\-Filter} {\em filter}, gpointer {\em udata})}\label{menu_8h_ca8a2383d83d9802abbd47a8686048d1}


Attach a menu to a window (or other widget). The menu will be displayed when the \char`\"{}popup-menu\char`\"{} signal is triggered on {\em window\/} and optionally when the \char`\"{}button\_\-press\_\-event\char`\"{} signal is triggered.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em menu}]menu to attach \item[\mbox{$\leftrightarrow$} {\em window}]widget to attach {\em menu\/} to \item[\mbox{$\leftarrow$} {\em on\_\-button\_\-press}]if not {\tt FALSE} then pop-up the menu on the \char`\"{}button\_\-press\_\-event\char`\"{} signal, otherwise just on the \char`\"{}popup-menu\char`\"{} signal. \item[\mbox{$\leftarrow$} {\em filter}]function to call prior to showing the menu, or {\tt NULL} \item[\mbox{$\leftarrow$} {\em udata}]additional data to pass to {\em filter\/} when calling. \end{description}
\end{Desc}
\index{menu.h@{menu.h}!rox_menu_attach_to_applet@{rox\_\-menu\_\-attach\_\-to\_\-applet}}
\index{rox_menu_attach_to_applet@{rox\_\-menu\_\-attach\_\-to\_\-applet}!menu.h@{menu.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void rox\_\-menu\_\-attach\_\-to\_\-applet (Gtk\-Widget $\ast$ {\em menu}, Gtk\-Widget $\ast$ {\em applet}, {\bf ROXMenu\-Pre\-Filter} {\em filter}, gpointer {\em udata})}\label{menu_8h_99da30f5eae32bc72d47b52d05834519}


Attach a menu to an applet's window. The menu will be displayed when the \char`\"{}popup-menu\char`\"{} signal or button\_\-press\_\-event\char`\"{} signal is triggered on {\em applet\/}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em menu}]menu to attach \item[\mbox{$\leftrightarrow$} {\em applet}]widget to attach {\em menu\/} to \item[\mbox{$\leftarrow$} {\em filter}]function to call prior to showing the menu, or {\tt NULL} \item[\mbox{$\leftarrow$} {\em udata}]additional data to pass to {\em filter\/} when calling. \end{description}
\end{Desc}
\index{menu.h@{menu.h}!rox_menu_build@{rox\_\-menu\_\-build}}
\index{rox_menu_build@{rox\_\-menu\_\-build}!menu.h@{menu.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Gtk\-Widget$\ast$ rox\_\-menu\_\-build (Gtk\-Widget $\ast$ {\em window}, Gtk\-Item\-Factory\-Entry $\ast$ {\em menu\_\-items}, int {\em n\_\-menu}, const gchar $\ast$ {\em menu\_\-name}, const gchar $\ast$ {\em accel\_\-name})}\label{menu_8h_caee6a52f5abeaa5dc264c778dfc989e}


Create a menu. The menu is built from a static definition and connected to a window for the purposes of reacting to key accelerators. It is not attached to a window, use either \doxyref{rox\_\-menu\_\-attach()}{p.}{menu_8c_ca8a2383d83d9802abbd47a8686048d1} or \doxyref{rox\_\-menu\_\-attach\_\-to\_\-applet()}{p.}{menu_8c_99da30f5eae32bc72d47b52d05834519}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftrightarrow$} {\em window}]window listening for key events that will be used for key accelerators (or {\tt NULL}) \item[\mbox{$\leftarrow$} {\em menu\_\-items}]array of menu definitions. \item[\mbox{$\leftarrow$} {\em n\_\-menu}]number of items in {\em menu\_\-items\/} \item[\mbox{$\leftarrow$} {\em menu\_\-name}]name of menu to create, or {\tt NULL} to use \char`\"{}$<$system$>$\char`\"{} \item[\mbox{$\leftarrow$} {\em accel\_\-name}]file name to use when loading or saving key accelerators, or {\tt NULL} to disable loading and saving. \end{description}
\end{Desc}
\index{menu.h@{menu.h}!rox_menu_get_widget@{rox\_\-menu\_\-get\_\-widget}}
\index{rox_menu_get_widget@{rox\_\-menu\_\-get\_\-widget}!menu.h@{menu.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Gtk\-Widget$\ast$ rox\_\-menu\_\-get\_\-widget (Gtk\-Widget $\ast$ {\em menu}, const char $\ast$ {\em path})}\label{menu_8h_d73c5d6d946ee70beeb539d99af875f2}


Look up a menu widget by its path in a menu created by \doxyref{rox\_\-menu\_\-build()}{p.}{menu_8c_caee6a52f5abeaa5dc264c778dfc989e}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[\mbox{$\leftarrow$} {\em menu}]menu created by \doxyref{rox\_\-menu\_\-build()}{p.}{menu_8c_caee6a52f5abeaa5dc264c778dfc989e}. \item[\mbox{$\leftarrow$} {\em path}]path of a menu widget, one of the {\em menu\_\-items\/} passed to \doxyref{rox\_\-menu\_\-build()}{p.}{menu_8c_caee6a52f5abeaa5dc264c778dfc989e}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]menu widget or {\tt NULL} if not found. \end{Desc}
