Phorg
Monday, January 28th, 2008Another project I have on the go is a picture viewer. I know, not that exciting, but it’s entire purpose in life is to allow me to learn more about Mac programming. It loads the picture thumbnails using multithreading and it allows dynamic resizing of the window and the thumbnails.
Here’s a look at the window so far:
I was starting to code up a zoom window for it yesterday - so you could double click thumbnails and see the picture in a larger window - but then I got to wondering if it was possible to use the Quick Look window that comes with Leopard. It turns out, it IS possible! It’s a bit of a hack but the code I found to do it wasn’t that bad to look at and it’s contained in a small area of the code base so I can replace it later if the hack breaks. I found the info here.
So I changed the code to behave like Quick Look does in the Finder. Pressing SPACE will zoom the selected pictures into the Quick Look window and pressing it again will close the window. It works!
Quick Look is great. Imagine the possibilities this opens up for the ToeTag texture browser. Muhaha.
In closing, here’s a movie of the pictures loading using multithreading. Why? Why not? You’re at work and you’re bored.

