Re: Questions on Key-Press Event
- From: Efrat Regev <efrat_regev yahoo com>
- To: Bob Caryl <bob fis-cal com>
- Cc: gtkmm-list gnome org
- Subject: Re: Questions on Key-Press Event
- Date: Mon, 17 Oct 2005 16:17:53 -0700 (PDT)
--- Bob Caryl <bob fis-cal com> wrote:
> Hello,
>
> I have several applications that use more than one
> window. I
> implemented context sensitive help by using the
> following in the
> constructor for the main application window:
>
> // code snippet
>
Gtk::Main::signal_key_snooper().connect(sigc::mem_fun(*this,&<your
>
> window class name::your callback slot>));
> ///////////////////////
>
> where "your window class name" is what it describes,
> as well as "your
> callback slot." In the callback slot connected to
> this signal, you can
> intercept any keystroke you like, then return 1 so
> the regular keystroke
> handlers will ignore the keystroke, or 0 to allow
> this event to be
> passed along to them.
>
Thanks, this works like a charm. I very much
appreciate it!
Also, thanks to all those who contributed to gtkmm -
I have extensive experience with MFC (and, to some
extent, QT), but have never experienced GUI code as
clean as when using gtkmm.
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]