*bump* I did spend the last days trying to get it right but unfortunately I still haven't succeeded and I am really running out of ideas. My current version is attached. The problem is still the drawing of the layout children: When the layout accepts the size using set_allocation I have to move_resize the Gdk::Window corresponding to the layout. This is in particular necessary to adjust the clipping region required for the drawing process. However, the correct clipping is apparently never transferred to the child widgets. The child widgets first take their own clipping regions (which are correct) and intersect those with the perceived (incorrect) clipping region of the layout. The perceived region always corresponds to the size *initially* allocated to the layout. So if the size of the layout changes and becomes larger (i.e. if the user drags the corner of the window), then the child widgets are clipped off and are only partially drawn. In a nutshell: I need to make sure that the children are notified that the clipping region of the parent has changed which is not done by the set_allocation call. My idea is to emit a "size-allocate" signal myself, but emitting *predefined* signals is not possible using gtkmm (it is in gtk I guess?!). Does anyone have any ideas here? On 15.10.2014 22:12, ax487 wrote:
Hello all, I am trying and failing to implement a custom layout using gtkmm. Unfortunately there don't seem to be any examples on how to do this in either C or C++. I attached my approach (including some test widgets). The problem is that the widgets are never actually drawn. I would have thought that a Gtk::Layout would delegate the `on_draw' call to its children according to their placement in the layout. Is this assumption wrong or is the error somewhere else in my code? ax487 _______________________________________________ gtkmm-list mailing list gtkmm-list gnome org https://mail.gnome.org/mailman/listinfo/gtkmm-list
Attachment:
pagelayout.tar.bz2
Description: application/bzip