]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/private/textmeasure.h
ee14751a5b9f40fb5d88ad2f9b925b6c2a8fce1f
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 wxEXPLICIT
wxTextMeasure(const wxDC
*dc
, const wxFont
*font
= NULL
)
23 : wxTextMeasureBase(dc
, font
)
28 wxEXPLICIT
wxTextMeasure(const wxWindow
*win
, const wxFont
*font
= NULL
)
29 : wxTextMeasureBase(win
, font
)
37 virtual void BeginMeasuring();
38 virtual void EndMeasuring();
40 virtual void DoGetTextExtent(const wxString
& string
,
43 wxCoord
*descent
= NULL
,
44 wxCoord
*externalLeading
= NULL
);
46 virtual bool DoGetPartialTextExtents(const wxString
& text
,
52 // We use either the HDC of the provided wxDC or an HDC created for our
56 // If we change the font in BeginMeasuring(), we restore it to the old one
60 wxDECLARE_NO_COPY_CLASS(wxTextMeasure
);
63 #endif // _WX_MSW_PRIVATE_TEXTMEASURE_H_