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