Merge to XFA: Use stdint.h types throughout PDFium.
[pdfium.git] / xfa / src / fwl / src / basewidget / include / fwl_caretimp.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 _FWL_CARET_IMP_H\r
8 #define _FWL_CARET_IMP_H\r
9 class CFWL_WidgetImp;\r
10 class CFWL_WidgetImpProperties;\r
11 class CFWL_WidgetImpDelegate;\r
12 class IFWL_Widget;\r
13 class CFWL_CaretImp;\r
14 class CFWL_CaretImpDelegate;\r
15 class CFWL_CaretImp : public CFWL_WidgetImp\r
16 {\r
17 public:\r
18     CFWL_CaretImp(IFWL_Widget *pOuter = NULL);\r
19     CFWL_CaretImp(const CFWL_WidgetImpProperties &properties, IFWL_Widget *pOuter = NULL);\r
20     virtual ~CFWL_CaretImp();\r
21 \r
22     virtual FWL_ERR             GetClassName(CFX_WideString &wsClass) const;\r
23     virtual FX_DWORD    GetClassID() const;\r
24 \r
25     virtual FWL_ERR             Initialize();\r
26     virtual FWL_ERR             Finalize();\r
27 \r
28     virtual FWL_ERR             DrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);\r
29 \r
30     virtual     FWL_ERR ShowCaret(FX_BOOL bFlag = TRUE);\r
31     virtual FWL_ERR GetFrequency(FX_DWORD &elapse);\r
32     virtual FWL_ERR SetFrequency(FX_DWORD elapse);\r
33     virtual FWL_ERR SetColor(CFX_Color crFill);\r
34 protected:\r
35     FX_BOOL               DrawCaretBK(CFX_Graphics *pGraphics, IFWL_ThemeProvider *pTheme, const CFX_Matrix *pMatrix);\r
36     class CFWL_CaretTimer\r
37     {\r
38     public:\r
39         CFWL_CaretTimer(CFWL_CaretImp *m_pCaret);\r
40         virtual int32_t Run(FWL_HTIMER hTimer);\r
41         CFWL_CaretImp *m_pCaret;\r
42 \r
43     };\r
44     CFWL_CaretTimer *m_pTimer;\r
45     FWL_HTIMER          m_hTimer;\r
46     FX_DWORD            m_dwElapse;\r
47     CFX_Color           m_crFill;\r
48     FX_BOOL                     m_bSetColor;\r
49     friend class CFWL_CaretImpDelegate;\r
50     friend class CFWL_CaretTimer;\r
51 \r
52 };\r
53 class CFWL_CaretImpDelegate : public CFWL_WidgetImpDelegate\r
54 {\r
55 public:\r
56     CFWL_CaretImpDelegate(CFWL_CaretImp *pOwner);\r
57     virtual int32_t     OnProcessMessage(CFWL_Message *pMessage);\r
58     virtual FWL_ERR             OnDrawWidget(CFX_Graphics *pGraphics, const CFX_Matrix *pMatrix = NULL);\r
59 \r
60 protected:\r
61     CFWL_CaretImp *m_pOwner;\r
62 };\r
63 #endif\r