xref: /aosp_15_r20/external/pdfium/fpdfsdk/formfiller/cffl_pushbutton.cpp (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2014 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 #include "fpdfsdk/formfiller/cffl_pushbutton.h"
8 
9 #include <utility>
10 
11 #include "fpdfsdk/formfiller/cffl_formfield.h"
12 #include "fpdfsdk/pwl/cpwl_special_button.h"
13 
CFFL_PushButton(CFFL_InteractiveFormFiller * pFormFiller,CPDFSDK_Widget * pWidget)14 CFFL_PushButton::CFFL_PushButton(CFFL_InteractiveFormFiller* pFormFiller,
15                                  CPDFSDK_Widget* pWidget)
16     : CFFL_Button(pFormFiller, pWidget) {}
17 
18 CFFL_PushButton::~CFFL_PushButton() = default;
19 
NewPWLWindow(const CPWL_Wnd::CreateParams & cp,std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)20 std::unique_ptr<CPWL_Wnd> CFFL_PushButton::NewPWLWindow(
21     const CPWL_Wnd::CreateParams& cp,
22     std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) {
23   auto pWnd = std::make_unique<CPWL_PushButton>(cp, std::move(pAttachedData));
24   pWnd->Realize();
25   return std::move(pWnd);
26 }
27