Something for GSoC2008?

ATS asteinarson at gmail.com
Tue Mar 4 14:15:47 PST 2008


Julian Smart <julian at ...> writes:

> 
> I agree, dynamic wrapping would be widely welcomed. There was recently a 
> patch (I think applied, but possibly only to trunk?) that alters the 
> sizer system to do just this kind of wrapping, but operating at a sizer 
> level and not an individual control level. Might be applicable though. 
> 

The problem wxWrapSizer solves is precisely this on, although wxWrapSizer 
is a bit more general, since it also deals with items of varying height. 

It is a non trivial algorithm, since there are a different ways the 
area can be constrained (known vertical or known horizontal extent). 

The problem is the same as word processors wrapping paragraphs or 
browsers calculating height of a page of text.


The current implementation of wxWrapSizer solves the easiest case, 
when the horizontal extent is known early on and vertical extent is 
asked for later. 

I've an submitted updated a patch that is a more full solution. It's
still in the patch pipe at SF: 


> Whether it's of sufficient scale for a GSoC project I'm not sure...
> 

A solution for text only can be a lot more efficient than 'using a 
wxSizerItem per word'. I'd say it's a big enough problem. Specially 
when tying into layout rendering and the whole sizer machinery. It
should work smoothly when a dialog is resized for example.


Regards
// ATS

> Regards,
> 
> Julian
> 
> Kit Bishop wrote:
> > Something that I would very much like is a "proper" wrapping static text
> > control.
> >
> > Let me explain what I mean:
> >
> > At present (wx2.8.7), one can call Wrap on a static text to set the
> > pixel width at which text should wrap (though it seems it doesn't work
> > properly on all platforms).  I would like a static text that wrapped
> > automatically.
> >






More information about the wx-dev mailing list