Re: Future of GtkTooltips
- From: Damon Chaplin <damon karuna uklinux net>
- To: Christian Neumair <chris gnome-de org>
- Cc: gtk-devel-list gnome org
- Subject: Re: Future of GtkTooltips
- Date: Wed, 09 Feb 2005 13:17:10 +0000
On Wed, 2005-02-09 at 12:23, Christian Neumair wrote:
> Problems - in short - with the current tooltip system:
>
> - Not flexible enough (only plain text can be set)
> - Unable to set popup location
> - Exposes too many internals (GtkTooltipsData, tip_text, tip_private)
> without getters/setters
>
> Proposed resultions:
>
> Flexibility:
> - Use either GtkTextBuffer for powerful tooltips, might be overhead
> - Or use at least PangoMarkup or PangoLayout
>
> Location:
> - Model an optional function similar to GtkMenuPositionFunc
I think you should track mouse movement in the core GTK+ event handling
code, and setup the idle handler function there. Then when the idle
handler fires you can find out which widget the mouse is in and call a
new function like gtk_widget_show_tooltip() on it. (This hopefully means
it can be used for NO_WINDOW widgets as well as widgets with windows,
unlike the present code.)
The default gtk_widget_show_tooltip() class function would do basically
the same as now, but subclasses could override it so they could change
the position or text of the tooltip as appropriate. (But you'd provide
helper functions for doing the basic tooltip stuff.)
I'd use the code event handling code to check when to hide tips as well,
as that could be tricky.
I don't think the GtkTooltips thing is much use. Though I don't know the
code too well.
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]