- Main Page
- Packages
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# smjg.libs.sdwf.menu.MenuItem Class Reference

The smjg.libs.sdwf.menu.MenuItem class represents an individual menu item. More...

List of all members.

## Public Member Functions
| this (uint id, string t)
| Constructs a new menu item displaying text.
| this (uint id, Bitmap b)
| Constructs a new menu item displaying a bitmap.
| this (uint id=0)
| Constructs a new menu item to be a horizontal separator.
void | refresh ()
| Refreshes the information stored in this MenuItem object.
Properties
string | toString ()
| A textual representation of the menu item.
Menu | container ()
| The menu that contains this item.
Bitmap | bitmap ()
| The bitmap that is used to display this menu item.
Bitmap | bitmap (Bitmap b)
| The bitmap that is used to display this menu item.
char[] | text ()
| The text of this menu item.
string | text (string t)
| The text of this menu item.
uint | id ()
| The ID of the menu item, used in processing command messages.
uint | id (uint i)
| The ID of the menu item, used in processing command messages.
Bitmap | checkMark ()
| A bitmap that will be displayed when the item is in an 'checked' state.
Bitmap | checkMark (Bitmap b)
| A bitmap that will be displayed when the item is in an 'checked' state.
Bitmap | uncheckMark ()
| A bitmap that will be displayed when the item is in an 'unchecked' state.
Bitmap | uncheckMark (Bitmap b)
| A bitmap that will be displayed when the item is in an 'unchecked' state.
bool | checked ()
| Whether this item is checked ('on').
bool | checked (bool c)
| Whether this item is checked ('on').
bool | enabled ()
| Whether this item is enabled, as opposed to being 'greyed out'.
bool | enabled (bool e)
| Whether this item is enabled, as opposed to being 'greyed out'.
MenuPopup | subMenu ()
| The submenu descended from this item.
MenuPopup | subMenu (MenuPopup m)
| The submenu descended from this item.
MFT | type ()
| A combination of bit flags denoting what kind of menu item this is.
MFT | type (MFT t)
| A combination of bit flags denoting what kind of menu item this is.
MFS | state ()
| A combination of bit flags denoting the current state of this menu item.
MFS | state (MFS s)
| A combination of bit flags denoting the current state of this menu item.
MENUITEMINFOA | info ()
| Information on this menu item as a Windows API `MENUITEMINFOA` structure.
## Protected Member Functions
void | update ()

## Detailed Description

The smjg.libs.sdwf.menu.MenuItem class represents an individual menu item.

## Constructor & Destructor Documentation

smjg.libs.sdwf.menu.MenuItem.this | ( | uint | id,
|  | string | t |
| ) |  |  |

Constructs a new menu item displaying text.

Parameters:

  | id | numeric ID of the menu item.
  | t | text of the menu item.

Status:
  done

smjg.libs.sdwf.menu.MenuItem.this | ( | uint | id,
|  | Bitmap | b |
| ) |  |  |

Constructs a new menu item displaying a bitmap.

Parameters:

  | id | numeric ID of the menu item.
  | b | image to display in the menu item.

Status:
  test

smjg.libs.sdwf.menu.MenuItem.this | ( | uint | id = `0` | ) |

Constructs a new menu item to be a horizontal separator.

Parameters:

  | id | numeric ID of the separator (not that there's any point setting it)

Status:
  done

## Member Function Documentation

void smjg.libs.sdwf.menu.MenuItem.refresh | ( |  | ) |

Refreshes the information stored in this MenuItem object.

This is primarily for internal use, but applications can also use it in case the menu item can be modified by means external to the Menu and MenuItem SDWF objects.

Status:
  test on bitmaps

string smjg.libs.sdwf.menu.MenuItem.toString | ( |  | ) |

A textual representation of the menu item.

Returns:
  the text of a string menu item.

Return values:

  | [bitmap] | if item is displayed as a bitmap.
  | [separator] | if item is a separator.

Status:
  test on bitmaps

Menu smjg.libs.sdwf.menu.MenuItem.container | ( |  | ) |

The menu that contains this item.

Bitmap smjg.libs.sdwf.menu.MenuItem.bitmap | ( |  | ) |

The bitmap that is used to display this menu item.

Bitmap smjg.libs.sdwf.menu.MenuItem.bitmap | ( | Bitmap | b | ) |

The bitmap that is used to display this menu item.

Status:
  test

char [] smjg.libs.sdwf.menu.MenuItem.text | ( |  | ) |

The text of this menu item.

Status:
  done

string smjg.libs.sdwf.menu.MenuItem.text | ( | string | t | ) |

The text of this menu item.

Status:
  done

uint smjg.libs.sdwf.menu.MenuItem.id | ( |  | ) |

The ID of the menu item, used in processing command messages.

uint smjg.libs.sdwf.menu.MenuItem.id | ( | uint | i | ) |

The ID of the menu item, used in processing command messages.

Bitmap smjg.libs.sdwf.menu.MenuItem.checkMark | ( |  | ) |

A bitmap that will be displayed when the item is in an 'checked' state.

Bitmap smjg.libs.sdwf.menu.MenuItem.checkMark | ( | Bitmap | b | ) |

A bitmap that will be displayed when the item is in an 'checked' state.

If `null`, then the standard tick (or bullet) will be used.

Status:
  test

Bitmap smjg.libs.sdwf.menu.MenuItem.uncheckMark | ( |  | ) |

A bitmap that will be displayed when the item is in an 'unchecked' state.

Bitmap smjg.libs.sdwf.menu.MenuItem.uncheckMark | ( | Bitmap | b | ) |

A bitmap that will be displayed when the item is in an 'unchecked' state.

If `null`, no image will be used.

Status:
  test

bool smjg.libs.sdwf.menu.MenuItem.checked | ( |  | ) |

Whether this item is checked ('on').

bool smjg.libs.sdwf.menu.MenuItem.checked | ( | bool | c | ) |

Whether this item is checked ('on').

bool smjg.libs.sdwf.menu.MenuItem.enabled | ( |  | ) |

Whether this item is enabled, as opposed to being 'greyed out'.

bool smjg.libs.sdwf.menu.MenuItem.enabled | ( | bool | e | ) |

Whether this item is enabled, as opposed to being 'greyed out'.

MenuPopup smjg.libs.sdwf.menu.MenuItem.subMenu | ( |  | ) |

The submenu descended from this item.

Status:
  done

MenuPopup smjg.libs.sdwf.menu.MenuItem.subMenu | ( | MenuPopup | m | ) |

The submenu descended from this item.

If this item's container is a menu bar, then this a drop-down menu. If this item's container is a drop-down or popup menu, this will be a cascading menu off the side of it.

Status:
  done

MFT smjg.libs.sdwf.menu.MenuItem.type | ( |  | ) |

A combination of bit flags denoting what kind of menu item this is.

MFT smjg.libs.sdwf.menu.MenuItem.type | ( | MFT | t | ) |

A combination of bit flags denoting what kind of menu item this is.

Todo:
  deal with setting of SEPARATOR, STRING and BITMAP flags.

MFS smjg.libs.sdwf.menu.MenuItem.state | ( |  | ) |

A combination of bit flags denoting the current state of this menu item.

MFS smjg.libs.sdwf.menu.MenuItem.state | ( | MFS | s | ) |

A combination of bit flags denoting the current state of this menu item.

MENUITEMINFOA smjg.libs.sdwf.menu.MenuItem.info | ( |  | ) |

Information on this menu item as a Windows API `MENUITEMINFOA` structure.

void smjg.libs.sdwf.menu.MenuItem.update | ( |  | ) | `[protected]`

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

- menu.d