If you haven’t seen the Ruby Shoes graphical framework, you should check it out. In fact, go read the tutorial and come back, because the rest of this will make a lot more sense then.
It’s a very slick toolkit, right? Not only that, but it works on Windows, Linux, and Mac OS X … unlike what I’m about to show you, which works only where PowerShell works …
So, I’m curious if anyone would like something like that for PowerShell … and more to the point, how many people would be interested in it, and whether anyone would be willing to help write it (because exposing all of the properties of the various controls is going to require a lot of repetitive coding).
As a disclaimer, I copied the examples here from the Shoes tutorial I mentioned earlier, which is why they’re slightly kooky (Why The Lucky Stiff is a strange guy), and why I suggested you go read it before you read this. Of course, although these demos do work —and it’s all skinable and themeable— this is practically all that works in my demo, so don’t go thinking I’ve got a whole Shoes implementation for PowerShell.
I’m just trying to gauge the interest level — so if you’re interested, please comment below and let me know that you want it, what sorts of things you want it for (if you can think of any off the top of your head), and/or how involved you’d like to be. I’d love for someone to say: “Wow, that’s a great idea, I’m going to go finish it”, but anything short of that, right down to “I’d give you $5 to write it and give it away” is acceptable
One final note: the Out-Wpf cmdlet that you see here does work in v1 and v2 and can even do this (click for the full picture):
I’ll release that later this week…
I’ve released a full script-based version of this. While it does everything you see above and more, it does not work in PowerShell 1. You can get an idea of how to use it by following the PowerBoots tutorial, and you can download PowerBoots, but for now it requires v2 CTP3. Let me hear from you if v1 support is important to ya.
It'd be great to see this.
I put a small script together a while back to try it with WinForms.
http://dougfinke.com/blog/?p=390
I like your approach with piping
I prefer the syntax that Doug used. But I personally would just learn WPF and use your Out-WPF.
Yeah, I kind of like the ruby syntax myself … but I think the Pipeline syntax is a little more natural (and powerful) in PowerShell. Actually I'm wrestling with events at the moment, I'm not sure they work right against PowerShell when it's not in STA mode…
The thing is, in WPF you don't have the limitations that Shoes has, so I can put an image into a button, for instance — the ruby syntax doesn't seem to accommodate that very well — it uses the same syntax (curly braces) for the default (click) handler on the button as for content on container controls. Of course, I might just be misinterpreting the significance … my Ruby is still weak.
+1 I love this idea. I don't know how much help I could be on creating it, though, since I have no experience with C#. I have access to Visual Studio, though, and if you have some grunt work that you need help with (perhaps some of that repetitive coding), email me and I'll see what I can do. I would love to see this come to fruition.
Not able to help out, but I'd definately be very interested in a toolkit like that
Or rather, I'm not able to help out with the coding, but if you need help with anything else, I'd be willing to help out.
I'd be very interested in this, especially as a possible replacement for HTAs. I might be able to help with some of it, although with the upcoming semester and work I'm not 100% sure how much time I'll have to devote to it.
Hmmm.. There's also a language called REBOL that uses a dialect (DSL) to construct a GUI – This might also be another source of inspiration on how to lay things out.
I.e
view layout [ button "Click Me!" [print "click!" ] ]
which is the same as writing:
layout [ button1: button "Click Me!" [print "click!" ] ] | view
The two concepts are much the same???
Anyway, love using the REBOL to write quick dirty GUIs – and I'd love to use powershell to do the same thing. Ddidn't think the WPF samples on the offical powershell blog were very easy to use in comparison… Your DSL looks much better!
Small tutorial at http://www.rebol.com/docs/easy-vid.html
One thing I would love, is a way to make the entire Posh console an aero glass window, so the whole console window would be on blurred glass.
Proofs of concept:
http://img407.imageshack.us/img407/3838/aerocmdbl…;
http://img102.imageshack.us/img102/5760/aerocmdcl…;
I'm not sure if this is something that you could/would do, but it would be very cool. A great one-up to the *nix users with their transparent consoles.
Hmm… That could be done, possibly as an option for PoshConsole. I wouldn’t use the fully transparent version, but I might be convinced to make it an option. Here’s what it looks like right now (when it’s not in “quake mode”):
I’ve got a release coming later this weekend.