summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_datetimecalendar.h
blob: 3d856fd578cd110c67a45a5f9ae0903ed4ff84f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com

#ifndef XFA_FWL_CORE_IFWL_DATETIMECALENDAR_H_
#define XFA_FWL_CORE_IFWL_DATETIMECALENDAR_H_

#include "xfa/fwl/core/ifwl_monthcalendar.h"

class IFWL_DateTimeCalendar : public IFWL_MonthCalendar {
 public:
  IFWL_DateTimeCalendar(const IFWL_App* app,
                        const CFWL_WidgetImpProperties& properties,
                        IFWL_Widget* pOuter);

  // IFWL_MonthCalendar
  void Initialize() override;
  void Finalize() override;

 protected:
  friend class CFWL_DateTimeCalendarImpDelegate;
};

class CFWL_DateTimeCalendarImpDelegate : public CFWL_MonthCalendarImpDelegate {
 public:
  CFWL_DateTimeCalendarImpDelegate(IFWL_DateTimeCalendar* pOwner);
  void OnProcessMessage(CFWL_Message* pMessage) override;

  void OnLButtonDownEx(CFWL_MsgMouse* pMsg);
  void OnLButtonUpEx(CFWL_MsgMouse* pMsg);
  void OnMouseMoveEx(CFWL_MsgMouse* pMsg);

 protected:
  IFWL_DateTimeCalendar* m_pOwner;
  FX_BOOL m_bFlag;

 private:
  void DisForm_OnProcessMessage(CFWL_Message* pMessage);
  void DisForm_OnLButtonUpEx(CFWL_MsgMouse* pMsg);
};

#endif  // XFA_FWL_CORE_IFWL_DATETIMECALENDAR_H_