| 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 _FWL_CHECKBOX_H | 7 #ifndef _FWL_CHECKBOX_H |
| 8 #define _FWL_CHECKBOX_H | 8 #define _FWL_CHECKBOX_H |
| 9 class CFWL_WidgetImpProperties; | 9 class CFWL_WidgetImpProperties; |
| 10 class IFWL_Widget; | 10 class IFWL_Widget; |
| 11 class IFWL_CheckBoxDP; | 11 class IFWL_CheckBoxDP; |
| 12 class IFWL_CheckBox; | 12 class IFWL_CheckBox; |
| 13 #define FWL_CLASS_CheckBox L"FWL_CHECKBOX" | 13 #define FWL_CLASS_CheckBox L"FWL_CHECKBOX" |
| 14 #define FWL_CLASS_RadioButton L"FWL_RADIOBUTTON" | |
| 15 #define FWL_CLASSHASH_CheckBox 4107183823 | 14 #define FWL_CLASSHASH_CheckBox 4107183823 |
| 16 #define FWL_CLASSHASH_RadioButton 3811304691 | |
| 17 #define FWL_STYLEEXT_CKB_Left (0L << 0) | 15 #define FWL_STYLEEXT_CKB_Left (0L << 0) |
| 18 #define FWL_STYLEEXT_CKB_Center (1L << 0) | 16 #define FWL_STYLEEXT_CKB_Center (1L << 0) |
| 19 #define FWL_STYLEEXT_CKB_Right (2L << 0) | 17 #define FWL_STYLEEXT_CKB_Right (2L << 0) |
| 20 #define FWL_STYLEEXT_CKB_Top (0L << 2) | 18 #define FWL_STYLEEXT_CKB_Top (0L << 2) |
| 21 #define FWL_STYLEEXT_CKB_VCenter (1L << 2) | 19 #define FWL_STYLEEXT_CKB_VCenter (1L << 2) |
| 22 #define FWL_STYLEEXT_CKB_Bottom (2L << 2) | 20 #define FWL_STYLEEXT_CKB_Bottom (2L << 2) |
| 23 #define FWL_STYLEEXT_CKB_LeftText (1L << 4) | 21 #define FWL_STYLEEXT_CKB_LeftText (1L << 4) |
| 24 #define FWL_STYLEEXT_CKB_MultiLine (1L << 5) | 22 #define FWL_STYLEEXT_CKB_MultiLine (1L << 5) |
| 25 #define FWL_STYLEEXT_CKB_3State (1L << 6) | 23 #define FWL_STYLEEXT_CKB_3State (1L << 6) |
| 26 #define FWL_STYLEEXT_CKB_RadioButton (1L << 7) | 24 #define FWL_STYLEEXT_CKB_RadioButton (1L << 7) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 #define FWL_PARTSTATE_CKB_Mask2 (3L << 2) | 59 #define FWL_PARTSTATE_CKB_Mask2 (3L << 2) |
| 62 #define FWL_EVT_CKB_CheckStateChanged L"FWL_EVENT_CKB_CheckStateChanged" | 60 #define FWL_EVT_CKB_CheckStateChanged L"FWL_EVENT_CKB_CheckStateChanged" |
| 63 #define FWL_EVTHASH_CKB_CheckStateChanged 2503252963 | 61 #define FWL_EVTHASH_CKB_CheckStateChanged 2503252963 |
| 64 BEGIN_FWL_EVENT_DEF(CFWL_EvtCkbCheckStateChanged, | 62 BEGIN_FWL_EVENT_DEF(CFWL_EvtCkbCheckStateChanged, |
| 65 FWL_EVTHASH_CKB_CheckStateChanged) | 63 FWL_EVTHASH_CKB_CheckStateChanged) |
| 66 END_FWL_EVENT_DEF | 64 END_FWL_EVENT_DEF |
| 67 class IFWL_CheckBoxDP : public IFWL_DataProvider { | 65 class IFWL_CheckBoxDP : public IFWL_DataProvider { |
| 68 public: | 66 public: |
| 69 virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget) = 0; | 67 virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget) = 0; |
| 70 }; | 68 }; |
| 69 |
| 71 class IFWL_CheckBox : public IFWL_Widget { | 70 class IFWL_CheckBox : public IFWL_Widget { |
| 72 public: | 71 public: |
| 73 IFWL_CheckBox(); | 72 static IFWL_CheckBox* Create(const CFWL_WidgetImpProperties& properties, |
| 74 FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties, | 73 IFWL_Widget* pOuter); |
| 75 IFWL_Widget* pOuter); | |
| 76 int32_t GetCheckState(); | 74 int32_t GetCheckState(); |
| 77 FWL_ERR SetCheckState(int32_t iCheck); | 75 FWL_ERR SetCheckState(int32_t iCheck); |
| 78 | 76 |
| 77 protected: |
| 78 IFWL_CheckBox(); |
| 79 }; | 79 }; |
| 80 class IFWL_RadioButton : public IFWL_Widget { | 80 |
| 81 public: | |
| 82 IFWL_RadioButton(); | |
| 83 FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties, | |
| 84 IFWL_Widget* pOuter); | |
| 85 int32_t GetCheckState(); | |
| 86 FWL_ERR SetCheckState(int32_t iCheck); | |
| 87 }; | |
| 88 #endif | 81 #endif |
| OLD | NEW |