PWL_Label.h revision ee451cb395940862dad63c85adfe8f2fd55e864c
1// Copyright 2014 PDFium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7#ifndef _PWL_LABEL_H_ 8#define _PWL_LABEL_H_ 9 10class IFX_Edit; 11 12class PWL_CLASS CPWL_Label : public CPWL_Wnd 13{ 14public: 15 CPWL_Label(); 16 virtual ~CPWL_Label(); 17 18public: 19 virtual CFX_ByteString GetClassName() const; 20 virtual void SetFontSize(FX_FLOAT fFontSize); 21 virtual FX_FLOAT GetFontSize() const; 22 23public: 24 void SetText(FX_LPCWSTR csText); 25 CFX_WideString GetText() const; 26 27 void SetLimitChar(FX_INT32 nLimitChar); 28 void SetHorzScale(FX_INT32 nHorzScale); 29 void SetCharSpace(FX_FLOAT fCharSpace); 30 31 CPDF_Rect GetContentRect() const; 32 FX_INT32 GetTotalWords(); 33 34 CFX_ByteString GetTextAppearanceStream(const CPDF_Point & ptOffset) const; 35 36protected: 37 virtual void OnCreated(); 38 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); 39 virtual void GetThisAppearanceStream(CFX_ByteTextBuf & sAppStream); 40 virtual void RePosChildWnd(); 41 42private: 43 void SetParamByFlag(); 44 45private: 46 IFX_Edit* m_pEdit; 47}; 48 49#endif 50 51 52