libui-ng
A portable GUI library for C
|
An application level menu bar. More...
#include <ui.h>
Public Member Functions | |
uiMenuItem * | uiMenuAppendItem (uiMenu *m, const char *name) |
Appends a generic menu item. More... | |
uiMenuItem * | uiMenuAppendCheckItem (uiMenu *m, const char *name) |
Appends a generic menu item with a checkbox. More... | |
uiMenuItem * | uiMenuAppendQuitItem (uiMenu *m) |
Appends a new Quit menu item. More... | |
uiMenuItem * | uiMenuAppendPreferencesItem (uiMenu *m) |
Appends a new Preferences menu item. More... | |
uiMenuItem * | uiMenuAppendAboutItem (uiMenu *m) |
Appends a new About menu item. More... | |
void | uiMenuAppendSeparator (uiMenu *m) |
Appends a new separator. More... | |
uiMenu * | uiNewMenu (const char *name) |
Creates a new menu. More... | |
An application level menu bar.
The various operating systems impose different requirements on the creation and placement of menu bar items, hence the abstraction of the items Quit
, Preferences
and About
.
An exemplary, cross platform menu bar:
uiMenuItem * uiMenuAppendAboutItem | ( | uiMenu * | m | ) |
Appends a new About
menu item.
m | uiMenu instance. |
uiMenuItem * uiMenuAppendCheckItem | ( | uiMenu * | m, |
const char * | name | ||
) |
Appends a generic menu item with a checkbox.
m | uiMenu instance. |
name | Menu item text. A NUL terminated UTF-8 string.Data is copied internally. Ownership is not transferred. |
uiMenuItem * uiMenuAppendItem | ( | uiMenu * | m, |
const char * | name | ||
) |
Appends a generic menu item.
m | uiMenu instance. |
name | Menu item text. A NUL terminated UTF-8 string.Data is copied internally. Ownership is not transferred. |
uiMenuItem * uiMenuAppendPreferencesItem | ( | uiMenu * | m | ) |
Appends a new Preferences
menu item.
m | uiMenu instance. |
uiMenuItem * uiMenuAppendQuitItem | ( | uiMenu * | m | ) |
Appends a new Quit
menu item.
m | uiMenu instance. |
uiMenu * uiNewMenu | ( | const char * | name | ) |
Creates a new menu.
Typical values are File
, Edit
, Help
.
name | Menu label. A NUL terminated UTF-8 string.Data is copied internally. Ownership is not transferred. |