Detecting whether a widget is displayed.
- From: Daniel Burrows <dburrows algebraicthunk net>
- To: gtk-app-devel-list gnome org
- Subject: Detecting whether a widget is displayed.
- Date: Thu, 5 Nov 2009 06:28:36 -0800
Hi list,
I have what's probably a simple GTK+ problem, and I was wondering if
anyone could give me a tip.
I'm trying to write a custom widget (in GTK--) that would benefit
from knowing whether it's currently visible or not. It seems pretty
easy to detect when a widget becomes visible for the first time by
hooking into the "expose" signal, but I can't for the life of me find
any way of detecting when a widget becomes invisible. (for instance,
when the user switches away from its tab in a notebook or scrolls past
it in a TextView)
The most promising thing I found was the "visibility notify event",
but it never seems to get delivered to my widget. I've also tried to
use is_viewable() and get_visible_region() on the GDK window, but even
if these work (they don't seem to so far, but I could be doing it
wrong) I need a signal or event so that I know when to test them.
Any suggestions?
Thanks,
Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]