Flex Panel Expose Attempt

Rather than let the code rot on my harddrive, figured I’d put it up here at least. Trying to emulate in Flex what Expose does on the Mac. You can hit F9, and all open windows will shrink so they fit on your desktop. You can then choose which one to bring in front. It’s really nice because of instead of going “elsewhere” to get to the window you want, you can just click it. Helpful for drag and drop stuff too.

The window placing algorithm was frikin hard, and I never got window selection working. The cover shows up automatically instead of showing up when you hover over the window. Tons of things wrong and unfinished, but only messed with this for a couple of hours. Anyway, first time I’ve done state & transitions this heavy in code. Gotta say, it sucks. Love using Design View much better. Regardless, would of loved to have this code style years ago in Flash, that’s for sure.

Using Zinc, you can have it work on your desktop. It’s not as good as my old stuff, but just bored on a Tuesday night and this is what I ended up with after a couple of hours of playing around. To preview it in the browser, click the button first to give Flex focus, and then press F9.

Flex Panel Expose – Preview on Desktop | View in Browser | Source | ZIP

11 Replies to “Flex Panel Expose Attempt”

  1. Many people nicely informed me my site didn’t work with IE7 even when IE7 was just on beta 2.

    Since I’ve had some free time the past 2 weeks, I’ve finally made it work in all browsers. Unfortunately, using 32bit PNG’s doesn’t work in lower browsers, and my design doesn’t fly in lower browsers, so I had to axe it. Don’t have time to design a new one, so went with default stuff till I can come up with a new design.

  2. I’m with ya Serge. It’ll be easier for Flex apps to take advantage of Expose when windows are made easier via things like Apollo or an updated mProjector.

  3. I have a Mac too!

    With windows I mean “windows”, not “Windows”. Flex Panels right now are created all in the same window. Although PC people won’t benefit, things like Apollo and mProjector will integrate nicely into Expose.

  4. Jesse, you beat me to it! I promise I didn’t copy you :) I started working on this soon after I bought my first Mac, sometime in mid-November. I was hoping to finish it sooner, but, as you know, it’s hard to make a component that can simply be plugged into any app, without any bugs or known issues. Then I got desperate and thought I’d post a demo anyway.

    Your implementation looks nice, but I suspect it doesn’t emulate the exact OS X behaviour (just from a cursory look at the code). I’m yet to run it though: this machine does’t have FP9.

    More on this later. I’ll probably send you my messed up source code, if you promise not to tell anyone what a crappy programmer I am.

    Have a nice weekend!

  5. Naw, mine doesn’t emulate it well at all. I was bored and this was the result of a few hours of techno n’ code. I’ve played with yours and it’s a lot better. You obviously have spent some quality time on it.

  6. I see you are using a Draggable TItleWindow. I have a similar requirement. The problem I have is that it I want this window to be draggable only via the title bar (mimic the bahaviour just like popup but without actually opening it as popup). Do u have any ideas in mind.

  7. May I know what kind of algorithm you are using to pack your windows together? issit some variation of a heuristic strip packing method or are you using some form of a local search method…. seems very interesting.

Comments are closed.