Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

7 Francy Menus
 7.1 Categories
 7.2 Families
 7.3 Representations
 7.4 Operations
 7.5 Attributes

7 Francy Menus

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.

7.1 Categories

In this section we show all Francy Menu Categories.

7.1-1 IsMenu
‣ IsMenu( arg )( filter )

Returns: true or false

Identifies Menu objects.

7.2 Families

In this section we show all Francy Menu Families.

7.3 Representations

In this section we show all Francy Menu Representations.

7.3-1 IsMenuRep
‣ IsMenuRep( arg )( filter )

Returns: true or false

Checks whether an Object has a Menu internal representation.

7.4 Operations

In this section we show all Francy Menu Operations.

7.4-1 Menu
‣ 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]);

7.4-2 Add
‣ 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.

7.4-3 Remove
‣ Remove( IsMenu[, IsMenu, List(IsMenu)] )( operation )

Returns: Menu

Remove a Menu from a specific Menu. Is up to the client implementation to handle this.

7.5 Attributes

In this section we show all Francy Core Attributes

7.5-1 Title
‣ 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.

7.5-2 Title
‣ Title( arg1 )( operation )

7.5-3 SetTitle
‣ SetTitle( IsMenu, IsString )( operation )

Sets the title of the Menu.

 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 Ind

generated by GAPDoc2HTML