Re: Gtk::Main::signal_key_snooper()



I use Gtk::Main::signal_key_snooper to invoke my help application when the user presses the F1 function key. In the constructor of my GUI window I make the following call:

Gtk::Main::signal_key_snooper().connect(sigc::mem_fun(*this,&Employee::on_F1_pressed));

which connects to this callback slot:

// help invocation function
int Employee::on_F1_pressed(Gtk::Widget *widget, GdkEventKey *keyevent)
{
   if(keyevent->keyval == GDK_F1 && keyevent->type == GDK_KEY_PRESS)
   {
       system("/usr/fiscal/gmwhelp EmployeeSetup &");
   }
   return 0;
}

I'm sure someone will disagree with my implementation, but it works well for me.

Bob Caryl

Шевчук Андрій Ярославович wrote:
Hi!

I need example, how to use Gtk::Main::signal_key_snooper().connect...

thanks.
---
Sorry for my bad English...
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

begin:vcard
fn:Robert Caryl
n:Caryl;Robert
org:Fiscal Systems, Inc.
adr:;;102 Commerce Circle;Madison;AL;35758;USA
email;internet:bob fis-cal com
title:Senior Software Design Engineer
tel;work:356-772-8920 X108
x-mozilla-html:TRUE
url:http://www.fis-cal.com
version:2.1
end:vcard



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