• MorphOS Developer
    jacadcaps
    Posts: 2968 from 2003/3/5
    From: Canada
    Quote:

    Georg wrote:
    Why? And don't basically all GUI toolkits (like QT, GTK) on other systems have something like AskMinMax as well? And also include MUI like layouters (maybe even more complex=slow)?



    With Qt or Cocoa for instance, you don't generally have an AskMinMax/Layout approach. You set the positions/sizes/relations of objects and that's it. You don't have to worry about measuring text
    on every AskMinMax, because you don't need that info. In Qt or Cocoa you use a grid layout when you need a grid layout. With MUI you use a grid within a grid within a grid within... That's a lot of pointless AskMinMax & Layout calls and recalculations.

    Also keep in mind that MUI doesn't have any support for RTL scripts, etc. These would add an even bigger performance strain on the layouter. The only way around it would be aggressive caching and changing the way text is handled. See the Core Text Programming Guide, this is a good reference to how complex this really is. MUI's text capabilities are laughable in comparison.

    While caching would most likely break many apps' custom classes and layout hacks, you can't really replace the text engine without completely breaking MUI.

    Another breaking change you'd have to do to modernize MUI would be moving away from pixels in order to become DPI oriented. Also required if you wanted it to become a contemporary UI toolkit.

    MUI also lacks support for efficient scrolling of grid-layouted content. Sure, it's possible, just a lot of pain to deal with. Try to implement an infinite scrolling grid showing, say, Google image search results, with progressive downloading and decoding of images in the background as you scroll. Let me know how long it took ;)
  • »23.09.19 - 10:52
    Profile Visit Website