| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/fwl/core/ifwl_form.h" | 7 #include "xfa/fwl/core/ifwl_form.h" |
| 8 | 8 |
| 9 #include "third_party/base/ptr_util.h" | 9 #include "third_party/base/ptr_util.h" |
| 10 #include "xfa/fde/tto/fde_textout.h" | 10 #include "xfa/fde/tto/fde_textout.h" |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 | 322 |
| 323 IFWL_Widget* IFWL_Form::DoModal() { | 323 IFWL_Widget* IFWL_Form::DoModal() { |
| 324 const IFWL_App* pApp = GetOwnerApp(); | 324 const IFWL_App* pApp = GetOwnerApp(); |
| 325 if (!pApp) | 325 if (!pApp) |
| 326 return nullptr; | 326 return nullptr; |
| 327 | 327 |
| 328 CFWL_NoteDriver* pDriver = pApp->GetNoteDriver(); | 328 CFWL_NoteDriver* pDriver = pApp->GetNoteDriver(); |
| 329 if (!pDriver) | 329 if (!pDriver) |
| 330 return nullptr; | 330 return nullptr; |
| 331 | 331 |
| 332 m_pNoteLoop.reset(new CFWL_NoteLoop(this)); | 332 m_pNoteLoop = pdfium::MakeUnique<CFWL_NoteLoop>(); |
| 333 m_pNoteLoop->SetMainForm(this); |
| 334 |
| 333 pDriver->PushNoteLoop(m_pNoteLoop.get()); | 335 pDriver->PushNoteLoop(m_pNoteLoop.get()); |
| 334 m_bDoModalFlag = true; | 336 m_bDoModalFlag = true; |
| 335 SetStates(FWL_WGTSTATE_Invisible, false); | 337 SetStates(FWL_WGTSTATE_Invisible, false); |
| 336 pDriver->Run(); | 338 pDriver->Run(); |
| 337 #if (_FX_OS_ == _FX_MACOSX_) | 339 #if (_FX_OS_ == _FX_MACOSX_) |
| 338 #else | 340 #else |
| 339 pDriver->PopNoteLoop(); | 341 pDriver->PopNoteLoop(); |
| 340 #endif | 342 #endif |
| 341 m_pNoteLoop.reset(); | 343 m_pNoteLoop.reset(); |
| 342 return nullptr; | 344 return nullptr; |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 | 942 |
| 941 uint32_t CFWL_SysBtn::GetPartState() const { | 943 uint32_t CFWL_SysBtn::GetPartState() const { |
| 942 if (IsDisabled()) | 944 if (IsDisabled()) |
| 943 return CFWL_PartState_Disabled; | 945 return CFWL_PartState_Disabled; |
| 944 if (m_dwState & FWL_SYSBUTTONSTATE_Pressed) | 946 if (m_dwState & FWL_SYSBUTTONSTATE_Pressed) |
| 945 return CFWL_PartState_Pressed; | 947 return CFWL_PartState_Pressed; |
| 946 if (m_dwState & FWL_SYSBUTTONSTATE_Hover) | 948 if (m_dwState & FWL_SYSBUTTONSTATE_Hover) |
| 947 return CFWL_PartState_Hovered; | 949 return CFWL_PartState_Hovered; |
| 948 return CFWL_PartState_Normal; | 950 return CFWL_PartState_Normal; |
| 949 } | 951 } |
| OLD | NEW |