Menus are lists of actions that are rendered on the GUI. Menus can have SubMenus, and are constituted by a label Title and an action defined as a Callback.
Please see Francy-JS for client implementation.
In this section we show all Francy Menu Categories.
‣ IsMenu( arg ) | ( filter ) |
Returns: true or false
Identifies Menu objects.
In this section we show all Francy Menu Families.
In this section we show all Francy Menu Representations.
‣ IsMenuRep( arg ) | ( filter ) |
Returns: true or false
Checks whether an Object has a Menu internal representation.
In this section we show all Francy Menu Operations.
‣ Menu( IsString(title)[, IsCallback] ) | ( operation ) |
Returns: Menu
Creates a Menu with a label title and an action Callback. Is up to the client implementation to sort out the Menu and invoke the Callback. Examples:
Create a FrancyMenu:
gap> canvas := Canvas("Callbacks in action"); gap> SetHeight(canvas, 100); gap> graph := Graph(GraphType.HASSE); gap> shape := Shape(ShapeType.CIRCLE); gap> Add(graph, shape); gap> Add(canvas, graph); gap> HelloWorld := function(name) > Add(canvas, FrancyMessage(Concatenation("Hello, ", name))); gap> return Draw(canvas); gap> end; gap> callback1 := Callback(HelloWorld); gap> arg1 := RequiredArg(ArgType.STRING, "Your Name?"); gap> Add(callback1, arg1); gap> menu := Menu("Example Menu Holder"); gap> menu1 := Menu("Hello Menu Action", callback1 ); gap> menu2 := Menu("Hello Menu Action", callback1 ); gap> Add(menu, menu1); gap> Remove(menu, menu1); gap> Add(menu, [menu1, menu2]); gap> Remove(menu, [menu1, menu2]); gap> Add(canvas, [menu, menu1]); gap> Remove(canvas, menu1); gap> Add(canvas, menu1); gap> Add(shape, menu1); gap> Remove(shape, menu1); gap> Add(shape, [menu1, menu2]); gap> Remove(shape, [menu1, menu2]);
‣ Add( IsMenu[, IsMenu, List(IsMenu)] ) | ( operation ) |
Returns: Menu
Add one Menu to a specific Menu creating a Submenu. Is up to the client implementation to handle this.
‣ Remove( IsMenu[, IsMenu, List(IsMenu)] ) | ( operation ) |
Returns: Menu
Remove a Menu from a specific Menu. Is up to the client implementation to handle this.
In this section we show all Francy Core Attributes
‣ Title( arg ) | ( attribute ) |
Returns: IsString with the title of the object
A label title on a Menu is used to identify what action it is about on a menu entry.
‣ Title( arg1 ) | ( operation ) |
‣ SetTitle( IsMenu, IsString ) | ( operation ) |
Sets the title of the Menu.
generated by GAPDoc2HTML