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

Side by Side Diff: xfa/include/fwl/basewidget/fwl_checkbox.h

Issue 1453473002: FWL refcounts never incremented (part 2). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Rebased past part1. Created 5 years 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
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 _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" 14 #define FWL_CLASS_RadioButton L"FWL_RADIOBUTTON"
Tom Sepez 2015/12/09 20:40:04 Note: the places these are checked always do radio
15 #define FWL_CLASSHASH_CheckBox 4107183823 15 #define FWL_CLASSHASH_CheckBox 4107183823
16 #define FWL_CLASSHASH_RadioButton 3811304691 16 #define FWL_CLASSHASH_RadioButton 3811304691
17 #define FWL_STYLEEXT_CKB_Left (0L << 0) 17 #define FWL_STYLEEXT_CKB_Left (0L << 0)
18 #define FWL_STYLEEXT_CKB_Center (1L << 0) 18 #define FWL_STYLEEXT_CKB_Center (1L << 0)
19 #define FWL_STYLEEXT_CKB_Right (2L << 0) 19 #define FWL_STYLEEXT_CKB_Right (2L << 0)
20 #define FWL_STYLEEXT_CKB_Top (0L << 2) 20 #define FWL_STYLEEXT_CKB_Top (0L << 2)
21 #define FWL_STYLEEXT_CKB_VCenter (1L << 2) 21 #define FWL_STYLEEXT_CKB_VCenter (1L << 2)
22 #define FWL_STYLEEXT_CKB_Bottom (2L << 2) 22 #define FWL_STYLEEXT_CKB_Bottom (2L << 2)
23 #define FWL_STYLEEXT_CKB_LeftText (1L << 4) 23 #define FWL_STYLEEXT_CKB_LeftText (1L << 4)
24 #define FWL_STYLEEXT_CKB_MultiLine (1L << 5) 24 #define FWL_STYLEEXT_CKB_MultiLine (1L << 5)
25 #define FWL_STYLEEXT_CKB_3State (1L << 6) 25 #define FWL_STYLEEXT_CKB_3State (1L << 6)
26 #define FWL_STYLEEXT_CKB_RadioButton (1L << 7) 26 #define FWL_STYLEEXT_CKB_RadioButton (1L << 7)
Tom Sepez 2015/12/09 20:40:04 Note: A single class with this style attribute.
27 #define FWL_STYLEEXT_CKB_ShapeSolidSquare (0L << 8) 27 #define FWL_STYLEEXT_CKB_ShapeSolidSquare (0L << 8)
28 #define FWL_STYLEEXT_CKB_ShapeSunkenSquare (1L << 8) 28 #define FWL_STYLEEXT_CKB_ShapeSunkenSquare (1L << 8)
29 #define FWL_STYLEEXT_CKB_ShapeSolidCircle (2L << 8) 29 #define FWL_STYLEEXT_CKB_ShapeSolidCircle (2L << 8)
30 #define FWL_STYLEEXT_CKB_ShapeSunkenCircle (3L << 8) 30 #define FWL_STYLEEXT_CKB_ShapeSunkenCircle (3L << 8)
31 #define FWL_STYLEEXT_CKB_SignShapeCheck (0L << 10) 31 #define FWL_STYLEEXT_CKB_SignShapeCheck (0L << 10)
32 #define FWL_STYLEEXT_CKB_SignShapeCircle (1L << 10) 32 #define FWL_STYLEEXT_CKB_SignShapeCircle (1L << 10)
33 #define FWL_STYLEEXT_CKB_SignShapeCross (2L << 10) 33 #define FWL_STYLEEXT_CKB_SignShapeCross (2L << 10)
34 #define FWL_STYLEEXT_CKB_SignShapeDiamond (3L << 10) 34 #define FWL_STYLEEXT_CKB_SignShapeDiamond (3L << 10)
35 #define FWL_STYLEEXT_CKB_SignShapeSquare (4L << 10) 35 #define FWL_STYLEEXT_CKB_SignShapeSquare (4L << 10)
36 #define FWL_STYLEEXT_CKB_SignShapeStar (5L << 10) 36 #define FWL_STYLEEXT_CKB_SignShapeStar (5L << 10)
(...skipping 24 matching lines...) Expand all
61 #define FWL_PARTSTATE_CKB_Mask2 (3L << 2) 61 #define FWL_PARTSTATE_CKB_Mask2 (3L << 2)
62 #define FWL_EVT_CKB_CheckStateChanged L"FWL_EVENT_CKB_CheckStateChanged" 62 #define FWL_EVT_CKB_CheckStateChanged L"FWL_EVENT_CKB_CheckStateChanged"
63 #define FWL_EVTHASH_CKB_CheckStateChanged 2503252963 63 #define FWL_EVTHASH_CKB_CheckStateChanged 2503252963
64 BEGIN_FWL_EVENT_DEF(CFWL_EvtCkbCheckStateChanged, 64 BEGIN_FWL_EVENT_DEF(CFWL_EvtCkbCheckStateChanged,
65 FWL_EVTHASH_CKB_CheckStateChanged) 65 FWL_EVTHASH_CKB_CheckStateChanged)
66 END_FWL_EVENT_DEF 66 END_FWL_EVENT_DEF
67 class IFWL_CheckBoxDP : public IFWL_DataProvider { 67 class IFWL_CheckBoxDP : public IFWL_DataProvider {
68 public: 68 public:
69 virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget) = 0; 69 virtual FX_FLOAT GetBoxSize(IFWL_Widget* pWidget) = 0;
70 }; 70 };
71
71 class IFWL_CheckBox : public IFWL_Widget { 72 class IFWL_CheckBox : public IFWL_Widget {
72 public: 73 public:
73 IFWL_CheckBox(); 74 static IFWL_CheckBox* Create(const CFWL_WidgetImpProperties& properties,
74 FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties, 75 IFWL_Widget* pOuter);
Lei Zhang 2015/12/09 03:43:42 Always NULL
75 IFWL_Widget* pOuter);
76 int32_t GetCheckState(); 76 int32_t GetCheckState();
77 FWL_ERR SetCheckState(int32_t iCheck); 77 FWL_ERR SetCheckState(int32_t iCheck);
78 78
79 protected:
80 IFWL_CheckBox();
79 }; 81 };
82
80 class IFWL_RadioButton : public IFWL_Widget { 83 class IFWL_RadioButton : public IFWL_Widget {
81 public: 84 public:
82 IFWL_RadioButton(); 85 static IFWL_RadioButton* Create(const CFWL_WidgetImpProperties& properties,
Lei Zhang 2015/12/09 03:43:42 Never called?
Tom Sepez 2015/12/09 20:32:05 And hence the class is unused. removed.
83 FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties, 86 IFWL_Widget* pOuter);
84 IFWL_Widget* pOuter);
85 int32_t GetCheckState(); 87 int32_t GetCheckState();
86 FWL_ERR SetCheckState(int32_t iCheck); 88 FWL_ERR SetCheckState(int32_t iCheck);
89
90 protected:
91 IFWL_RadioButton();
87 }; 92 };
88 #endif 93 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698