[prev in list] [next in list] [prev in thread] [next in thread]
List: gtkmm
Subject: Re: How to subclass Gtk::Bin
From: Maggio Mago <dev.maggio () gmail ! com>
Date: 2013-05-27 18:11:18
Message-ID: CAN45nkGJCeQi-X85Bn9iK02iAecsYJ_uMnwMorVYGrKr26ERmA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
I missed :
https://developer.gnome.org/gtkmm/stable/classGtk_1_1Widget.html#a3a373b58ed5a05fd28d6dadd70d8f39b
And : https://git.gnome.org/browse/gtk+/tree/gtk/gtkbutton.c?h=gtk-3-8
I solve my problem with :
void Timeline::on_size_allocate(Gtk::Allocation &allocation)
{
Gtk::Bin::on_size_allocate(allocation);
// instead of
//get_child()->set_allocation(allocation);
// use
get_child()->size_allocate(allocation);
}
Now, the child of the Gtk::Bin assume all widgets :-)
[Attachment #5 (text/html)]
<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div>I missed : <a \
href="https://developer.gnome.org/gtkmm/stable/classGtk_1_1Widget.html#a3a373b58ed5a05fd28d6dadd70d8f39b" \
target="_blank">https://developer.gnome.org/gtkmm/stable/classGtk_1_1Widget.html#a3a373b58ed5a05fd28d6dadd70d8f39b</a><br>
</div><div>And : <a href="https://git.gnome.org/browse/gtk+/tree/gtk/gtkbutton.c?h=gtk-3-8" \
target="_blank">https://git.gnome.org/browse/gtk+/tree/gtk/gtkbutton.c?h=gtk-3-8</a><br><br></div><div><br></div>I \
solve my problem with :<div class="im"> <br><br>
void Timeline::on_size_allocate(Gtk::Allocation &allocation)<br>{<br> \
Gtk::Bin::on_size_allocate(allocation);<br><br></div> // instead of <br> \
//get_child()->set_allocation(allocation);<br></div> // use<br> <div>
get_child()->size_allocate(allocation);<br>}<br><br></div><div>Now, the child \
of the Gtk::Bin assume all widgets :-)<br></div></div> </div></div>
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic