- Main Page
- Classes
- Directories
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# TkMenu Class Reference

Represent menu. More...

`#include <tk_menu.h>`

Inheritance diagram for TkMenu:

List of all members.

## Public Member Functions

const Ptr< TkOptionDef > * | getOptionAll () const
| Returns array of all avaliable options valid for specific widget type.
const char * | getType () const
| Return type of class.
const char * | getTkClass () const
| Returns type of widget.
TObject * | clone ()
| Create deep-clone of object.
void | addMenuListener (TkMenuListener *listener)
void | fireMenuEvent (const string &commandId)
void | addCommand (const string &miName, const string &miId)
void | addSeparator ()
void | addSubmenu (const string &miName, TkMenu *subMenu)
void | create ()
| Creates widget in shell.
void | setBackgroundColor (TkColorOption *color)
| Set background color.
Ptr< TkColorOption > & | getBackgroundColor () const
| Returns background color of widget.

## Static Public Member Functions

static TkMenu * | getMenuById (int id)

## Detailed Description

Represent menu.

Date:
  01-12-2006

Author:
  Ondrej Svejdar

Todo:

Bug:

## Member Function Documentation

void TkMenu::addCommand | ( | const string & | miName,
|  | const string & | miId
| ) |

| Add new menu item to the menu

Parameters:

  | miName | name of item (this name will user see)
  | miId | id of menu item (this is used in event handling routines)

void TkMenu::addMenuListener | ( | TkMenuListener * | listener | ) |

| Add menu listener

Parameters:

  | listener | menu listener

void TkMenu::addSeparator | ( |  | ) |

| Add menu item separator

void TkMenu::addSubmenu | ( | const string & | miName,
|  | TkMenu * | subMenu
| ) |

| Add submenu to the menu

Parameters:

  | miName | (this name will user see)
  | subMenu | submenu to add

TObject * TkMenu::clone | ( |  | ) | `[virtual]`

| Create deep-clone of object.

Returns:
  deep-clone of object

Implements TkBase.

void TkMenu::fireMenuEvent | ( | const string & | commandId | ) |

| Fired when user click on menu item

Parameters:

  | commandId | menu item id

Ptr< TkColorOption > & TkMenu::getBackgroundColor | ( |  | ) | const`[virtual]`

| Returns background color of widget.

Returns:
  background color

Implements TkBase.

TkMenu * TkMenu::getMenuById | ( | int | id | ) | `[static]`

| Return menu pointer from id

Parameters:

  | id | menu id

Returns:
  pointer to menu

const Ptr< TkOptionDef > * TkMenu::getOptionAll | ( |  | ) | const`[virtual]`

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

Returns:
  array of options

Implements TkBase.

const char * TkMenu::getTkClass | ( |  | ) | const`[virtual]`

| Returns type of widget. Example values are "button","menu","entry" etc.

Returns:
  widget type

Implements TkBase.

const char * TkMenu::getType | ( |  | ) | const`[virtual]`

| Return type of class.

Returns:
  type of class

Reimplemented from TXmlObject.

void TkMenu::setBackgroundColor | ( | TkColorOption * | color | ) | `[virtual]`

| Set background color.

Parameters:

  | color | color value

Implements TkBase.

The documentation for this class was generated from the following files:

- H:/projs/dotNET/eda/src/tk/gui/tk_menu.h
- H:/projs/dotNET/eda/src/tk/gui/tk_menu.cpp