the single units system

From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Mon Aug 12 2002 - 09:23:00 EDT

  • Next message: j.m.maurer: "Commit (HEAD): Localisation fix for po files"

    First of all, my appologies for a substantial number of commits in the
    past 24 hours without message to the list; my ISP was transferring to
    a new mail server and all my messages were bouncing back as
    "unauthorised relay".

    I have made a substantial progress on the transfer to a single units
    system, and got the rulers, status bar and scroll bars working on
    win32. The xp code is now fixed, so only some platform-specific
    changes are needed.

    The gist of it is this: everthing in the layout, graphics, ruler and
    statusbar classes is internally handled in our logical units. Also the
    scrollers work in the internal logical units. The changes required are
    roughly

    (1) in graphics classes, appropriate translation from the logical to
    the system units needs to be made where system calls are made.
    The getResolution() function needs to return the resolution in our
    logical units, e.g., if screen has a resolution 120 dpi then the
    resolution should be _UL(120) == 1024 * 120.

    (2) in frame classes all data for our scroller objects needs to be set
    in the logical units; the same goes for status bar. In the case of
    rulers there is one exception, AFAIR, the ::draw() function expects
    bounding rectangle in device units (since it is mostly called from the
    frame this seemed sensible).

    For the translation from one set of units to the other, please use the
    _UL/D and _UUL/D macros defined in ut_units.h; this will ensure we
    can change the resolution to anything we like later. The easiest way
    to work on this is probably to start with the drawing of the rulers;
    once they draw correctly, it is easier to debug the scrollers, since
    you can see how much the screen is or is not moving. As far as I
    remember, there should not be any changes necessary to the status
    bar platform code.

    I will now start working on the document area of the window, which
    is not drawing at the moment.

    Tomas



    This archive was generated by hypermail 2.1.4 : Mon Aug 12 2002 - 09:28:03 EDT