]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/private/textmeasure.h
e317510ffe745c337a1295569ff899eff415f943
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/private/textmeasure.h
3 // Purpose: wxMSW-specific declaration of wxTextMeasure class
4 // Author: Manuel Martin
7 // Copyright: (c) 1997-2012 wxWidgets team
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_MSW_PRIVATE_TEXTMEASURE_H_
12 #define _WX_MSW_PRIVATE_TEXTMEASURE_H_
14 #include "wx/msw/wrapwin.h"
16 // ----------------------------------------------------------------------------
17 // wxTextMeasure for MSW.
18 // ----------------------------------------------------------------------------
20 class wxTextMeasure
: public wxTextMeasureBase
23 wxEXPLICIT
wxTextMeasure(const wxDC
*dc
, const wxFont
*font
= NULL
)
24 : wxTextMeasureBase(dc
, font
)
29 wxEXPLICIT
wxTextMeasure(const wxWindow
*win
, const wxFont
*font
= NULL
)
30 : wxTextMeasureBase(win
, font
)
38 virtual void BeginMeasuring();
39 virtual void EndMeasuring();
41 virtual void DoGetTextExtent(const wxString
& string
,
44 wxCoord
*descent
= NULL
,
45 wxCoord
*externalLeading
= NULL
);
47 virtual bool DoGetPartialTextExtents(const wxString
& text
,
53 // We use either the HDC of the provided wxDC or an HDC created for our
57 // If we change the font in BeginMeasuring(), we restore it to the old one
61 wxDECLARE_NO_COPY_CLASS(wxTextMeasure
);
64 #endif // _WX_MSW_PRIVATE_TEXTMEASURE_H_