Low level window object and high level window object - Motif

This is a discussion on Low level window object and high level window object - Motif ; Hello Experts! I'm reading in a document about window system and in here I read this text that follows. "The X Window System distinguishes between a low level window object that describes a screen area and a high level window ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Low level window object and high level window object

  1. Low level window object and high level window object

    Hello Experts!

    I'm reading in a document about window system and in here I read this text
    that follows.

    "The X Window System distinguishes between a low level window object that
    describes a screen
    area and a high level window object that encompasses event handling and
    drawing on the
    window. It uses the term window for the low level object and widget for the
    high level. Because
    the functions of Xlib are too low level, another library of functions (the X
    Intrinsics) and objects
    (the X Widgets) has been build on top of it. Collectively the Intrinsics and
    the Widgets are known
    as the X Toolkit (Xt). Additional toolkits have been built on top of Xt, the
    most widely used being
    Motif. Therefore direct window creation is rarely found in X applications.
    Instead it is preferable
    to create a widget."

    What I don't understand is when they say that the low level object describe
    a screen area?

    If you for example create two programs the first one only by using low level
    object which you do by using the xlib api. The second program use high level
    object by using Toolkit from Xt or Motif.
    What will the difference be?

    In the text they say that high level encompasses event handling and drawing
    on the
    window. But how do you manage event handling and drawing on the sceen when
    you use low level object then?

    Many thanks in advance.

    //Tony




  2. Re: Low level window object and high level window object

    Tony Johansson wrote:
    > In the text they say that high level encompasses event handling and drawing
    > on the
    > window. But how do you manage event handling and drawing on the sceen when
    > you use low level object then?


    If you create a raw window, you must then handle all X events such as mouse
    mouvement, redrawing of window when a window in front of it is moved or
    closed, when a keyboard event occurs etc.

    If you create a multiline text input widget. (XmText widget in Motif
    parlance), there is code behind the object that handles all the low level X
    finctions associated with making the widget work, not only the very basic
    stuff such as redrawing, moving etc, but also will provide you with basic
    editing functions, possible automatic word wrapping, text selection etc. You
    can configure the widget to automatically call a routine of yours when certain
    events happen (such as object gaining input focus, the user pressing return etc).

    Furthermore, when you create a multiline text input widget (as an example),
    you can also specify you want scroll bars. Those will be create and handled
    automatically and your application need not be concerned about it. What
    happens is that a hiearchy of widgerts is created, first a window that
    encompasses the whole XmText, then scroll bars, then the actual text input
    area.

    If you were to do this in raw low level X, you'd have to manually do all fo
    that and handle all events associated with it. Using the scroll bares would
    require you to manually redraw the text in the window for instance, and move
    the actual scroll bar indicators (or provbably even redraw them).


    X -> raw plastic pellets
    X intrinsics: vanilla lego blocks
    Motif -> kit to build a lego spaceship from pre-assembled parts.

+ Reply to Thread