Scaling

Remember when you used Orbit... and you opened tons of loops and it started going out of the screen?
Well... Not anymore! I've added a feature to Orbit that makes it know where it is and scale/move itself so it doesn't go off the screen. Looks nice! Looks solid. :)

In other news... It seems that my background rendering screwed up my timers for hiding (transparent mode) and open folders on mouse-over (all modes). It's gonna be fixed... It's gonna be fixed...


Threads

Hey! Yesterday I did some changes to the rendering process in Orbit. Previously I was using a Timer to trigger a frame rendering. Now I've introduced a background thread that triggers the rendering. So now Orbit is kinda multi-threaded when running. There are a few places where I use threading in Orbit, which I'm kinda happy about. Here's what we have:

- Application Thread (WinProc)
Main thread where all user input events and loading happens
- Rendering Thread
This thread is there just to call the Draw method. This allows me to update the screen gracefully while the app thread is busy with something else (like loading a loop)
- Thumbnails Thread
This is a intermittent thread. It exists only if the user has "Show Image Preview Thumbnails" in their config selected. It's a thread that's created for every loop that's loaded. It goes through the items in that new loop acquiring the thumbnails for items that support thumbnailing (Tasks and Image files). For some reason, on large folders, this thread is breaking and taking with it all thumbnail previews for the rest of the program lifetime. I have still to find out what it is. But generally, it works 100%.

And all of these threads coexist in various points of the program. With all these threads, Orbit ends up having a common base (the item registry) which can be simultaneously accessed and modified by three different threads earlier on this was quite confusing :) but now it's sorted :)
It's very common for the thumbnail and Rendering thread to share data. Like, everytime a thumbnail is acquired successfully in the thumb thread, it pops up an event (the item does, in fact) which changes a flag in the render thread demanding it to render the next frame (yes, Orbit only updates the screen if needed). I know it sounds pretty lame, but I'm quite happy about how it all works :)

Plus... With this background rendering... I was finally able to introduce loading indicators into Orbit (non transparent mode-only so far). So you know that Orbit's not dead :) and eventually, events get queued (clicking on one folder then clicking on another).
Aw well... Gotta study. Cheers!


Click here to see previous messages
Rate my devblog
Give my blog a rating

Security Tips
Protect yourself agains the Sasser worm! Get WindowsXP Service Pack 2

Message History
30/04/2006 to 06/05/2006
06/11/2005 to 12/11/2005
04/09/2005 to 10/09/2005
03/04/2005 to 09/04/2005
20/03/2005 to 26/03/2005
23/01/2005 to 29/01/2005
16/01/2005 to 22/01/2005
02/01/2005 to 08/01/2005
26/12/2004 to 01/01/2005
19/12/2004 to 25/12/2004
12/12/2004 to 18/12/2004
28/11/2004 to 04/12/2004
14/11/2004 to 20/11/2004
17/10/2004 to 23/10/2004
10/10/2004 to 16/10/2004
03/10/2004 to 09/10/2004
19/09/2004 to 25/09/2004
12/09/2004 to 18/09/2004
05/09/2004 to 11/09/2004
29/08/2004 to 04/09/2004
22/08/2004 to 28/08/2004

Other sites
Orbit Homepage
Enhanced Labs & Orbit Support Forums
Enhanced Labs
Neowin


Disclaimer: All posts are provided "as is". All code snippets are provided for free use as long as credit is given.
2004 Lucas Mendes Menge