Re: I don't think I need a custom widget



Greg Breland wrote:
[...]
This sounds like a workable idea as long as it won't alter the
allocation request of the child widget.

You mean the size-request (aka GtkRequisition) ?

Usually a size-request isn't needed on a widget, but you shoulnt
allow a widget to have an allocation that is smaller than the
requisition (at least, um, I dont think you should).

Since most widgets have their own window, I can't draw to my custom  > container unless it is larger than the 
child widget?

In what case would you draw to your container ? dont you want to
draw the selection to the children ?

Hmm, I'm sure there are a bunch of examples for this, but you can
find one at $(gnomecvs)/glade3/src/glade-utils.c:
glade_util_draw_nodes_idle().

I think your event-box idea is good though, what glade-3 does is unset
the GTK_NO_WINDOW flag on all created widgets (this might not be
possible or appropriate in your situation).

The other issue is that is would double my widget count.  I am REALLY
not worried about this since an event box probably doesn't have much
overhead, but if anyone knows different I'd appreciate feedback.

    Personally I wouldn't bother with that worry (unless the context
makes it /really/ count); If using a GtkEventBox makes your application
"make sence" and "respect the rules" etc etc, then I'd use it.

Cheers,
                                 -Tristan




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