wMenuBar

A menubar is a series of menus accessible from the top of a frame.

Superclass:wMenuBase
Seealso:wMenu wMenuItem

Procs

proc refresh(self: wMenuBar) {...}{.validate, raises: [], tags: [].}
Redraw the menubar.
proc attach(self: wMenuBar; frame: wFrame) {...}{.validate, raises: [], tags: [].}
Attach a menubar to frame window.
proc detach(self: wMenuBar; frame: wFrame) {...}{.validate, raises: [], tags: [].}
Detach a menubar from the frame.
proc detach(self: wMenuBar) {...}{.validate, raises: [], tags: [].}
Detach a menubar from all frames.
proc isAttached(self: wMenuBar): bool {...}{.validate, raises: [], tags: [].}
Return true if a menubar is attached to some frame window.
proc isAttached(self: wMenuBar; frame: wFrame): bool {...}{.validate, raises: [], tags: [].}
Return true if a menubar is attached to the frame window.
proc insert(self: wMenuBar; pos: int; menu: wMenu; text: string; bitmap: wBitmap = nil) {...}{.
    validate, raises: [], tags: [].}
Inserts the menu at the given position into the menubar.
proc append(self: wMenuBar; menu: wMenu; text: string; bitmap: wBitmap = nil) {...}{.validate,
    inline, raises: [], tags: [].}
Adds the menu to the end of the menubar.
proc enable(self: wMenuBar; pos: int; flag = true) {...}{.validate, raises: [], tags: [].}
Enables or disables a whole menu.
proc disable(self: wMenuBar; pos: int) {...}{.validate, inline, raises: [], tags: [].}
Disables a whole menu.
proc isEnabled(self: wMenuBar; pos: int): bool {...}{.validate, raises: [], tags: [].}
Returns true if the menu with the given index is enabled.
proc find(self: wMenuBar; menu: wMenu): int {...}{.validate, raises: [], tags: [].}
Find the first index of menu or wNotFound(-1) if not found.
proc find(self: wMenuBar; text: string): int {...}{.validate, raises: [], tags: [].}
Find the first index with the given title or wNotFound(-1) if not found.
proc findMenu(self: wMenuBar; text: string): wMenu {...}{.validate, raises: [], tags: [].}
Find the first wMenu object with the given title or nil if not found.
proc findText(self: wMenuBar; text: string): int {...}{.validate, raises: [], tags: [].}
Find the first index with the given title (not include any accelerator characters), wNotFound(-1) if not found.
proc findMenuText(self: wMenuBar; text: string): wMenu {...}{.validate, raises: [], tags: [].}
Find the first wMenu object with the given title (not include any accelerator characters), nil if not found.
proc getMenu(self: wMenuBar; pos: int): wMenu {...}{.validate, property, raises: [], tags: [].}
Returns the menu at pos, nil if index out of bounds.
proc getLabel(self: wMenuBar; pos: int): string {...}{.validate, property, raises: [], tags: [].}
Returns the label of a top-level menu.
proc getLabelText(self: wMenuBar; pos: int): string {...}{.validate, property, raises: [],
    tags: [].}
Returns the label of a top-level menu, not include any accelerator characters.
proc setLabel(self: wMenuBar; pos: int; text: string) {...}{.validate, property, raises: [],
    tags: [].}
Sets the label of a top-level menu.
proc remove(self: wMenuBar; pos: int): wMenu {...}{.validate, discardable, raises: [], tags: [].}
Removes the menu from the menubar and returns the menu object.
proc remove(self: wMenuBar; menu: wMenu) {...}{.validate, raises: [], tags: [].}
Find and remove all the menu object from the menubar.
proc replace(self: wMenuBar; pos: int; menu: wMenu; text: string; bitmap: wBitmap = nil): wMenu {...}{.
    validate, discardable, raises: [], tags: [].}
Replaces the menu at the given position with another one. Return the old menu object.
proc getHandle(self: wMenuBar): HMENU {...}{.validate, property, inline, raises: [], tags: [].}
Get system handle of this menubar.
proc getCount(self: wMenuBar): int {...}{.validate, property, inline, raises: [], tags: [].}
Returns the number of menus in this menubar.
proc `[]`(self: wMenuBar; pos: int): wMenu {...}{.validate, inline, raises: [], tags: [].}
Returns the menu at pos. Raise error if index out of bounds.
proc len(self: wMenuBar): int {...}{.validate, inline, raises: [], tags: [].}
Returns the number of wMenu objects in this menubar. This shoud be equal to getCount in most case.
proc delete(self: wMenuBar) {...}{.validate, raises: [], tags: [].}
Delete the menubar.
proc final(self: wMenuBar) {...}{.raises: [], tags: [].}
Default finalizer for wMenuBar.
proc init(self: wMenuBar) {...}{.validate, raises: [], tags: [].}
Initializer.
proc MenuBar(): wMenuBar {...}{.inline, raises: [], tags: [].}
Construct an empty menubar. Initializer. Construct a menubar from arrays of menus and titles. Initializer. Construct a menubar from arrays of menus and titles, and attach it to frame window.

Iterators

iterator find(self: wMenuBar; menu: wMenu): int {...}{.validate, raises: [], tags: [].}
Iterates over each index of menu in menubar.
iterator find(self: wMenuBar; text: string): int {...}{.validate, raises: [], tags: [].}
Iterates over each index with the given title.
iterator findMenu(self: wMenuBar; text: string): wMenu {...}{.validate, raises: [], tags: [].}
Iterates over each wMenu object with the given title.
iterator findText(self: wMenuBar; text: string): int {...}{.validate, raises: [], tags: [].}
Iterates over each index with the given title (not include any accelerator characters).
iterator findMenuText(self: wMenuBar; text: string): wMenu {...}{.validate, raises: [],
    tags: [].}
Iterates over each wMenu object with the given title (not include any accelerator characters).
iterator items(self: wMenuBar): wMenu {...}{.validate, raises: [], tags: [].}
Items iterator for menus in a menubar. Iterates over each menu of menubar. Yields (index, [index]) pairs.