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/cfwl_form.h" | 7 #include "xfa/fwl/core/cfwl_form.h" |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
274 | 274 |
275 CFWL_NoteDriver* pDriver = pApp->GetNoteDriver(); | 275 CFWL_NoteDriver* pDriver = pApp->GetNoteDriver(); |
276 if (!pDriver) | 276 if (!pDriver) |
277 return nullptr; | 277 return nullptr; |
278 | 278 |
279 m_pNoteLoop = pdfium::MakeUnique<CFWL_NoteLoop>(); | 279 m_pNoteLoop = pdfium::MakeUnique<CFWL_NoteLoop>(); |
280 m_pNoteLoop->SetMainForm(this); | 280 m_pNoteLoop->SetMainForm(this); |
281 | 281 |
282 pDriver->PushNoteLoop(m_pNoteLoop.get()); | 282 pDriver->PushNoteLoop(m_pNoteLoop.get()); |
283 m_bDoModalFlag = true; | 283 m_bDoModalFlag = true; |
284 SetStates(FWL_WGTSTATE_Invisible, false); | 284 RemoveStates(FWL_WGTSTATE_Invisible); |
285 pDriver->Run(); | 285 pDriver->Run(); |
286 | 286 |
287 #if _FX_OS_ != _FX_MACOSX_ | 287 #if _FX_OS_ != _FX_MACOSX_ |
288 pDriver->PopNoteLoop(); | 288 pDriver->PopNoteLoop(); |
289 #endif | 289 #endif |
290 | 290 |
291 m_pNoteLoop.reset(); | 291 m_pNoteLoop.reset(); |
292 return nullptr; | 292 return nullptr; |
293 } | 293 } |
294 | 294 |
295 void CFWL_Form::EndDoModal() { | 295 void CFWL_Form::EndDoModal() { |
296 if (!m_pNoteLoop) | 296 if (!m_pNoteLoop) |
297 return; | 297 return; |
298 | 298 |
299 m_bDoModalFlag = false; | 299 m_bDoModalFlag = false; |
300 | 300 |
301 #if (_FX_OS_ == _FX_MACOSX_) | 301 #if (_FX_OS_ == _FX_MACOSX_) |
302 m_pNoteLoop->EndModalLoop(); | 302 m_pNoteLoop->EndModalLoop(); |
303 const CFWL_App* pApp = GetOwnerApp(); | 303 const CFWL_App* pApp = GetOwnerApp(); |
304 if (!pApp) | 304 if (!pApp) |
305 return; | 305 return; |
306 | 306 |
307 CFWL_NoteDriver* pDriver = | 307 CFWL_NoteDriver* pDriver = |
308 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver()); | 308 static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver()); |
309 if (!pDriver) | 309 if (!pDriver) |
310 return; | 310 return; |
311 | 311 |
312 pDriver->PopNoteLoop(); | 312 pDriver->PopNoteLoop(); |
313 SetStates(FWL_WGTSTATE_Invisible, true); | 313 SetStates(FWL_WGTSTATE_Invisible); |
314 #else | 314 #else |
315 SetStates(FWL_WGTSTATE_Invisible, true); | 315 RemoveStates(FWL_WGTSTATE_Invisible); |
Tom Sepez
2016/12/06 22:38:26
Ooopsie.
dsinclair
2016/12/07 15:03:27
Done.
| |
316 m_pNoteLoop->EndModalLoop(); | 316 m_pNoteLoop->EndModalLoop(); |
317 #endif | 317 #endif |
318 } | 318 } |
319 | 319 |
320 void CFWL_Form::DrawBackground(CFX_Graphics* pGraphics, | 320 void CFWL_Form::DrawBackground(CFX_Graphics* pGraphics, |
321 IFWL_ThemeProvider* pTheme) { | 321 IFWL_ThemeProvider* pTheme) { |
322 CFWL_ThemeBackground param; | 322 CFWL_ThemeBackground param; |
323 param.m_pWidget = this; | 323 param.m_pWidget = this; |
324 param.m_iPart = CFWL_Part::Background; | 324 param.m_iPart = CFWL_Part::Background; |
325 param.m_pGraphics = pGraphics; | 325 param.m_pGraphics = pGraphics; |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
630 HitTest(pMsg->m_fx, pMsg->m_fy) == FWL_WidgetHit::Titlebar) { | 630 HitTest(pMsg->m_fx, pMsg->m_fy) == FWL_WidgetHit::Titlebar) { |
631 if (m_bMaximized) | 631 if (m_bMaximized) |
632 SetWidgetRect(m_rtRestore); | 632 SetWidgetRect(m_rtRestore); |
633 else | 633 else |
634 SetWorkAreaRect(); | 634 SetWorkAreaRect(); |
635 | 635 |
636 Update(); | 636 Update(); |
637 m_bMaximized = !m_bMaximized; | 637 m_bMaximized = !m_bMaximized; |
638 } | 638 } |
639 } | 639 } |
OLD | NEW |