Re: Balloon-help or callout window
- From: Darryl Luff <darryl snakegully nu>
- To: fredderic excite com
- Cc: johnp redhat com, gtk-app-devel-list gnome org
- Subject: Re: Balloon-help or callout window
- Date: Fri, 10 Sep 2004 23:23:37 +1000
Freddie Unpenstein wrote:
I agree about the shaped windws. The actual window is square. The
only non-square bit is he pointer, and that seems to be the
tricky bit.
As long as your line is straight you can use shaped windows with
a minimal performance hit (just two boxes above and below the
line). Since shaped windows are defined by boxes having anything
other than a straight line would be prohibited. Why not just
extend tool-tips to have multiple lines?
What version of GTK+ are you using that doesn't allow multi-line tooltips? I never used GTK+ 1.2 tooltips, but the
2.4 version just uses Pango layouts. In fact a quick hack to detect a <markup> at the start, and call the
*_with_markup function, and it even supports marked up text.
I hadn't checked actually, I just hadn't seen a multi-line one. The main
thing is the pointer line. And maybe a button to close it. The windows
in KNotes from KDE look pretty good. They are an undecorated window but
draw their own title and close icon inside the window area.
I do rather like this idea. A persistant tooltip that appears off to one side, with lines that connect it to
each widget as you move the mouse around, or something... Would be a wonderful use for the other piece of
tooltip text that can be set on widgets, which doesn't appear to actually be used by anything. Perhaps a
derivative of tooltips might be handy, though I'm not sure how much of the code would be reusable. It
doesn't seem to be highly dynamic.
I had two uses for it. One was as a sort of step-by-step tutorial, that
steps you through a task pointing at the controls, and the other was for
a warning box that tells you that something is wrong, and points to what
you need to do to fix it. Ideally you'd pass the 'target' widget as a
parameter when you created the balloon text window, and it would make
sure the pointer line tracked it automatically.
Where a diagonal line isn't possible, you could simply slide the window up and down as required. In fact, it may even
be easier to use two popup windows. One for the persistant "bubble text" tooltip, and a 1-pixel high window
for the line, which you stretch and shorten as needed.
I hadn't thought of a 1-pixel high window. That would probably be the
easiest solution. Horizontal lines may tend to get lost against window
borders though. Is there a way to just stop the background drawing in a
Gtk window? I seem to remember in the dim past using Delphi on Windows
that if you didn't draw a background, you didn't get one, and the window
was transparent? Doesn't really apply on X though I suppose.
I haven't tried any code since starting this discussion. Hopefully over
the weekend I'll get a chance to try out some of the ideas people have
suggested.
Darryl.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]