Mac Port
Date: 29/12/2008
This week I'm working on the Mac port of Scribe again. And I've almost got native scroll bars intergrated with the Lgi objects and running nicely. Almost. Makes a big difference to the look and feel of the app to have native scroll bars. I will be looking at some other native controls over the next few days. Buttons, checkboxes, radio controls and groups, tab control etc.

I'm beginning to wonder if the Mac method of doing scrollbars would work on windows. If it did I could change the architecture of scrolling so that the "Mac" way was native to Lgi and other platforms have to support it or hack it in. The difference between Mac and Windows is that on Mac, the scroll view is one control (i.e. control == HWND) and the content is a separate control, which is then just moved so that the right part of the control is in view. On windows the scrollbars are built into your HWND (if you want them) and so you have just one control/HWND and you draw in a smaller client rectangle, with you drawing offset (by setting the origin of the HDC) by the right amount. I'm wondering if you can plug a separate child control into a HWND with scrollbars, the same as the Mac. Then I could rejig the API to do that all the time. It might even have some efficency gains with scrolling blocks of graphics memory around instead of re-drawing everything.

At the moment I've made the Mac way work by reimplementing the GLayout class to shoehorn the Mac API into the way that Lgi is expecting things to work. This means that the GLayout control is owning 2 controls instead of one, and hides that fact from the layers above. But it works so I'll stick with that till I either run into a showstopper issue or I re-write it to be the native way of doing things in Lgi.

Hmmmm.... native Mac controls.
Email (optional): (Will be HTML encoded to evade harvesting)
Remember username and/or email in a cookie.
Notify me of new posts in this thread via email.