OLD | NEW |
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_INCLUDE_FWL_LIGHTWIDGET_CHECKBOX_H_ | 7 #ifndef XFA_INCLUDE_FWL_LIGHTWIDGET_CHECKBOX_H_ |
8 #define XFA_INCLUDE_FWL_LIGHTWIDGET_CHECKBOX_H_ | 8 #define XFA_INCLUDE_FWL_LIGHTWIDGET_CHECKBOX_H_ |
9 | 9 |
10 class CFWL_Widget; | 10 #include "xfa/include/fwl/basewidget/fwl_checkbox.h" |
11 class CFWL_WidgetProperties; | 11 #include "xfa/include/fwl/lightwidget/widget.h" |
12 class IFWL_CheckBoxDP; | 12 |
13 class CFWL_CheckBox; | |
14 class CFWL_CheckBoxDP; | |
15 class CFWL_CheckBox : public CFWL_Widget { | 13 class CFWL_CheckBox : public CFWL_Widget { |
16 public: | 14 public: |
17 static CFWL_CheckBox* Create(); | 15 static CFWL_CheckBox* Create(); |
18 | 16 |
19 FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL); | 17 FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL); |
20 FWL_ERR GetCaption(CFX_WideString& wsCaption); | 18 FWL_ERR GetCaption(CFX_WideString& wsCaption); |
21 FWL_ERR SetCaption(const CFX_WideStringC& wsCaption); | 19 FWL_ERR SetCaption(const CFX_WideStringC& wsCaption); |
22 FWL_ERR SetBoxSize(FX_FLOAT fHeight); | 20 FWL_ERR SetBoxSize(FX_FLOAT fHeight); |
23 int32_t GetCheckState(); | 21 int32_t GetCheckState(); |
24 FWL_ERR SetCheckState(int32_t iCheck); | 22 FWL_ERR SetCheckState(int32_t iCheck); |
25 CFWL_CheckBox(); | 23 CFWL_CheckBox(); |
26 virtual ~CFWL_CheckBox(); | 24 virtual ~CFWL_CheckBox(); |
27 | 25 |
28 protected: | 26 protected: |
29 class CFWL_CheckBoxDP : public IFWL_CheckBoxDP { | 27 class CFWL_CheckBoxDP : public IFWL_CheckBoxDP { |
30 public: | 28 public: |
31 CFWL_CheckBoxDP(); | 29 CFWL_CheckBoxDP(); |
32 virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption); | 30 virtual FWL_ERR GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption); |
33 virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget); | 31 virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget); |
34 FX_FLOAT m_fBoxHeight; | 32 FX_FLOAT m_fBoxHeight; |
35 CFX_WideString m_wsCaption; | 33 CFX_WideString m_wsCaption; |
36 }; | 34 }; |
37 CFWL_CheckBoxDP m_checkboxData; | 35 CFWL_CheckBoxDP m_checkboxData; |
38 }; | 36 }; |
39 | 37 |
40 #endif // XFA_INCLUDE_FWL_LIGHTWIDGET_CHECKBOX_H_ | 38 #endif // XFA_INCLUDE_FWL_LIGHTWIDGET_CHECKBOX_H_ |
OLD | NEW |