My work on cleaning up Factor's UI is coming along well. I have proceeded from Photoshop mockups to actual implementation in Factor. Here are some examples of what it currently looks like.
A tuple's documentation: http://skitch.com/klazuka/b6fpy/label A generic word's documentation: http://skitch.com/klazuka/b6fct/draw-gadget A simple word definition: http://skitch.com/klazuka/b6fc4/theme-image A few of the principal changes: - The prettyprinter now does some simple syntax highlighting of Factor code. - Buttons no longer display the gesture in the button's label (instead, the keyboard shortcut is shown in the status-bar whenever the mouse cursor hovers over the button). - Labels (and formatted streams) can now specify a text shadow color (a la Apple). - The status-bar now uses the same dark slate blue color as Factor's existing scrollbar and checkbox graphics. - All gray background boxes were replaced by a light tan color (to match the tans in the rest of Factor's UI elements). - The browser now has a 10px left internal margin so that the text isn't jammed up against the left edge of the window. The big problem that I have run into is that, as a consequence of being so new to Factor, I'm unsure how to structure my changes to the prettyprinter. In fact, some of my changes are a little hack-y because I don't have a deep understanding of how the prettyprinter works (I haven't studied its source code deeply yet). One thing I have considered is moving "word-style" and "string-style" out of the "prettyprinter.backend" vocab and into a new vocab, say, "prettyprinter.stylesheet" (similar to how styles are handled in the "help" vocab). But before I can do that, I need to get control of where and how the prettyprinter decides to print each object based on its type. The biggest hack right now is that in order to make the vocab names in the USING:/IN: lists a light gray color, I have to rely on the fact that those strings are passed through and styled by the "presented-text" word rather than something more obvious like a pprint* method defined on vocab. I would feel more comfortable if I was hooking into a place that was strictly intended for vocab names or was actually dispatched on the vocab type. Another basic question is how should the "presented-text" word be used? Another strange thing that I have found is that when the prettyprinter prints a stack effect by itself, then the pprint* word is dispatched on the effect type. But when the prettyprinter prints a stack effect as part of a word definition, it does not call effect's pprint* method implementation. This makes it difficult to highlight the stack effect. So in summary, could someone explain how the prettyprinter decides to output a single object? Is there a funnel word through which each object must pass in order to be written to the screen? It seems like it would be the pprint* word, but as I mentioned above, it doesn't seem to be called sometimes. If I could hook into this funnel word, then it would be easy to specify color styles in a very specific and clear way. Ideally, I would have a separate prettyprinter.stylesheet vocab with words such as "word-style", "vocab-name-style", "effect-style", "string-style", "number-style", and "default-style" which would serve as a single configuration point for the prettyprinter's syntax highlighting. Any suggestions? If anyone cares to look at what I wrote, here is the diff against e48cdd4: http://gist.github.com/181765 And my branch: http://github.com/klazuka/factor/tree/ui-tweaks As I mentioned above, I am new to Factor, so I would love some feedback and improvements! -keith ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
