\hypertarget{a06876}{}\section{Context\+Menu\+Interface Class Reference}
\label{a06876}\index{Context\+Menu\+Interface@{Context\+Menu\+Interface}}


Interface class for creating custom context menus.  




{\ttfamily \#include $<$Open\+Flipper/\+Base\+Plugin/\+Context\+Menu\+Interface.\+hh$>$}

Inheritance diagram for Context\+Menu\+Interface\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=12.000000cm]{a06876}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a06876_a4218366cfae9b474e0f62ff75239ea66}{add\+Context\+Menu\+Item} (Q\+Action $\ast$\+\_\+action, \hyperlink{a00017_a238952a111d7daede783625350d7b287}{Context\+Menu\+Type} \+\_\+type)
\begin{DoxyCompactList}\small\item\em Add an entry for a context \hyperlink{a10084}{Menu}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a06876_a60e636363c9fd434860c981ef926b0d2}\label{a06876_a60e636363c9fd434860c981ef926b0d2}} 
virtual \hyperlink{a06876_a60e636363c9fd434860c981ef926b0d2}{$\sim$\+Context\+Menu\+Interface} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
virtual void \hyperlink{a06876_adef99c7fe7a2bc953f8e3f2adc5e3204}{add\+Context\+Menu\+Item} (Q\+Action $\ast$\+\_\+action, \hyperlink{a07048}{Data\+Type} \+\_\+object\+Type, \hyperlink{a00017_a238952a111d7daede783625350d7b287}{Context\+Menu\+Type} \+\_\+type)
\begin{DoxyCompactList}\small\item\em Add an entry for a context \hyperlink{a10084}{Menu}. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a06876_a0cc8237794b623236a8ef682628a6e48}\label{a06876_a0cc8237794b623236a8ef682628a6e48}} 
virtual void \hyperlink{a06876_a0cc8237794b623236a8ef682628a6e48}{hide\+Context\+Menu} ()
\begin{DoxyCompactList}\small\item\em hide the main context menu \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Slots}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a06876_a74cbe2257620672cbc565cc6536c0332}{slot\+Update\+Context\+Menu} (int \+\_\+object\+Id)
\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual void \hyperlink{a06876_a5f04c1c620257db8a0b45b41265bdf37}{slot\+Update\+Context\+Menu\+Node} (int \+\_\+node\+Id)
\item 
virtual void \hyperlink{a06876_a4ef981a842558cedae3b6c882af11416}{slot\+Update\+Context\+Menu\+Background} ()
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Interface class for creating custom context menus. 

\hyperlink{contextMenuInterfacePage}{Detailed description} ~\newline
~\newline
Using this interface you can create custom context menus for your plugin. You can choose between context menus for objects, nodes or the background.~\newline
Before a menu of the requested type is shown, an update function for the specific type will be invoked by the core. You have to create a Q\+Action. The signals and slots of your actions have to be connected to your plugin. Just connect them as usual. Only visibility of the menu is handled by the core. You can also add submenus to the context menus. Just add the action for the menu ( menu-\/$>$menu\+Action() ) 

Definition at line 85 of file Context\+Menu\+Interface.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a06876_a4218366cfae9b474e0f62ff75239ea66}\label{a06876_a4218366cfae9b474e0f62ff75239ea66}} 
\index{Context\+Menu\+Interface@{Context\+Menu\+Interface}!add\+Context\+Menu\+Item@{add\+Context\+Menu\+Item}}
\index{add\+Context\+Menu\+Item@{add\+Context\+Menu\+Item}!Context\+Menu\+Interface@{Context\+Menu\+Interface}}
\subsubsection{\texorpdfstring{add\+Context\+Menu\+Item}{addContextMenuItem}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily virtual void Context\+Menu\+Interface\+::add\+Context\+Menu\+Item (\begin{DoxyParamCaption}\item[{Q\+Action $\ast$}]{\+\_\+action,  }\item[{\hyperlink{a00017_a238952a111d7daede783625350d7b287}{Context\+Menu\+Type}}]{\+\_\+type }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}, {\ttfamily [signal]}}



Add an entry for a context \hyperlink{a10084}{Menu}. 

Create an Action (Can also be the action of a \hyperlink{a10084}{Menu}) and register this menu as a context menu to the core. This Action will be visible when you right click in the viewer widget on an item of the given context menu type. You can add a whole menu here by adding the action\+: menu-\/$>$menu\+Action() of your own menu.


\begin{DoxyParams}{Parameters}
{\em \+\_\+action} & Pointer to the new Action \\
\hline
{\em \+\_\+type} & Type context menu type \\
\hline
\end{DoxyParams}


Definition at line 104 of file Context\+Menu\+Interface.\+hh.

\mbox{\Hypertarget{a06876_adef99c7fe7a2bc953f8e3f2adc5e3204}\label{a06876_adef99c7fe7a2bc953f8e3f2adc5e3204}} 
\index{Context\+Menu\+Interface@{Context\+Menu\+Interface}!add\+Context\+Menu\+Item@{add\+Context\+Menu\+Item}}
\index{add\+Context\+Menu\+Item@{add\+Context\+Menu\+Item}!Context\+Menu\+Interface@{Context\+Menu\+Interface}}
\subsubsection{\texorpdfstring{add\+Context\+Menu\+Item()}{addContextMenuItem()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily virtual void Context\+Menu\+Interface\+::add\+Context\+Menu\+Item (\begin{DoxyParamCaption}\item[{Q\+Action $\ast$}]{\+\_\+action,  }\item[{\hyperlink{a07048}{Data\+Type}}]{\+\_\+object\+Type,  }\item[{\hyperlink{a00017_a238952a111d7daede783625350d7b287}{Context\+Menu\+Type}}]{\+\_\+type }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Add an entry for a context \hyperlink{a10084}{Menu}. 

Create an action (Can also be the action of a \hyperlink{a10084}{Menu}) and register this action as a context menu entry to the core. This Action will only be visible if the picked object is of the given \hyperlink{a07048}{Data\+Type}. To support multiple object types with your menu, you can emit this signal multiple times with the same action but different Data\+Types. You can add a whole \hyperlink{a10084}{Menu} here by adding the action\+: menu-\/$>$menu\+Action()


\begin{DoxyParams}{Parameters}
{\em \+\_\+action} & Pointer to the new action \\
\hline
{\em \+\_\+object\+Type} & Type of the picked object \\
\hline
{\em \+\_\+type} & Type of the context \hyperlink{a10084}{Menu} ( See Context\+Menu\+Type ) \\
\hline
\end{DoxyParams}


Definition at line 118 of file Context\+Menu\+Interface.\+hh.

\mbox{\Hypertarget{a06876_a74cbe2257620672cbc565cc6536c0332}\label{a06876_a74cbe2257620672cbc565cc6536c0332}} 
\index{Context\+Menu\+Interface@{Context\+Menu\+Interface}!slot\+Update\+Context\+Menu@{slot\+Update\+Context\+Menu}}
\index{slot\+Update\+Context\+Menu@{slot\+Update\+Context\+Menu}!Context\+Menu\+Interface@{Context\+Menu\+Interface}}
\subsubsection{\texorpdfstring{slot\+Update\+Context\+Menu}{slotUpdateContextMenu}}
{\footnotesize\ttfamily virtual void Context\+Menu\+Interface\+::slot\+Update\+Context\+Menu (\begin{DoxyParamCaption}\item[{int}]{\+\_\+object\+Id }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [private]}, {\ttfamily [virtual]}, {\ttfamily [slot]}}

When the main application requests a context menu, this slot is called before showing the window. If an object is picked the id will be given in this call so you can change the contents of your menu depending on the given object.


\begin{DoxyParams}{Parameters}
{\em \+\_\+object\+Id} & id of the object \\
\hline
\end{DoxyParams}


Reimplemented in \hyperlink{a11284_ac99c2fe84fcfe3bf7b1b7a282c55c00a}{Type\+B\+Spline\+Curve\+Plugin}, \hyperlink{a11288_a9bcd155b6560208d4616fd98d776e137}{Type\+B\+Spline\+Surface\+Plugin}, \hyperlink{a11300_adc28665573eff3a3e2956486545cec81}{Type\+Camera\+Plugin}, and \hyperlink{a11968_a453c3df89aeafbd81fb6938967f187e2}{Type\+Skeleton\+Plugin}.



Definition at line 131 of file Context\+Menu\+Interface.\+hh.

\mbox{\Hypertarget{a06876_a4ef981a842558cedae3b6c882af11416}\label{a06876_a4ef981a842558cedae3b6c882af11416}} 
\index{Context\+Menu\+Interface@{Context\+Menu\+Interface}!slot\+Update\+Context\+Menu\+Background@{slot\+Update\+Context\+Menu\+Background}}
\index{slot\+Update\+Context\+Menu\+Background@{slot\+Update\+Context\+Menu\+Background}!Context\+Menu\+Interface@{Context\+Menu\+Interface}}
\subsubsection{\texorpdfstring{slot\+Update\+Context\+Menu\+Background()}{slotUpdateContextMenuBackground()}}
{\footnotesize\ttfamily virtual void Context\+Menu\+Interface\+::slot\+Update\+Context\+Menu\+Background (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [private]}, {\ttfamily [virtual]}}

When the main application requests a context menu, this slot is called before showing the window. This slot will be called indicating that the background has been picked. 

Definition at line 145 of file Context\+Menu\+Interface.\+hh.

\mbox{\Hypertarget{a06876_a5f04c1c620257db8a0b45b41265bdf37}\label{a06876_a5f04c1c620257db8a0b45b41265bdf37}} 
\index{Context\+Menu\+Interface@{Context\+Menu\+Interface}!slot\+Update\+Context\+Menu\+Node@{slot\+Update\+Context\+Menu\+Node}}
\index{slot\+Update\+Context\+Menu\+Node@{slot\+Update\+Context\+Menu\+Node}!Context\+Menu\+Interface@{Context\+Menu\+Interface}}
\subsubsection{\texorpdfstring{slot\+Update\+Context\+Menu\+Node()}{slotUpdateContextMenuNode()}}
{\footnotesize\ttfamily virtual void Context\+Menu\+Interface\+::slot\+Update\+Context\+Menu\+Node (\begin{DoxyParamCaption}\item[{int}]{\+\_\+node\+Id }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [private]}, {\ttfamily [virtual]}}

When the main application requests a context menu, this slot is called before showing the window. This slot will be called indicating that a scenegraph node not belonging to an object has been picked.


\begin{DoxyParams}{Parameters}
{\em \+\_\+node\+Id} & id of the picked node \\
\hline
\end{DoxyParams}


Definition at line 139 of file Context\+Menu\+Interface.\+hh.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/\+Base\+Plugin/\hyperlink{a00017}{Context\+Menu\+Interface.\+hh}\end{DoxyCompactItemize}
