Re: RFC: Tooltips redesign (needed e.g. for row dependent tips in treeview)
- From: Soeren Sandmann <sandmann daimi au dk>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-devel-list gnome org, Christof Petig <christof petig-baender de>
- Subject: Re: RFC: Tooltips redesign (needed e.g. for row dependent tips in treeview)
- Date: 29 Oct 2004 02:00:04 +0200
Owen Taylor <otaylor redhat com> writes:
> Here's an alternate approach I came up with talking to Jonathan (he's
> promised a more detailed writeup of GtkTreeView requirements) is a
> little more of a radical change.
Generally, I think the proposal looks really good. I see some problems
though:
> typedef enum { GTK_TOOLTIPS_MOUSE, GTK_TOOLTIPS_KEYBOARD } GtkTooltipsContext;
>
> void gtk_tooltips_window_begin (GtkTooltipsWindow *window,
> GtkTooltipsContext context,
> GObject *owner);
> void gtk_tooltips_window_end (GtkTooltipsWindow *window,
> GtkTooltipsContext context,
> GObject *owner);
The exact positon of tooltips should probably depend on the mouse
cursor. Eg., you probably don't want the tooltip popping up directly
under the mouse cursor. Maybe replace these functions with
gtk_tooltips_begin_mouse (GtkTooltipsWindow *window,
GObject *object,
gint x,
gint y)
gtk_tooltips_end_mouse();
gtk_tooltips_begin/end_keyboard();
> void gtk_tooltips_window_set_area (GtkTooltipsWindow *window,
> GtkTooltipsContext context,
> GdkWindow *relative_to,
> int x, int y,
> int width, int height);
Shouldn't this function have an owner parameter? Also, what good are
the width/height parameters? I don't see how they can be useful.
But I don't really think this function is sufficent if you want to
take mouse position into account. What about
typedef void (* GtkTooltipPositionFunc) (GObject *owner,
GdkEvent *event,
gpointer data);
gtk_tooltips_window_set_position_func (GtkTooltipsWindow *window,
GObject *owner,
GtkTooltipPositionFunc func,
gpointer data);
instead?
Finally, I could see it being useful putting general widgets into the
tooltip window, so the API shouldn't rule that out (I don't think it
does currently).
Søren
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]