Wow, the piecetable is crazy!
Just a quick update on my progress in the Summer of Code. One general observation: the piecetable is a highly-engineered, fairly complex chunk of code! I need a bit more “mentoring” than I anticipated when working with the piecetable, so I’ve decided to work on a few fronts: when I get stuck on one, I switch to another until someone shows up in IRC and can help (or, alternatively, until time helps me figure it out on my own).
First of all, I have the Stylist enhancements. I’ve added the “Add” button, which is succeeding in adding a hard-coded style. Right now, I’m working to make it add from the current selection. It looks like right now we can’t “rename” a style, which means I either prompt the user for a name (not what I’d prefer), generate a useful one automatically (possibly tough and/or insufficient) or implement some sort of rename, possibly just with the style label. (See next ) I will also revamp the display here, borrowing liberally from the GTK toolbar style list which shows only a nice subset of styles.
The addition of Labels to styles (splitting internal identifier from user-visible identifier) was the first task I tackled, and in retrospect, possibly a bad idea since it required direct PT work. I have all built-in styles adding a label by default, and I’ve gotten it to save. I still have to add some helper functions to pd_Style to handle labels, localize them, etc, as well as figure out how to change the UI’s. (It looks like I’ll probably need to have a map of Labels to Names added to some document-wide structure, presumably right next to the map of Names to pd_Style objects.)
Finally, we have the handling of the manual style editing system. I’ve started work on this by implementing “simplifyProperties,” which removes properties from a style if they are identical in the based-on style (that is, if they can be inherited). This will allow my edit dialog to show a useful list of applied properties, rather than a CSS-like string of every possible property. This is what I’m working on at this precise moment - trying to figure out how I somehow end up with “this” being 0×0 when I have a function member call another function member.
Till next time, keep on marching, ants!
Syndicated 2008-07-01 16:23:53 from code art life - Ryan Pavlik on ClearDefinition