On Sat, 21 Jan 2017 10:12:29 +0000 (UTC) 'Catalin' via wx-dev wrote:
Cvwd> On Friday, 20 January 2017, 19:12, Vadim Zeitlin wrote:
Cvwd> On Fri, 20 Jan 2017 16:29:08 +0000 (UTC) 'Catalin' via wx-dev wrote:
Cvwd>
Cvwd> Cvwd> Examples of using such a component / system: a long list of static
Cvwd> Cvwd> texts, a long list of image thumbnails.
Cvwd>
Cvwd> > The proper way to do is to do what wxGrid/wxDVC do and not use windows at all and just render everything
Cvwd> > ourselves. BTW, this is what all browsers/rendering engines do too, none of them uses native windows for HTML
Cvwd> > elements.
Cvwd>
Cvwd> That is true, and I actually know that, but it would have been more
Cvwd> comfortable to use the layout already implemented in sizers. Then a
Cvwd> relatively simple "graphic sizer" comes to my mind. It would accept
Cvwd> only text (wxString) and images (i.e. wxBitmap), spacers, stretch
Cvwd> spacers (which would assert if wxFULL_PAINT_ON_RESIZE was not used).
Cvwd> Multi-line text would probably need more work. Layout would be the
Cvwd> same as in sizers.
This is not the first time this idea comes up and there is definitely
something appealing in being able to use familiar sizers API for laying out
custom-rendered things. But for me this means that this is not really about
creating some wxPseudoWindow, but about refactoring sizers API to work with
any objects satisfying some interface implemented by wxWindow and not only
the real windows themselves, doesn't it?
Seen like this, it definitely could be worth doing, and should be also
possible and even relatively simple to do. But I don't know if it's
suitable for a GSoC project for the same reasons as the AUI branch merge
isn't: it's more about refactoring the code than really programming (even
if refactoring is part of programming, of course, I don't think it's the
part most GSoC students would be interested in) and it has a big potential
of breaking something, so doing it would basically be 20% of the work with
the remaining 80% being carefully reviewing it when merging -- and would
need to be done by the mentor.
Cvwd> Cvwd> A second idea would be for another enhancement to wxGrid:
Cvwd> Cvwd> copy-pasting cell data.
Cvwd>
Cvwd> > This does sound useful, but looks a bit too small for 2+ months of work.
Cvwd> > Or am I underestimating the difficulty?
Cvwd>
Cvwd> I don't remember all that much. There was a bug with wxClipboard
Cvwd> under MSW, which unfortunately I don't really recall and never got to
Cvwd> fix it in a decent manner so I could have contributed it, then there
Cvwd> was the wxDF_HTML issue (it is a non-default format and it had to be
Cvwd> registered in a different way than it was attempted by wxW, which
Cvwd> didn't work IIRC), then there was some reverse engineering of the
Cvwd> actual html used in the clipboard for transferring copied data. Then
Cvwd> some functions for getting data in and out of the proper format. But
Cvwd> all this only made it work under MSW, so for other platforms some
Cvwd> more effort might be needed.
It still looks like something relatively trivial to me...
Regards,
VZ