Re: Howto : new widget & new container
- From: "Marco Scholten" <mscholtn xs4all nl>
- To: <stephane wirtel belgacom net>
- Cc: gtkmm-list gnome org
- Subject: Re: Howto : new widget & new container
- Date: Wed, 22 Jun 2005 08:50:54 +0200
----- Original Message -----
From: "Stephane Wirtel" <stephane wirtel belgacom net>
To: <gtkmm-list gnome org>
Sent: Tuesday, June 21, 2005 11:50 PM
Subject: Howto : new widget & new container
Hi all,
I want to create a new widget with a new container. Theses news objects
are to draw a P.E.R.T. diagram.
With the example from the tutorial, how to implement the
on_button_press_event signal ? Is there an example or a small
documentation ?
in the example:
in void MyWidget::on_realize()
change
attributes.event_mask = get_events () | Gdk::EXPOSURE_MASK;
to
attributes.event_mask = get_events () | Gdk::EXPOSURE_MASK |
Gdk::BUTTON_PRESS_MASK;
and add
bool MyWidget::on_button_press_event (GdkEventButton* event)
{ std::cout << "button pressed" << std::endl;
}
--
Marco
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]