Hi Julien, what I remember from history
- Jochen F. Rick had a "JRWorldManager" implemented back in 2010 - was discusssed here http://forum.world.st/Multiple-Worlds-was-Re-Can-I-use-Projects-in-Pharo-td2240869.html - code is here http://forum.world.st/attachment/2242195/0/JRWorldManager.st (basically something to manage the desktops) - then Sean picked up the idea in 2011 and implemented - blog post http://seandenigris.com/blog/?p=767 - he provided "MultipleWorlds.2.cs" which I think is lost during bugtracker transition - later default Pharo image was reworked for the world to have WorldMorph instances instead of Squeaks PasteUpMorph, so the code of Sean and Jochen would be obsolete anyway Some tips: ========== - Pharo has a global called "World" which is pointing to the current world of displayed morphs, you need to switch this and handle/manage new Worlds = Desktops. - in older Pharo versions and Squeak this was a PasteUpMorph, now it is an instance of class "WorldMorph" - note that there is a class side method "installNewWorld" with the nice comment "let us play God." - basically you already have the parts with a DeskopManager and the switch via keyboard, you just need to play with #installNewWorld and #install method of the worlds Note: check the comments of the class and methods in WorldMorph - this might be subject to change - to get a thumbnail form of the world you can use: |sizeFactor| sizeFactor := 0.3. World taskThumbnailOfSize: (Display width * sizeFactor) @ (Display height * sizeFactor) - see how the preview is handled in TaskListMorph newPreviewMorph/updatePreview methods to get an idea So all the pieces of the puzzle are there - just connect them correctly. Side Note: default Pharo image has the possibility to put an external picture somewhere that is used by the theme as the background image. Cant remember where it is - just browser for "background..." methods in the Finder. With multiple desktops I guess this needs some love as well to have a backgorund per desktop. Hope that helps! Bye Torsten > Gesendet: Montag, 24. August 2015 um 19:46 Uhr > Von: "Julien Delplanque" <jul...@tamere.eu> > An: "Torsten Bergmann" <asta...@gmx.de>, "Any question about pharo is > welcome" <pharo-users@lists.pharo.org>, "Stéphane Ducasse" > <stephane.duca...@inria.fr>, "Marcus Denker" <marcus.den...@inria.fr>, > s...@clipperadams.com > Betreff: Re: Multi desktops inside Pharo! > > > > On 24/08/15 19:32, Torsten Bergmann wrote: > > Julien Delplanque wrote: > >> I created a small utility that make possible to have multi desktops: > >> https://github.com/juliendelplanque/desktopsmanager. > > Your code works for me in Pharo 5, havent tried in Pharo 4. > > > > Unfortunately it does only work for Pharo "windows" but not general morphs. > > If you evaluate > > > > ElipseMorph new openInWorld > > > > and hit CTRL+SHIFT+J you will see that the morph stays on the desktop. > > So your goodie is a "window switcher" and not a "desktop switcher". > Yes you are right. But it is a first step, I planned to really create > "new desktops" in the future, but for now I wrote this fast to have > something usable. > > > > I guess it would be better if you would really switch the WorldMorph > > instance > > referenced by the global "World" variable. > > > > There already was a solutions once discussed/contributed with code here > > > > http://forum.world.st/Multiple-Worlds-for-Pharo-stable-td3233552.html > > http://seandenigris.com/blog/?p=767 > > > > I think it got lost in the old bugtracker. Maybe Sean (who wrote it) can > > help here, > > update the code and merge with yours. > Yes I'm OK to do that. Where can I find this package? > > > > > > Ideally such a "Switch desktop" possibility would be part of the > > standard Pharo 5 image including a small preview of the whole desktop > > similar to what usual operating system window manager do and the possibility > > to provide different backgrounds to the desktops. > It would be really nice to have multiple world by default in pharo images :) > > > > Thanks > > Torsten > Julien > >