Menus with Glamour / GT inspector

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Menus with Glamour / GT inspector

demarey
Hello,

I just did my first specific visualization with the GT inspector and it is very cool / powerful.
As I don't know Glamour, I read the Glamour chapter in the book 'Deep into Pharo' and I tried to use #act:entitled: to display a menu for a table visualization like:
composite table
                title: 'foo';
                display: [ self associations ];
                column: 'Key' evaluated: #key;
                column: 'Value' evaluated: #value;
                act: [ self halt ] entitled: 'new menu entry'

I cannot display the menu. Do I miss something?

Another question:
Is it possible to add a menu bar with buttons to such a visualization?

Thanks,
Christophe.
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Menus with Glamour / GT inspector

Tudor Girba-2
Hi,

act:entitled: will produce a menu item on the top right of the table. Is it not there?

If you want the icons, you have to use act:icon:entitled:

Doru

On Tue, Nov 25, 2014 at 1:31 PM, Christophe Demarey <[hidden email]> wrote:
Hello,

I just did my first specific visualization with the GT inspector and it is very cool / powerful.
As I don't know Glamour, I read the Glamour chapter in the book 'Deep into Pharo' and I tried to use #act:entitled: to display a menu for a table visualization like:
composite table
                title: 'foo';
                display: [ self associations ];
                column: 'Key' evaluated: #key;
                column: 'Value' evaluated: #value;
                act: [ self halt ] entitled: 'new menu entry'

I cannot display the menu. Do I miss something?

Another question:
Is it possible to add a menu bar with buttons to such a visualization?

Thanks,
Christophe.
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Menus with Glamour / GT inspector

demarey

Le 25 nov. 2014 à 13:50, Tudor Girba a écrit :

Hi,

act:entitled: will produce a menu item on the top right of the table. Is it not there?

ok, it is there. I did not notice the ... on the top right corner. I was expected a contextual menu. Thanks.
By the way, is there something available for contextual menus (ex: action on the selection)?


Another question:
Is it possible to add a menu bar with buttons to such a visualization?

For this point, is it supported or not yet?

Regards,
Christophe.

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Menus with Glamour / GT inspector

Usman Bhatti


On Tue, Nov 25, 2014 at 2:48 PM, Christophe Demarey <[hidden email]> wrote:

Le 25 nov. 2014 à 13:50, Tudor Girba a écrit :

Hi,

act:entitled: will produce a menu item on the top right of the table. Is it not there?

ok, it is there. I did not notice the ... on the top right corner. I was expected a contextual menu. Thanks.
By the way, is there something available for contextual menus (ex: action on the selection)?

From Glamour examples (GLMBasicExamples):

| finder |
finder := GLMFinder new variableSizePanes.
finder show: [:a | a list
title: 'List';
display: [:each | $a to: each];
dynamicActionsOnSelection: [:list | {(GLMGenericAction new)  "add contextual actions"
action: [:each | self inform: 'Menu - Item', list selection printString]; 
title: 'Menu - Item ', list selection printString; 
yourself}];
act:#inspect icon: (Smalltalk ui icons iconNamed: #removeIcon) entitled:'my button' ]. "button for presentation"
finder openOn: $z

You get a contextual menu on the list and button on the presentation.
Hope it helps.
 


Another question:
Is it possible to add a menu bar with buttons to such a visualization?

For this point, is it supported or not yet?

Regards,
Christophe.

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Menus with Glamour / GT inspector

demarey
Hi,

Le 25 nov. 2014 à 18:14, Usman Bhatti a écrit :

On Tue, Nov 25, 2014 at 2:48 PM, Christophe Demarey <[hidden email]> wrote:

Le 25 nov. 2014 à 13:50, Tudor Girba a écrit :

Hi,

act:entitled: will produce a menu item on the top right of the table. Is it not there?

ok, it is there. I did not notice the ... on the top right corner. I was expected a contextual menu. Thanks.
By the way, is there something available for contextual menus (ex: action on the selection)?

From Glamour examples (GLMBasicExamples):

| finder |
finder := GLMFinder new variableSizePanes.
finder show: [:a | a list
title: 'List';
display: [:each | $a to: each];
dynamicActionsOnSelection: [:list | {(GLMGenericAction new)  "add contextual actions"
action: [:each | self inform: 'Menu - Item', list selection printString]; 
title: 'Menu - Item ', list selection printString; 
yourself}];
act:#inspect icon: (Smalltalk ui icons iconNamed: #removeIcon) entitled:'my button' ]. "button for presentation"
finder openOn: $z

You get a contextual menu on the list and button on the presentation.
Hope it helps.

Yes, thanks a lot.

Christophe.

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

smime.p7s (5K) Download Attachment