This week I started off by trying to get the item list to render. Several times along the way I decided that the rendering an item was way too complex for the tools that we had, so I developed some new classes to try to simplify things.
A lot of them had to do with laying out things and in particular laying out things without something to draw to. I made a class to handle text layout that’s sort of a trimmed down version of pango or NSLayoutManager. Also, a Font class that gives a few metrics. A Button class to size native (or non-native on windows) buttons. And finally a Layout class, which gives a higher level interface to all of the above.
The buttons are working out pretty cool. On OS X we use a NSButtonCell, so it’s as native as you can get. On GTK we get the user’s current style then use it to render buttons — I’m pretty sure this is what Firefox 3 is doing. You could argue that this is not quite “native”, but I can’t tell the difference. On windows we just render our own, which you could say is native for that platform
I got buttons working around Thursday. On Friday I had to take a trip to DC. It seems like a lot of folks were talking about git-svn, so I decided to give it a try. Fetching the source from subversion was a pretty awful experience, but after that things were pretty awesome. I was committing changesets while driving down route 15, then checking them in to our server when I got an internet connection.
The last tool I developed was a box-packing system for rendering cells. For a while I was trying to calculate things by hand, but the layout there is really too complicated for that. Now we use some basic hboxes/vboxes and alignments and it works pretty well. I’m feeling like the system that is in place now is basically what we need and it’s only going to need tweaking rather than creating new stuff.
The last thing I did was add download progress bars. They are still a work in progress, but when I first saw the info updating every 0.5 seconds it made me want to jump for joy.
0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment