Customize GtkTooltip position



I've settled on subclassing GtkTooltip:
  . create a new type, GTK_TYPE_TOOLTIP_POSITION
  . add three new instance members, gint position_x, gint position_y,
gboolean position_override
  . override the class function gtk_tooltip_position: if
position_override: gtk_window_move to position_x and position_y;
position_override = FALSE, otherwise: call parent (original)
gtk_tooltip_position.

However, I can't figure out how to override the "query-tooltip" signal
and "query-tooltip" default handler to use GTK_TYPE_TOOLTIP_POSITION
instead of GTK_TYPE_TOOLTIP.

Also, I'm not clear at what point gtk_tooltip_init is called. Does the
new "query-tooltip" signal registered (g_signal_new) in gtkwidget.c
create a new GTK_TYPE_TOOLTIP object?

sincerely,


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