Re: [gtk-list] Re: Pixmaps in gtk



Hi !

> > But I think you want to do more: For example a check-button: paint a 
> > mechanical switch in a paint-program, maybe with an led showing the state
> > (on/off), in the on and off position, but keep the background transparent.
> > Now, if the widget has to be drawn, it paints one of the two pixmaps.
> 
>  Yep, this is exactly what I had in mind (although ideally with the
> ability to paint pixmap'd borders as well). But presumably this means

The same way as with the check-button, only that you'll need 8 bitmaps:
the 4 corners and the 4 "bars" between them.

(assuming that GtkStyle gets done:)
First you'll need some rules about the size of the pixmaps, to avoid scaling
and complicated math. Then you'll have to change the code that handles the
automatic size-calculation: For example the X-size should be
corner_left_x + (h_bar_x * n) + corner_right_x
with n beeing integer.
The painting of such a border should be quite trivial.

> the pixmap style would either have to be part of the core library,
> or there'd have to be something in gtk telling it to link to an external
> set of style functions. 

I think they'll have the motif-style as a default style always linked into
GTK. But I see no problem in using ELF-shareable libraries for style-modules
that can be linked on run-time. Except for non-ELF systems that is. But
they can always have the hard-linked motif style.

			Jens Ch. Restemeier
			



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