Custom GTK widget to bypass GTK layout engine?
Posted
by fret
on Stack Overflow
See other posts from Stack Overflow
or by fret
Published on 2010-06-07T01:31:55Z
Indexed on
2010/06/07
1:42 UTC
Read the original article
Hit count: 671
gtk
I have an application layer that I'd like to port to Gtk that has all it's own layout code and I don't really want to spend 'n' months re-writting it to work with the Gtk layout system, but rather just using the existing internal layout code and have Gtk render the resulting widgets.
I've started by writting my own widget after trying several of the built in containers. Basically I'm looking for something like the GtkFixed container that doesn't have a minimum size, i.e. Gtk will fit the first widget to the entire window, and all the child widgets will lay themselves out so that they fill the area. If I use GtkFixed for that, the window is always limited to the size of the initial layout, as thats the "requested" space. I can't resize it smaller than that using the edges of the window decor.
Maybe I need schooling in allocation vs requesting. My googling so far hasn't found the information I need to make this work. I did try.
I'm using the C api at the moment, and I'm targetting Win32 and Linux. So far I have a shell app working in Win32 that puts up an empty window. But the first child widget is limiting the resizing to it's initial size.
© Stack Overflow or respective owner