Re: GtkExpander/GtkDisclosure
- From: Mark McLoughlin <mark skynet ie>
- To: Ray Strode <halfline hawaii rr com>
- Cc: gtk-devel-list gnome org
- Subject: Re: GtkExpander/GtkDisclosure
- Date: 13 Mar 2003 12:51:47 +1300
Hi Ray,
On Thu, 2003-03-13 at 07:48, Ray Strode wrote:
> > 2) I recently implemented a GtkBin sub-class which displays an expander
> > arrow and label at the top of the widget and hides/shows the GtkBin
> > child depending on whether the widget is expanded or collapsed.
>
> I personally think that this method is the better method of the two. It
> seems to fit better with the rest of
> GTK+. Nevertheless, couldn't you simplify your code quite a bit by just
> adding a GtkCheckButton that
> contains a GtkLabel and GtkArrow into your container as an internal
> child? Your widget will still be a
> subclass of GtkBin, but you won't have to duplicate existing
> functionality (which can always lead to
> inconsistencies).
Yes, I considered this. But what you'd really end with is both
approaches. You'd need to implement a GtkCheckButton sub-class and embed
that in the GtkBin sub-class. Also, it would be a little weird because
most of the operations you need to do would be on the GtkCheckButton
sub-class and that's where the "toggled" signal would come from too.
So, yes I think it would simplify the implementation but I think it
would be a very confusing API for such a conceptually simple widget.
> Also, I don't really see a reason why the widget
> can't be NO_WINDOW.
You need to recieve button press and motion/crossing events. You can't
do that with a NO_WINDOW widget right ?
Good Luck,
Mark.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]