Movatterモバイル変換
[0]ホーム
GUI Toolkit API?
Boudewijn Remptboud at rempt.xs4all.nl
Sat Apr 21 14:12:18 EDT 2001
Vadim Zeitlin <zeitlin at seth.lpthe.jussieu.fr> wrote:> But, to return to the main subject: I don't belive that you can do it. Even> with unlimited amount of free time (a strong assumption) it would still be> difficult to do it without creating a 100Mb monster library collapsing under> its own weight and complexity.There's also the most common denominator problem. It's easy to codesomething up that wraps the buttons and text fields of all toolkits,since all toolkits have those. That's what Sun has done with AWT,basically. However, if you want to have all the great extensions thatevery toolkit provides, then you'll have to write emulation code forthe missing bits, _if_ you're set on using what's already available. That's the position of wxWindows. Correct me if I'm wrong, but I ratherhad the impression that all the really interesting, high-level widgetswxWindows offers are custom-coded for wxWindows, like the html-widget.Or, and that's the approach Qt takes, and tk took before it startedusing native widgets (if I remember correctly), you can write aportable toolkit - portable in that it compiles on every platform thathas primitives for drawLine and putPixel, and make it emulate theplatform look and feel. Swing takes this route, too. It's quite doable,and can lead to good results (Qt looks and feels just native), or tobad results (Swing), but it can work. See also Trolltech's paper on thesubject:ftp://ftp.trolltech.com/qt/pdf/whitepaper.pdf. Covering all existing API's with a new API is basically a pipe-dream,that doesn't solve any problem. It merely adds surfeit to an alreadyexisting embarrasment of choice, and will never make the lower APIdisappear... Trying to get everyone to use the same uber-API is a political endeavor,not a technical. People chose one API over another because they like thestyle of coding better, or because of its cross-platform availability, notbecause it keeps users of all other API's contented. Personally, I likechoice - I've carefully evaluated all gui toolkits before choosing one:PyQt, PythonQt, tkInter, wxWindows, wxGTK, Amulet, Foxpy, pyFLTK... Notthe MFC bindings of Python, though - I didn't need to, having been aWindows programmer in a prior life ;-).-- Boudewijn Rempt |http://www.valdyas.org | Christos Voskrese!
More information about the Python-listmailing list
[8]ページ先頭