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