]>
Commit | Line | Data |
---|---|---|
1 | /////////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/generic/private/textmeasure.h | |
3 | // Purpose: Generic wxTextMeasure declaration. | |
4 | // Author: Vadim Zeitlin | |
5 | // Created: 2012-10-17 | |
6 | // Copyright: (c) 1997-2012 wxWidgets team | |
7 | // Licence: wxWindows licence | |
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef _WX_GENERIC_PRIVATE_TEXTMEASURE_H_ | |
11 | #define _WX_GENERIC_PRIVATE_TEXTMEASURE_H_ | |
12 | ||
13 | // ---------------------------------------------------------------------------- | |
14 | // wxTextMeasure for the platforms without native support. | |
15 | // ---------------------------------------------------------------------------- | |
16 | ||
17 | class wxTextMeasure : public wxTextMeasureBase | |
18 | { | |
19 | public: | |
20 | wxEXPLICIT wxTextMeasure(const wxDC *dc, const wxFont *font = NULL) | |
21 | : wxTextMeasureBase(dc, font) {} | |
22 | wxEXPLICIT wxTextMeasure(const wxWindow *win, const wxFont *font = NULL) | |
23 | : wxTextMeasureBase(win, font) {} | |
24 | ||
25 | protected: | |
26 | virtual void DoGetTextExtent(const wxString& string, | |
27 | wxCoord *width, | |
28 | wxCoord *height, | |
29 | wxCoord *descent = NULL, | |
30 | wxCoord *externalLeading = NULL); | |
31 | ||
32 | virtual bool DoGetPartialTextExtents(const wxString& text, | |
33 | wxArrayInt& widths, | |
34 | double scaleX); | |
35 | ||
36 | wxDECLARE_NO_COPY_CLASS(wxTextMeasure); | |
37 | }; | |
38 | ||
39 | #endif // _WX_GENERIC_PRIVATE_TEXTMEASURE_H_ |