summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_comboboxproxy.h
blob: 8282348657b2e186ff099f70066e8d364244f4d7 (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
// Copyright 2016 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_CFWL_COMBOBOXPROXY_H_
#define XFA_FWL_CFWL_COMBOBOXPROXY_H_

#include <memory>

#include "xfa/fwl/cfwl_formproxy.h"

class CFWL_ComboBox;

class CFWL_ComboBoxProxy : public CFWL_FormProxy {
 public:
  CFWL_ComboBoxProxy(CFWL_ComboBox* pCombobBox,
                     const CFWL_App* app,
                     std::unique_ptr<CFWL_WidgetProperties> properties,
                     CFWL_Widget* pOuter);
  ~CFWL_ComboBoxProxy() override;

  // CFWL_FormProxy
  void OnProcessMessage(CFWL_Message* pMessage) override;
  void OnDrawWidget(CXFA_Graphics* pGraphics,
                    const CFX_Matrix* pMatrix) override;

  void Reset() { m_bLButtonUpSelf = false; }

 private:
  void OnLButtonDown(CFWL_Message* pMsg);
  void OnLButtonUp(CFWL_Message* pMsg);
  void OnFocusChanged(CFWL_Message* pMsg, bool bSet);

  bool m_bLButtonDown;
  bool m_bLButtonUpSelf;
  CFWL_ComboBox* m_pComboBox;
};

#endif  // XFA_FWL_CFWL_COMBOBOXPROXY_H_