Re: drawing widget parts directly into pixmaps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>Hello my application uses the appearence manager and the new windows xp =
>theme manager to draw widgets directly into pixmaps without using what =
>some would consider real controls. This enables us to port our =
>application easily between platforms and ensure that things like =
>layering (you can layer one control on another) work correctly. We wrote =
>most of our own widget display routines many years ago in low level X11 =
>(not fun!), However we are considering using GTK to add theme support =
>for Linux.

Silly idea, if you ask me. Why? First of all, GTK is firmly built
around the idea of widgets as active objects, not just passive control
areas on the screen. Second, by using GTK for such purposes, you
immediately balkanize your stuff to exclude interaction with plugin
code that might want to use a different toolkit. Personally, unless
you need the more structured widgets that GTK or Qt and the rest
provide, I would stick with your X11 port.

>General questions - Will GTK work with most Linux themes out there? The =
>only other alternatives I know are Motif or QT.

I think you may be confused about what "themes" mean in a Linux
context.

Under X11, most people use widget toolkits to do GUI programming
rather than raw Xlib calls. There are quite a number of toolkits (at
least 6 worth listing, and probably more), and they are all
essentially incompatible with each other - you cannot use widgets from
more than one toolkit in a given program (a horrible and silly
misdesign, but that's life right now). Each toolkit has its own
"standard" appearance dictated by conventions about how it draws things
like buttons, sliders etc. However, the toolkits are not "themes" in
the X11-related sense of the word.

A "theme" in most X11 toolkits arises from the fact that several
toolkits (most notably GTK and Qt) make it possible to alter the way
that basic drawing of widget design elements is done, as well as any
pixmaps that may or may not be used for some purposes. I believe that
in the Windows world, this is called "skinning". As a result, you can
change the basic appearance of an application without recompiling.

Some themes exist that can make a GTK application look more like a
Motif application, or a Qt application more like a Windows app. GTK in
particular has a theme that uses pixmaps to draw almost everything,
though not in the sense that you are (it uses pixmaps to draw each
edge of a button, for example, not one pixmap for the entire
button). This theme is widely used to customize application
appearances. 

If you want to talk more about this, feel free to email me. Its an
area I have thought about a great deal because I have wanted to port a
GUI library that uses the "all widgets are pixmaps" model to X11 for
quite a long time.

--p

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux