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 <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 m_iCaptureBtn(-1), | 54 m_iCaptureBtn(-1), |
55 m_iSysBox(0), | 55 m_iSysBox(0), |
56 m_bLButtonDown(false), | 56 m_bLButtonDown(false), |
57 m_bMaximized(false), | 57 m_bMaximized(false), |
58 m_bSetMaximize(false), | 58 m_bSetMaximize(false), |
59 m_bDoModalFlag(false) { | 59 m_bDoModalFlag(false) { |
60 m_rtRelative.Reset(); | 60 m_rtRelative.Reset(); |
61 m_rtRestore.Reset(); | 61 m_rtRestore.Reset(); |
62 | 62 |
63 RegisterForm(); | 63 RegisterForm(); |
64 RegisterEventTarget(); | 64 RegisterEventTarget(nullptr); |
65 } | 65 } |
66 | 66 |
67 IFWL_Form::~IFWL_Form() { | 67 IFWL_Form::~IFWL_Form() { |
68 UnregisterEventTarget(); | 68 UnregisterEventTarget(); |
69 UnRegisterForm(); | 69 UnRegisterForm(); |
70 RemoveSysButtons(); | 70 RemoveSysButtons(); |
71 } | 71 } |
72 | 72 |
73 FWL_Type IFWL_Form::GetClassID() const { | 73 FWL_Type IFWL_Form::GetClassID() const { |
74 return FWL_Type::Form; | 74 return FWL_Type::Form; |
(...skipping 555 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 |