]>
git.saurik.com Git - wxWidgets.git/blob - 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
6 // Copyright: (c) 1997-2012 wxWidgets team
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_MSW_PRIVATE_TEXTMEASURE_H_
11 #define _WX_MSW_PRIVATE_TEXTMEASURE_H_
13 #include "wx/msw/wrapwin.h"
15 // ----------------------------------------------------------------------------
16 // wxTextMeasure for MSW.
17 // ----------------------------------------------------------------------------
19 class wxTextMeasure
: public wxTextMeasureBase
22 wxTextMeasure(const wxDC
*dc
, const wxFont
*font
)
23 : wxTextMeasureBase(dc
, font
)
27 wxTextMeasure(const wxWindow
*win
, const wxFont
*font
)
28 : wxTextMeasureBase(win
, font
)
36 virtual void BeginMeasuring();
37 virtual void EndMeasuring();
39 virtual void DoGetTextExtent(const wxString
& string
,
42 wxCoord
*descent
= NULL
,
43 wxCoord
*externalLeading
= NULL
);
45 virtual bool DoGetPartialTextExtents(const wxString
& text
,
51 // We use either the HDC of the provided wxDC or an HDC created for our
55 // If we change the font in BeginMeasuring(), we restore it to the old one
59 wxDECLARE_NO_COPY_CLASS(wxTextMeasure
);
62 #endif // _WX_MSW_PRIVATE_TEXTMEASURE_H_