Comment 32 for bug 246910

Revision history for this message
In , Dylan Thacker-Smith (dylan-smith) wrote :

Created an attachment (id=19248)
Quick and dirty drawing patch

(In reply to comment #26)
> There seems to be good progress being made here.
>
> The only fixmes I get now from richedit are about TxDraw and TxGetNaturalSize.
>
> From my playing around months ago, not implementing TxGetNaturalSize but having
> a simple TxDraw implementation (I just made it draw the raw strings out) gives
> an almost workable interface, through things don't quite line up.
>
> Also, there seems to be good progress on the not connecting issue.
>
> I guess what I'm suggesting is that a semi-working TxDraw implementation would
> be good. Is it possible to work in the editor painting functions to make a
> semi functional implementation of this function?
>

I got the code to the point where the existing richedit code can be used. So now TxDraw can be done using ME_PaintContent, and the width and the height of the editor can be calculated during wrapping. Nevertheless, the TxDraw and TxGetNaturalSize methods aren't very straight forward, so lately I haven't had the time to invest in getting them working right for something like google talk.

Austin Lund, if you want to try to get something working using the existing painting functions, then that would be great. I am attaching all the code that I have that isn't submitted, which is a quick and dirty basic implementation of TxDraw and TxGetNaturalSize, certainly nothing good enough to submit to wine-patches, so feel free to not use it at all. At least it shows that the existing richedit code can be used. It gets text drawn in google talk, but some text is being wrapped that shouldn't be.