Ticket #14705 (closed optimization: fixed)
|Reported by:||mmarsan||Owned by:||vadz|
|Keywords:||TextExtent measures needs-work||Cc:|
|Blocking:||14706, 14706, 14706, 14706, 14706, 14706, 14706, 14706, 14706, 14706, 14706, 14706|
This patch gathers in a new wxTextMeasure class these methods:
* wxDC / wxWindow GetTextExtent()
* wxDC GetMultiLineTextExtent()
* wxDC GetPartialTextExtents()
* new GetLargestStringExtent()
Where has been possible, an only common method is called.
If there are platform specializations, they are used in their
wxTextMeasure platform implementation.
Most of the code has been reused from dc.cpp, dcbase.cpp, window.cpp.
Apart from the new method GetLargestStringExtent(), notice that now
it is possible to call this class from anywhere, just passing valid
font and valid dc or window.
I've tested it with Ubuntu 12.04 Gtk-2/Gtk-3 and MSW XP, using
combo and richtext samples.