Re: Using a TextView as a sort of "Hbox with wrapping"



On Tue, Jan 28, 2014 at 1:30 AM, Tristan Van Berkom
<tristan upstairslabs com> wrote:
You can get the behavior you are looking for with EggWrapBox:
  https://git.gnome.org/browse/libegg/tree/libegg/wrapbox

Just copy the eggwrapbox.[ch] and compile it as a part of your
code (or compile a libegg separately and link to it if LGPL is
a problem for you).

That looks fairly decent! Unfortunately I can't compile in extra C
code (I'm doing this in a high level language, Pike, and I want this
to work on an unmodified install of Pike - I do build my own Pike on
Linux, but my clients generally use a pre-built), so I can't use this
directly. And... that is a LOT of code (2641 lines), though a lot of
it looks like stuff that would be way shorter in a high level
language. I don't know that I want to port it to Pike, even if it's
possible to do that.

But it does look good, and it answers the big question ("I can't be
the first person to want this, so what did other people do?").

... also the EggWrapBox
handles height-for-width geometry well for it's children,
while textview itself does some height-for-width, I'm not
sure it is done well for embedded child widgets

What do you mean by "height-for-width" here? I just tried on GTK
2.24.10 on Windows and it failed to wrap the way I expected, so I'm
not sure what's going on (the same version of GTK on Linux worked
fine). Is that the sort of issue you mean?

ChrisA


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]