Find the answer to your Linux question:
Results 1 to 5 of 5
Hi.. Could someone explain how widget libraries in X work? Here's what I think happens. If I'm wrong please correct me. The X windows is a system which enables graphical ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    36

    [SOLVED] Understanding widget libraries with X window


    Hi.. Could someone explain how widget libraries in X work? Here's what I think happens. If I'm wrong please correct me.

    The X windows is a system which enables graphical interfaces. It can take inputs and display outputs of programs.
    X has an API which allows programmers to make GUI's for their programs. However, the default X window widget API is very difficult and inconvenient to use, so other programmers have come up with widget libraries. A widget library is an API which presents the X window functions in a more usable form to developers.

    Is that correct?

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Yes.

    There is also a standard library "xt widgets" for X. It does provide some convenience functions to create widgets, but has no facilities to display widgets. (It's more about describing the logics of widgets/menus.)
    I wouldn't say it's difficult to use. It's just that it does have no functions to draw the actual widgets. Therefore programmers use other libraries so that they don't have to care about how to draw buttons etc.

    A widget library is an API which presents the X window functions in a more usable form to developers.
    Right. But more important: It gives them a means to display widgets which have a a standardized look. So if I use the GTK+ library, the program automatically respect the colour sheme the user has selected in GNOME etc.
    If I use QT instead, it looks like any other KDE programm.
    Debian GNU/Linux -- You know you want it.

  3. #3
    Just Joined!
    Join Date
    Apr 2008
    Posts
    36
    So would be correct to say that all widget toolkits use the basic functions that X provides?

  4. #4
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Yes, by all means.
    Debian GNU/Linux -- You know you want it.

  5. #5
    Just Joined!
    Join Date
    Apr 2008
    Posts
    36
    Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •