CXMenu:
Filter:
Classes (extension) | Libraries > crucial > deprecated

CXMenu : SCViewHolder : Object
ExtensionExtension

a basic nav menu
Source: CXMenu.sc

Description

This is an old class. Pending deprecation.

A pop up menu that does its action and closes itself after you select an item.

The difference between this and PopUpMenu is that here there are separate functions for each menu item, and with PopUpMenu there is one action.

Class Methods

CXMenu.new( ... nameFuncs)

Arguments:

... nameFuncs

CXMenu.newWith(nameFuncs)

Arguments:

nameFuncs

Inherited class methods

Instance Methods

.nameFuncs

.nameFuncs = nf

Arguments:

nf

.layout

.backColor

.backColor = value

.stringColor

.stringColor = value

.closeOnSelect

.closeOnSelect = value

.gui(parent, windowWidth: 170, height: 400, argButtonWidth: 160)

Arguments:

parent
windowWidth
height
argButtonWidth

.guiBody(resize)

Arguments:

resize

.add(nf)

Arguments:

nf

.addToGui(nf, resize: true)

Arguments:

nf
resize

.resize

.resize = r

Arguments:

r

.doAction

.keyDownResponder

.focus

.focusOn(f: 0)

Arguments:

f

Inherited instance methods

Examples

On another layout

You can add things to the menu above m.add(\more->{ "more".postln; });

On a normal Window

Note that the arrow keys work to navigate once you are focused on any of the buttons.