Re: drawing widget parts directly into pixmaps
- From: Paul Davis <paul linuxaudiosystems com>
- To: "Tuviah Snyder" <tuviah runrev com>
- Cc: gtk-list gnome org
- Subject: Re: drawing widget parts directly into pixmaps
- Date: Sat, 20 Sep 2003 16:47:22 -0400
> > 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.
>So what are my options, if any. Our X11 routines draw motif styled controls
>just fine. Our customers are requesting GTK themes so our apps look
>standard.
then you should probably port to GTK. if your goal is a tookit in
which "all widgets are pixmaps", then GTK doesn't make much sense. if
your goal is to look like GTK, you should probably have GTK do the work.
>Are you saying even if I associate a real GTKWidget with my internal custom
>control, I can't get GTK to draw the entire widget at the specified
>position?
you can, but its a lot of silly work arising from trying to combine
two different models of what a widget is. if you want a thing that
looks like a GTK widget on the screen, i'd put one there. if you want
to put a pixmap on the screen and change the pixmap when certain
things happen, then i'd do that. i wouldn't try to do both - they are
fundamentally different models of how to create a GUI. in the GTK
case, widgets are drawn using a series of small elements like lines,
shade elements, boxes and so forth. in the pixmap model, widgets are
drawn by blitting pixmaps to a drawable of some kind.
>>What you have to do is call the functions in gtkstyle.h. They aren't
>>quite as high level as a whole checkbox; at the moment you simply have
>>to copy the checkbox drawing code out of gtkcheckbox.c, for example, to
>>get the right set of gtkstyle.h calls.
>Yuck. And if I did that would it then draw correctly or the current theme?
i would withold your distaste a little. yes, if you call the functions
in gtkstyle.h, you'll get whatever the theme the user and/or
application has defined/selected (there is no single "GTK theme",
though there is a standard one for vanilla GTK, and a standard for any
given distribution of Linux. RedHat uses a theme they developed called
BlueCurve, for example).
>Will GTK work with KDE themes?
"themes" are completely toolkit-specific (how they are specified, what
is specified, etc). however, most existing themes for GTK have
counterparts for Qt and vice versa. you can make GTK apps look like Qt
ones, and vice versa. for the most part ...
--p
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]