Re: [gtk-list] Re: Pixmaps in gtk
- From: Joel Dillon <jo dillon new oxford ac uk>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Pixmaps in gtk
- Date: Sat, 4 Oct 1997 14:56:26 +0100 (BST)
On Sat, 4 Oct 1997, Michael K. Johnson wrote:
>
> jchrr@HRZ.Uni-Bielefeld.DE writes:
> >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.
> >
> >This can't currently be done with gtk...
>
> I beg to differ. Buttons can hold any widget, including GtkPixmaps.
> While handling the button-press event, swap in a different GtkPixmap.
> You can make the user_data be a pointer to an array of GtkPixmaps,
> and drop the correct one in at each button press.
Well, yes...but what about check boxes, backgrounds in text areas and
so on? Also, that would be reliant on hand-written code in each
application to handle the buttons (or non-standard gtk widgets). It
would be better to have styles which the user could switch at will,
so that he can decide that a particular app or all his apps will look
like Motif, or Windows, or his own custom pixmapified scheme (which
means that the pixmap-heavy style might need its own configuration
file, or that the application rc file support different data for
different schemes)
> It wouldn't be hard, I think, to subclass the gtk button to get a
> multi-pixmap button that would do this itself.
>
> Now, completed GtkStyles might make it a little bit easier to get
> the effect you mention, but they aren't required.
>
> michaelkjohnson
>
> "Magazines all too frequently lead to books and should be regarded by the
> prudent as the heavy petting of literature." -- Fran Lebowitz
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]