Just fix header comments of wxTextMeasure-related files, no real changes.
[wxWidgets.git] / include / wx / msw / private / textmeasure.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/private/textmeasure.h
3 // Purpose: wxMSW-specific declaration of wxTextMeasure class
4 // Author: Manuel Martin
5 // Created: 2012-10-05
6 // RCS-ID: $Id:
7 // Copyright: (c) 1997-2012 wxWidgets team
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_MSW_PRIVATE_TEXTMEASURE_H_
12 #define _WX_MSW_PRIVATE_TEXTMEASURE_H_
13
14 #include "wx/msw/wrapwin.h"
15
16 // ----------------------------------------------------------------------------
17 // wxTextMeasure for MSW.
18 // ----------------------------------------------------------------------------
19
20 class wxTextMeasure : public wxTextMeasureBase
21 {
22 public:
23 wxTextMeasure(const wxDC *dc, const wxFont *font)
24 : wxTextMeasureBase(dc, font)
25 {
26 Init();
27 }
28 wxTextMeasure(const wxWindow *win, const wxFont *font)
29 : wxTextMeasureBase(win, font)
30 {
31 Init();
32 }
33
34 protected:
35 void Init();
36
37 virtual void BeginMeasuring();
38 virtual void EndMeasuring();
39
40 virtual void DoGetTextExtent(const wxString& string,
41 wxCoord *width,
42 wxCoord *height,
43 wxCoord *descent = NULL,
44 wxCoord *externalLeading = NULL);
45
46 virtual bool DoGetPartialTextExtents(const wxString& text,
47 wxArrayInt& widths,
48 double scaleX);
49
50
51
52 // We use either the HDC of the provided wxDC or an HDC created for our
53 // window.
54 HDC m_hdc;
55
56 // If we change the font in BeginMeasuring(), we restore it to the old one
57 // in EndMeasuring().
58 HFONT m_hfontOld;
59
60 wxDECLARE_NO_COPY_CLASS(wxTextMeasure);
61 };
62
63 #endif // _WX_MSW_PRIVATE_TEXTMEASURE_H_