From: Neil Hodgson Date: 2000-12-16T11:10:02+09:00 Subject: [ruby-talk:7373] Re: A Java Developer's Wish List for Ruby Aleksi Niemel: > Now, the editor part was syntax-highlighted so I guess the smiley was in > right place, but why would the charting package be harder? Is it because of > inadequate canvas components? That editor part is a plugin. > Gtk+ canvas should be pretty good, so I wonder if it's because Mozilla uses > what is lowest common denominator. Once you drop down to platform specific code you can use all the platform richness you want. Then you have to consider why you are using Mozilla rather than just directly using GTK+, which will be less platform dependent than using GTK+ with Mozilla. Only the Unix|Linux/X version of Mozilla has any GTK+ support - Mozilla on Windows and BeOS has none. Mozilla has a cross platform drawing toolkit, but its hard to add your own code that uses it. There is little documentation and no sensible way of adding new widgets - too much hard-coding. I spent a couple of weeks trying to work out how to do this sort of stuff and ended up believing that plugins are the only way to do this /now/ as opposed to what might be possible in Mozilla some day. There is no equivalent to the GTK+ canvas widget within Mozilla unless you want to think of a whole HTML/XUL rendering surface as a widget. Sometimes Mozilla uses embedded HTML/XUL areas to implement elements. I think scroll bars are now done like this. > How do the plug-ins do this in general? (Acrobat, flash, java etc.) If > there's a bitmap where the the picture could be explicitly drawed, I guess > something like GD could be used for it (or maybe even the normal Gtk > routines). Currently, all plugins are reimplemented for each platform. Sample plugins are #ifdefed to support Windows, X, and Macintosh. They are given a native window and often create child windows to do the real work. Neil