• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 The PDFium Authors
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_CFWL_EVENTSCROLL_H_
8 #define XFA_FWL_CFWL_EVENTSCROLL_H_
9 
10 #include "xfa/fwl/cfwl_event.h"
11 
12 namespace pdfium {
13 
14 class CFWL_EventScroll final : public CFWL_Event {
15  public:
16   enum class Code {
17     None = 1,
18     Min,
19     Max,
20     PageBackward,
21     PageForward,
22     StepBackward,
23     StepForward,
24     Pos,
25     TrackPos,
26     EndScroll,
27   };
28 
29   CFWL_EventScroll(CFWL_Widget* pSrcTarget, Code code, float pos);
30   ~CFWL_EventScroll() override;
31 
GetScrollCode()32   Code GetScrollCode() const { return m_iScrollCode; }
GetPos()33   float GetPos() const { return m_fPos; }
34 
35  private:
36   const Code m_iScrollCode;
37   const float m_fPos;
38 };
39 
40 }  // namespace pdfium
41 
42 // TODO(crbug.com/42271761): Remove.
43 using pdfium::CFWL_EventScroll;
44 
45 #endif  // XFA_FWL_CFWL_EVENTSCROLL_H_
46