Re: gtk_widget_set_has_tooltip()

On Sat, Jul 28, 2007 at 03:22:29PM +0200, Murray Cumming wrote:
> I don't understand why gtk_widget_set_has_tooltip() exists. This is set
> automatically when calling gtk_widget_set_tooltip_text().

Yes it is, but only because gtk_widget_set_tooltip_text() is really a
convenience function, which hooks up a default handler for you and sets
the property.

> If it's only for use when implementing widgets with more complex tooltip
> APIs, such as GtkTreeView and GtkIconView, then I think the
> documentation should say so.

If you don't decide to use the convenience function, you will have to
write a query-tooltip callback and set the has-tooltip property
yourself.  Also on "simple" widgets where you need something more
advanced than just a single tooltip you might want to write your own
callback, and thus have to set has-tooltip yourself -- it isn't strictly
limited to "complex" widgets.

I think the documentation for the tooltip-text and tooltip-markup
properties is currently very clear in saying that they are convenience
functions, setting up exactly these two things for you.



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