gtk-- listitem/button-press signal question
- From: Snoopdave <snoopdave geocities com>
- To: gtk-list redhat com
- Subject: gtk-- listitem/button-press signal question
- Date: Mon, 19 Jan 1998 23:56:25 -0500
I've got a window with list in it and I want one of the
Window's member functions to be called when an item in the
list is double clicked. I've added a callback function with
what looks like the right signature to my window class, but
I can't figure out how to get it connected to the button event.
The compiler does not like my connect() call one bit!
Below is a rough approximation of my current code: can anybody
tell me what I am doing wrong? Am I even on the right track
with this?
class MyWindow : public Gtk_Window {
...
private:
Gtk_List* mylist;
public:
int onButtonPress(gint i, Gtk_Widget w,GdkEventButton* evt) {
// Check event type to see if it was a double click
}
MyWindow() {
...
Gtk_ListItem* item1 = new Gtk_ListItem("Item1");
mylist->add(item1);
connect( item1->button_press_event, *this,
&Gfm_Window::onButtonPress );
...
}
...
}
--
David M. Johnson
snoopdave at geocities.com
johnson at roguewave.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]