\section{Tk\-Menu Class Reference}
\label{class_tk_menu}\index{TkMenu@{TkMenu}}
Represent menu.  


{\tt \#include $<$tk\_\-menu.h$>$}

Inheritance diagram for Tk\-Menu::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=12cm]{class_tk_menu}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
const {\bf Ptr}$<$ Tk\-Option\-Def $>$ $\ast$ {\bf get\-Option\-All} () const 
\begin{CompactList}\small\item\em Returns array of all avaliable options valid for specific widget type. \item\end{CompactList}\item 
const char $\ast$ {\bf get\-Type} () const 
\begin{CompactList}\small\item\em Return type of class. \item\end{CompactList}\item 
const char $\ast$ {\bf get\-Tk\-Class} () const 
\begin{CompactList}\small\item\em Returns type of widget. \item\end{CompactList}\item 
{\bf TObject} $\ast$ {\bf clone} ()
\begin{CompactList}\small\item\em Create deep-clone of object. \item\end{CompactList}\item 
void {\bf add\-Menu\-Listener} ({\bf Tk\-Menu\-Listener} $\ast$listener)
\item 
void {\bf fire\-Menu\-Event} (const string \&command\-Id)
\item 
void {\bf add\-Command} (const string \&mi\-Name, const string \&mi\-Id)
\item 
void {\bf add\-Separator} ()
\item 
void {\bf add\-Submenu} (const string \&mi\-Name, {\bf Tk\-Menu} $\ast$sub\-Menu)
\item 
void {\bf create} ()\label{class_tk_menu_21140cdbfc5adac008803f2a52633d13}

\begin{CompactList}\small\item\em Creates widget in shell. \item\end{CompactList}\item 
void {\bf set\-Background\-Color} (Tk\-Color\-Option $\ast$color)
\begin{CompactList}\small\item\em Set background color. \item\end{CompactList}\item 
{\bf Ptr}$<$ Tk\-Color\-Option $>$ \& {\bf get\-Background\-Color} () const 
\begin{CompactList}\small\item\em Returns background color of widget. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf Tk\-Menu} $\ast$ {\bf get\-Menu\-By\-Id} (int id)
\end{CompactItemize}


\subsection{Detailed Description}
Represent menu. 

\begin{Desc}
\item[Date:]01-12-2006\end{Desc}
\begin{Desc}
\item[Author:]Ondrej Svejdar\end{Desc}
\begin{Desc}
\item[{\bf Todo}]\end{Desc}
\begin{Desc}
\item[{\bf Bug}]\end{Desc}




\subsection{Member Function Documentation}
\index{TkMenu@{Tk\-Menu}!addCommand@{addCommand}}
\index{addCommand@{addCommand}!TkMenu@{Tk\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Tk\-Menu::add\-Command (const string \& {\em mi\-Name}, const string \& {\em mi\-Id})}\label{class_tk_menu_1a35a7ebb1430134f663c94f1cb59188}


Add new menu item to the menu \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mi\-Name}]name of item (this name will user see) \item[{\em mi\-Id}]id of menu item (this is used in event handling routines) \end{description}
\end{Desc}
\index{TkMenu@{Tk\-Menu}!addMenuListener@{addMenuListener}}
\index{addMenuListener@{addMenuListener}!TkMenu@{Tk\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Tk\-Menu::add\-Menu\-Listener ({\bf Tk\-Menu\-Listener} $\ast$ {\em listener})}\label{class_tk_menu_f24fc10f9694381596984f462b0143d1}


Add menu listener \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em listener}]menu listener \end{description}
\end{Desc}
\index{TkMenu@{Tk\-Menu}!addSeparator@{addSeparator}}
\index{addSeparator@{addSeparator}!TkMenu@{Tk\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Tk\-Menu::add\-Separator ()}\label{class_tk_menu_2237b11cb16076f72676ae8a1e8f6574}


Add menu item separator \index{TkMenu@{Tk\-Menu}!addSubmenu@{addSubmenu}}
\index{addSubmenu@{addSubmenu}!TkMenu@{Tk\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Tk\-Menu::add\-Submenu (const string \& {\em mi\-Name}, {\bf Tk\-Menu} $\ast$ {\em sub\-Menu})}\label{class_tk_menu_7d9f225bfa25056874780719d8d094f4}


Add submenu to the menu \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mi\-Name}](this name will user see) \item[{\em sub\-Menu}]submenu to add \end{description}
\end{Desc}
\index{TkMenu@{Tk\-Menu}!clone@{clone}}
\index{clone@{clone}!TkMenu@{Tk\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf TObject} $\ast$ Tk\-Menu::clone ()\hspace{0.3cm}{\tt  [virtual]}}\label{class_tk_menu_a57a4061e6b07e21891be7a967c53f91}


Create deep-clone of object. 

\begin{Desc}
\item[Returns:]deep-clone of object \end{Desc}


Implements {\bf Tk\-Base} {\rm (p.\,\pageref{class_tk_base_eeacc64c3f35a0f65819595fa0f5e3c6})}.\index{TkMenu@{Tk\-Menu}!fireMenuEvent@{fireMenuEvent}}
\index{fireMenuEvent@{fireMenuEvent}!TkMenu@{Tk\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Tk\-Menu::fire\-Menu\-Event (const string \& {\em command\-Id})}\label{class_tk_menu_c63e1e1655a1964344b53dfff2f70c8c}


Fired when user click on menu item \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em command\-Id}]menu item id \end{description}
\end{Desc}
\index{TkMenu@{Tk\-Menu}!getBackgroundColor@{getBackgroundColor}}
\index{getBackgroundColor@{getBackgroundColor}!TkMenu@{Tk\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Ptr}$<$ Tk\-Color\-Option $>$ \& Tk\-Menu::get\-Background\-Color () const\hspace{0.3cm}{\tt  [virtual]}}\label{class_tk_menu_03c0a2d825c5a3dce8fcd1404699eeca}


Returns background color of widget. 

\begin{Desc}
\item[Returns:]background color \end{Desc}


Implements {\bf Tk\-Base} {\rm (p.\,\pageref{class_tk_base_104d02d466da4b0894a099b72b12cb07})}.\index{TkMenu@{Tk\-Menu}!getMenuById@{getMenuById}}
\index{getMenuById@{getMenuById}!TkMenu@{Tk\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Tk\-Menu} $\ast$ Tk\-Menu::get\-Menu\-By\-Id (int {\em id})\hspace{0.3cm}{\tt  [static]}}\label{class_tk_menu_3ec05164587c725ed1f48a05de47960d}


Return menu pointer from id \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]menu id \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]pointer to menu \end{Desc}
\index{TkMenu@{Tk\-Menu}!getOptionAll@{getOptionAll}}
\index{getOptionAll@{getOptionAll}!TkMenu@{Tk\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf Ptr}$<$ Tk\-Option\-Def $>$ $\ast$ Tk\-Menu::get\-Option\-All () const\hspace{0.3cm}{\tt  [virtual]}}\label{class_tk_menu_9fee034d6164ec34a26d3a3b98a9e61b}


Returns array of all avaliable options valid for specific widget type. 

\begin{Desc}
\item[Returns:]array of options \end{Desc}


Implements {\bf Tk\-Base} {\rm (p.\,\pageref{class_tk_base_89d93c80ff7a528f833e2ea45f1a10f6})}.\index{TkMenu@{Tk\-Menu}!getTkClass@{getTkClass}}
\index{getTkClass@{getTkClass}!TkMenu@{Tk\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ Tk\-Menu::get\-Tk\-Class () const\hspace{0.3cm}{\tt  [virtual]}}\label{class_tk_menu_4c84eb8aa0f24934d8c12ee757f622c1}


Returns type of widget. 

Example values are \char`\"{}button\char`\"{},\char`\"{}menu\char`\"{},\char`\"{}entry\char`\"{} etc. \begin{Desc}
\item[Returns:]widget type \end{Desc}


Implements {\bf Tk\-Base} {\rm (p.\,\pageref{class_tk_base_2e57ed30603b2d16c02812df67e1f2fd})}.\index{TkMenu@{Tk\-Menu}!getType@{getType}}
\index{getType@{getType}!TkMenu@{Tk\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ Tk\-Menu::get\-Type () const\hspace{0.3cm}{\tt  [virtual]}}\label{class_tk_menu_1413702cbda682553d02b08afccebfc3}


Return type of class. 

\begin{Desc}
\item[Returns:]type of class \end{Desc}


Reimplemented from {\bf TXml\-Object} {\rm (p.\,\pageref{class_t_xml_object_1413702cbda682553d02b08afccebfc3})}.\index{TkMenu@{Tk\-Menu}!setBackgroundColor@{setBackgroundColor}}
\index{setBackgroundColor@{setBackgroundColor}!TkMenu@{Tk\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Tk\-Menu::set\-Background\-Color (Tk\-Color\-Option $\ast$ {\em color})\hspace{0.3cm}{\tt  [virtual]}}\label{class_tk_menu_8afd70e6e3b95665d0c013f93c7fb9c5}


Set background color. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em color}]color value \end{description}
\end{Desc}


Implements {\bf Tk\-Base} {\rm (p.\,\pageref{class_tk_base_5b832cf60b0c72679e8460a876376226})}.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
H:/projs/dot\-NET/eda/src/tk/gui/tk\_\-menu.h\item 
H:/projs/dot\-NET/eda/src/tk/gui/tk\_\-menu.cpp\end{CompactItemize}
