How to get the absolute position of an EventBox?
- From: "Rafael S. Suguiura" <rafael suguiura gmail com>
- To: gtkmm-list gnome org
- Subject: How to get the absolute position of an EventBox?
- Date: Fri, 13 Feb 2009 12:50:19 -0200
I've just started to learn GTK+ and I'm migrating to gtkmm. In GTK, I could get the absolute position of an EventBox with the allocation inherited from Widget. So to get the x position, I just used the following code:
int x = GTK_WIDGET(applet)->allocation.x;Now that I've converted to gtkmm, I use the corresponding code, but it always return 0. There is the code:
int x = applet->get_allocation().get_x();The variable applet is Gnome::Panel::Applet, from libpanelappletmm and I don't know if it's an issue from this library or from gtkmm, since it inherits Gtk::EventBox.
All I need is to get the absolute position. Other alternatives are welcome.
Thanks in advance,
Rafael
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]