Back: BLOX.Blox-widget protocol Up: BLOX package Forward: BLOX.BMenu class-instance creation   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.27 BLOX.BMenu

Defined in namespace BLOX
Superclass: BLOX.BMenuObject
Category: Graphics-Windows
I am a Menu that is part of a menu bar.

1.27.1 BLOX.BMenu class: instance creation  (class)
1.27.2 BLOX.BMenu: accessing  (instance)
1.27.3 BLOX.BMenu: callback registration  (instance)


1.27.1 BLOX.BMenu class: instance creation

new: parent label: label
Add a new menu to the parent window's menu bar, with `label' as its caption (for popup menus, parent is the widget over which the menu pops up as the right button is pressed).


1.27.2 BLOX.BMenu: accessing

label
Answer the value of the label option for the widget.

Specifies a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as anchor. For windows, this is the title of the window.

label: value
Set the value of the label option for the widget.

Specifies a string to be displayed inside the widget. The way in which the string is displayed depends on the particular widget and may be determined by other options, such as anchor. For windows, this is the title of the window.


1.27.3 BLOX.BMenu: callback registration

addLine
Add a separator item at the end of the menu

addMenuItemFor: anArray notifying: receiver
Add a menu item described by anArray at the end of the menu. If anArray is empty, insert a separator line. If anArray has a single item, a menu item is created without a callback. If anArray has two or three items, the second one is used as the selector sent to receiver, and the third one (if present) is passed to the selector.

callback: receiver using: selectorPairs
Add menu items described by anArray at the end of the menu. Each element of selectorPairs must be in the format described in BMenu>>#addMenuItemFor:notifying:. All the callbacks will be sent to receiver.

destroy
Destroy the menu widget; that is, simply remove ourselves from the parent menu bar.

empty
Empty the menu widget; that is, remove all the children



Back: BLOX.BMenu-accessing Up: BLOX.BMenu Forward: BLOX.BMenuBar   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on May, 22 2008 using texi2html