Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Side by Side Diff: xfa/fwl/basewidget/fwl_checkboximp.h

Issue 1943413002: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@bcdattribute
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/basewidget/fwl_caretimp.cpp ('k') | xfa/fwl/basewidget/fwl_checkboximp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FWL_BASEWIDGET_FWL_CHECKBOXIMP_H_ 7 #ifndef XFA_FWL_BASEWIDGET_FWL_CHECKBOXIMP_H_
8 #define XFA_FWL_BASEWIDGET_FWL_CHECKBOXIMP_H_ 8 #define XFA_FWL_BASEWIDGET_FWL_CHECKBOXIMP_H_
9 9
10 #include "xfa/fwl/core/fwl_widgetimp.h" 10 #include "xfa/fwl/core/fwl_widgetimp.h"
11 11
12 class CFWL_CheckBoxImpDelegate; 12 class CFWL_CheckBoxImpDelegate;
13 class CFWL_MsgMouse; 13 class CFWL_MsgMouse;
14 class CFWL_WidgetImpProperties; 14 class CFWL_WidgetImpProperties;
15 class IFWL_Widget; 15 class IFWL_Widget;
16 16
17 class CFWL_CheckBoxImp : public CFWL_WidgetImp { 17 class CFWL_CheckBoxImp : public CFWL_WidgetImp {
18 public: 18 public:
19 CFWL_CheckBoxImp(const CFWL_WidgetImpProperties& properties, 19 CFWL_CheckBoxImp(const CFWL_WidgetImpProperties& properties,
20 IFWL_Widget* pOuter); 20 IFWL_Widget* pOuter);
21 ~CFWL_CheckBoxImp(); 21 ~CFWL_CheckBoxImp();
22 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; 22 virtual FWL_Error GetClassName(CFX_WideString& wsClass) const;
23 virtual uint32_t GetClassID() const; 23 virtual uint32_t GetClassID() const;
24 virtual FWL_ERR Initialize(); 24 virtual FWL_Error Initialize();
25 virtual FWL_ERR Finalize(); 25 virtual FWL_Error Finalize();
26 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); 26 virtual FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE);
27 virtual FWL_ERR Update(); 27 virtual FWL_Error Update();
28 virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, 28 virtual FWL_Error DrawWidget(CFX_Graphics* pGraphics,
29 const CFX_Matrix* pMatrix = NULL); 29 const CFX_Matrix* pMatrix = NULL);
30 virtual int32_t GetCheckState(); 30 virtual int32_t GetCheckState();
31 virtual FWL_ERR SetCheckState(int32_t iCheck); 31 virtual FWL_Error SetCheckState(int32_t iCheck);
32 32
33 protected: 33 protected:
34 void Layout(); 34 void Layout();
35 uint32_t GetPartStates(); 35 uint32_t GetPartStates();
36 void UpdateTextOutStyles(); 36 void UpdateTextOutStyles();
37 void NextStates(); 37 void NextStates();
38 CFX_RectF m_rtClient; 38 CFX_RectF m_rtClient;
39 CFX_RectF m_rtBox; 39 CFX_RectF m_rtBox;
40 CFX_RectF m_rtCaption; 40 CFX_RectF m_rtCaption;
41 CFX_RectF m_rtFocus; 41 CFX_RectF m_rtFocus;
42 uint32_t m_dwTTOStyles; 42 uint32_t m_dwTTOStyles;
43 int32_t m_iTTOAlign; 43 int32_t m_iTTOAlign;
44 FX_BOOL m_bBtnDown; 44 FX_BOOL m_bBtnDown;
45 friend class CFWL_CheckBoxImpDelegate; 45 friend class CFWL_CheckBoxImpDelegate;
46 }; 46 };
47 class CFWL_CheckBoxImpDelegate : public CFWL_WidgetImpDelegate { 47 class CFWL_CheckBoxImpDelegate : public CFWL_WidgetImpDelegate {
48 public: 48 public:
49 CFWL_CheckBoxImpDelegate(CFWL_CheckBoxImp* pOwner); 49 CFWL_CheckBoxImpDelegate(CFWL_CheckBoxImp* pOwner);
50 int32_t OnProcessMessage(CFWL_Message* pMessage) override; 50 void OnProcessMessage(CFWL_Message* pMessage) override;
51 FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics, 51 void OnDrawWidget(CFX_Graphics* pGraphics,
52 const CFX_Matrix* pMatrix = NULL) override; 52 const CFX_Matrix* pMatrix = NULL) override;
53 53
54 protected: 54 protected:
55 void OnActivate(CFWL_Message* pMsg); 55 void OnActivate(CFWL_Message* pMsg);
56 void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); 56 void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE);
57 void OnLButtonDown(CFWL_MsgMouse* pMsg); 57 void OnLButtonDown(CFWL_MsgMouse* pMsg);
58 void OnLButtonUp(CFWL_MsgMouse* pMsg); 58 void OnLButtonUp(CFWL_MsgMouse* pMsg);
59 void OnMouseMove(CFWL_MsgMouse* pMsg); 59 void OnMouseMove(CFWL_MsgMouse* pMsg);
60 void OnMouseLeave(CFWL_MsgMouse* pMsg); 60 void OnMouseLeave(CFWL_MsgMouse* pMsg);
61 void OnKeyDown(CFWL_MsgKey* pMsg); 61 void OnKeyDown(CFWL_MsgKey* pMsg);
62 CFWL_CheckBoxImp* m_pOwner; 62 CFWL_CheckBoxImp* m_pOwner;
63 }; 63 };
64 64
65 #endif // XFA_FWL_BASEWIDGET_FWL_CHECKBOXIMP_H_ 65 #endif // XFA_FWL_BASEWIDGET_FWL_CHECKBOXIMP_H_
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_caretimp.cpp ('k') | xfa/fwl/basewidget/fwl_checkboximp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698