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

Side by Side Diff: xfa/fwl/core/cfwl_note.h

Issue 1901183002: Remove CFWL_Note. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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/core/cfwl_message.h ('k') | xfa/fwl/core/fwl_formimp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef XFA_FWL_CORE_CFWL_NOTE_H_
8 #define XFA_FWL_CORE_CFWL_NOTE_H_
9
10 #include "core/fxcrt/include/fx_string.h"
11 #include "core/fxcrt/include/fx_system.h"
12 #include "xfa/fwl/core/fwl_error.h"
13
14 class IFWL_Widget;
15
16 // Separate hierarchy not related to IFWL_* hierarchy. These should not
17 // get cast to IFWL_* types.
18 class CFWL_Note {
19 public:
20 virtual uint32_t Release() {
21 m_dwRefCount--;
22 uint32_t dwRefCount = m_dwRefCount;
23 if (!m_dwRefCount)
24 delete this;
25 return dwRefCount;
26 }
27
28 virtual CFWL_Note* Retain() {
29 m_dwRefCount++;
30 return this;
31 }
32
33 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const {
34 wsClass = L"CFWL_Note";
35 return FWL_ERR_Succeeded;
36 }
37
38 virtual uint32_t GetClassID() const { return 0; }
39
40 virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const {
41 return TRUE;
42 }
43
44 virtual CFWL_Note* Clone() { return NULL; }
45 FX_BOOL IsEvent() const { return m_bIsEvent; }
46
47 IFWL_Widget* m_pSrcTarget;
48 IFWL_Widget* m_pDstTarget;
49 uint32_t m_dwExtend;
50
51 protected:
52 CFWL_Note(FX_BOOL bIsEvent)
53 : m_pSrcTarget(NULL),
54 m_pDstTarget(NULL),
55 m_dwExtend(0),
56 m_dwRefCount(1),
57 m_bIsEvent(bIsEvent) {}
58
59 virtual ~CFWL_Note() {}
60 virtual FX_BOOL Initialize() { return TRUE; }
61 virtual int32_t Finalize() { return 0; }
62
63 uint32_t m_dwRefCount;
64 FX_BOOL m_bIsEvent;
65 };
66
67 #endif // XFA_FWL_CORE_CFWL_NOTE_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_message.h ('k') | xfa/fwl/core/fwl_formimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698