Re: TWM custom buttons (was: Multiple World integration)

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

Re: TWM custom buttons (was: Multiple World integration)

laurent laffont
Hi Benjamin,

Here's a first version where you can add your own buttons using a pragma, like this:

SomeClass class>>buttonTestRunner: aBuilder
<twmBarButton>
aBuilder 
action: [TestRunner open];
help: 'open TestRunner';
icon: TestRunner taskbarIcon'.

See TWMBarInANewWorldTest>>setUp  and tests.


Laurent.


On Fri, Jun 10, 2011 at 1:57 PM, laurent laffont <[hidden email]> wrote:
On Thu, Jun 9, 2011 at 8:36 PM, Benjamin <[hidden email]> wrote:



Here is a UGLY changeset, just to show you what I was talking about :)

OK I will look at it. It seems I'll have to go sleep late next days :)

Laurent

 

For now you have to defined your method with pragma before displaying the dock bar, and only support vertical bar, but like that you can see :) 

(and yes, using MenuSpec to build buttons is bad ;) but the pragma hierarchy is a bit weird, so you can't properly inherits :s )

So by example add the method: 

finderButtonOn: aBuilder 
"I build a menu"
<shortcutTWM>
(aBuilder item: #Finder)
action: [self open];
order: 0;
parent: #Tools;
help: 'Looking for something ?';
icon: self icon

on Finder class side, open the Dock bar :)



Ben

PS: if you like it, I can do a better implementation ;)

On Jun 8, 2011, at 5:07 PM, laurent laffont wrote:

On Wed, Jun 8, 2011 at 4:32 PM, Benjamin Van Ryseghem <[hidden email]> wrote:


2011/6/8 laurent laffont <[hidden email]>
On Wed, Jun 8, 2011 at 4:05 PM, Benjamin Van Ryseghem <[hidden email]> wrote:


On Jun 8, 2011, at 7:50 AM, laurent laffont wrote:

On Wed, Jun 8, 2011 at 7:35 AM, Stéphane Ducasse <[hidden email]> wrote:

the snapshotting looks really cool!

In nautilus benjmain added groups.


And TWM has already support for nautilus ;)


Cool :-)



I would like to know if we can use TWM as a kind of toolbar and add some custom shortcuts ?


What kind of shortcuts ?


I dunno, a button like when I click on it, it opens a Browser or something like that


Something like

AbstractTWMBarButton subclass: #MyDoSomethingButton

MyDoSomethingButton>>help
  ^ 'I do a wonderful thing'

MyDoSomethingButton>>icon
  ^ blabla asForm

MyDoSomethingButton>>execute
  MyThing new open.

MyDoSomethingButton>>priority
  ^ 25

and then TWMBar creates one button per AbstractTWMBarButton subclass.


Is this what you would like ?

And someone want to do this ? :) 


Laurent.



 


Ben
 

Laurent.



 



Ben



Laurent.


 


Stef



On Jun 7, 2011, at 10:33 PM, laurent laffont wrote:


> With the help of my local developper group, I've integrated Sean DeNigris work and now Tiling Window Manager supports Multiple Worlds.

>

> Here's a screencast that shows the progress. (My English seems a little less catastrophic than the previous screencast :)

>

> http://magaloma.blogspot.com/2011/06/multiple-worlds-for-twm.html

>

>

> Cheers,

>

> Laurent Laffont - @lolgzs

>

> Pharo Smalltalk Screencasts: http://www.pharocasts.com/

> Blog: http://magaloma.blogspot.com/

> Developer group: http://cara74.seasidehosting.st

>