Ticket #14705 (closed optimization: fixed)
wxTextMeasure implementation
| Reported by: | mmarsan | Owned by: | vadz |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | GUI-all | Version: | 2.9-svn |
| Keywords: | TextExtent measures needs-work | Cc: | |
| Blocked By: | Patch: | yes | |
| Blocking: | 14706, 14706, 14706, 14706, 14706, 14706, 14706, 14706, 14706, 14706, 14706, 14706 |
Description
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.

