| 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/fwl_formimp.h" | 7 #include "xfa/fwl/core/fwl_formimp.h" |
| 8 | 8 |
| 9 #include "xfa/fde/tto/fde_textout.h" | 9 #include "xfa/fde/tto/fde_textout.h" |
| 10 #include "xfa/fwl/basewidget/fwl_formproxyimp.h" | 10 #include "xfa/fwl/basewidget/fwl_formproxyimp.h" |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 } | 319 } |
| 320 if (m_pMaxBox) { | 320 if (m_pMaxBox) { |
| 321 param.m_iPart = CFWL_Part::MaximizeBox; | 321 param.m_iPart = CFWL_Part::MaximizeBox; |
| 322 param.m_dwStates = m_pMaxBox->GetPartState(); | 322 param.m_dwStates = m_pMaxBox->GetPartState(); |
| 323 if (m_pProperties->m_dwStates & FWL_WGTSTATE_Deactivated) { | 323 if (m_pProperties->m_dwStates & FWL_WGTSTATE_Deactivated) { |
| 324 param.m_dwStates = CFWL_PartState_Disabled; | 324 param.m_dwStates = CFWL_PartState_Disabled; |
| 325 } else if (CFWL_PartState_Normal == param.m_dwStates && m_bMouseIn) { | 325 } else if (CFWL_PartState_Normal == param.m_dwStates && m_bMouseIn) { |
| 326 param.m_dwStates = CFWL_PartState_Hovered; | 326 param.m_dwStates = CFWL_PartState_Hovered; |
| 327 } | 327 } |
| 328 param.m_rtPart = m_pMaxBox->m_rtBtn; | 328 param.m_rtPart = m_pMaxBox->m_rtBtn; |
| 329 param.m_dwData = m_bMaximized; | 329 param.m_bMaximize = m_bMaximized; |
| 330 pTheme->DrawBackground(¶m); | 330 pTheme->DrawBackground(¶m); |
| 331 } | 331 } |
| 332 if (m_pMinBox) { | 332 if (m_pMinBox) { |
| 333 param.m_iPart = CFWL_Part::MinimizeBox; | 333 param.m_iPart = CFWL_Part::MinimizeBox; |
| 334 param.m_dwStates = m_pMinBox->GetPartState(); | 334 param.m_dwStates = m_pMinBox->GetPartState(); |
| 335 if (m_pProperties->m_dwStates & FWL_WGTSTATE_Deactivated) { | 335 if (m_pProperties->m_dwStates & FWL_WGTSTATE_Deactivated) { |
| 336 param.m_dwStates = CFWL_PartState_Disabled; | 336 param.m_dwStates = CFWL_PartState_Disabled; |
| 337 } else if (CFWL_PartState_Normal == param.m_dwStates && m_bMouseIn) { | 337 } else if (CFWL_PartState_Normal == param.m_dwStates && m_bMouseIn) { |
| 338 param.m_dwStates = CFWL_PartState_Hovered; | 338 param.m_dwStates = CFWL_PartState_Hovered; |
| 339 } | 339 } |
| 340 param.m_rtPart = m_pMinBox->m_rtBtn; | 340 param.m_rtPart = m_pMinBox->m_rtBtn; |
| 341 pTheme->DrawBackground(¶m); | 341 pTheme->DrawBackground(¶m); |
| 342 } | 342 } |
| 343 m_bMouseIn = FALSE; | 343 m_bMouseIn = FALSE; |
| 344 } | 344 } |
| 345 #else | 345 #else |
| 346 { | 346 { |
| 347 if (m_pCloseBox) { | 347 if (m_pCloseBox) { |
| 348 param.m_iPart = CFWL_Part::CloseBox; | 348 param.m_iPart = CFWL_Part::CloseBox; |
| 349 param.m_dwStates = m_pCloseBox->GetPartState(); | 349 param.m_dwStates = m_pCloseBox->GetPartState(); |
| 350 param.m_rtPart = m_pCloseBox->m_rtBtn; | 350 param.m_rtPart = m_pCloseBox->m_rtBtn; |
| 351 pTheme->DrawBackground(¶m); | 351 pTheme->DrawBackground(¶m); |
| 352 } | 352 } |
| 353 if (m_pMaxBox) { | 353 if (m_pMaxBox) { |
| 354 param.m_iPart = CFWL_Part::MaximizeBox; | 354 param.m_iPart = CFWL_Part::MaximizeBox; |
| 355 param.m_dwStates = m_pMaxBox->GetPartState(); | 355 param.m_dwStates = m_pMaxBox->GetPartState(); |
| 356 param.m_rtPart = m_pMaxBox->m_rtBtn; | 356 param.m_rtPart = m_pMaxBox->m_rtBtn; |
| 357 param.m_dwData = m_bMaximized; | 357 param.m_bMaximize = m_bMaximized; |
| 358 pTheme->DrawBackground(¶m); | 358 pTheme->DrawBackground(¶m); |
| 359 } | 359 } |
| 360 if (m_pMinBox) { | 360 if (m_pMinBox) { |
| 361 param.m_iPart = CFWL_Part::MinimizeBox; | 361 param.m_iPart = CFWL_Part::MinimizeBox; |
| 362 param.m_dwStates = m_pMinBox->GetPartState(); | 362 param.m_dwStates = m_pMinBox->GetPartState(); |
| 363 param.m_rtPart = m_pMinBox->m_rtBtn; | 363 param.m_rtPart = m_pMinBox->m_rtBtn; |
| 364 pTheme->DrawBackground(¶m); | 364 pTheme->DrawBackground(¶m); |
| 365 } | 365 } |
| 366 } | 366 } |
| 367 #endif | 367 #endif |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 } | 1140 } |
| 1141 void CFWL_FormImpDelegate::OnWindowMove(CFWL_MsgWindowMove* pMsg) { | 1141 void CFWL_FormImpDelegate::OnWindowMove(CFWL_MsgWindowMove* pMsg) { |
| 1142 m_pOwner->m_pProperties->m_rtWidget.left = pMsg->m_fx; | 1142 m_pOwner->m_pProperties->m_rtWidget.left = pMsg->m_fx; |
| 1143 m_pOwner->m_pProperties->m_rtWidget.top = pMsg->m_fy; | 1143 m_pOwner->m_pProperties->m_rtWidget.top = pMsg->m_fy; |
| 1144 } | 1144 } |
| 1145 void CFWL_FormImpDelegate::OnClose(CFWL_MsgClose* pMsg) { | 1145 void CFWL_FormImpDelegate::OnClose(CFWL_MsgClose* pMsg) { |
| 1146 CFWL_EvtClose eClose; | 1146 CFWL_EvtClose eClose; |
| 1147 eClose.m_pSrcTarget = m_pOwner->m_pInterface; | 1147 eClose.m_pSrcTarget = m_pOwner->m_pInterface; |
| 1148 m_pOwner->DispatchEvent(&eClose); | 1148 m_pOwner->DispatchEvent(&eClose); |
| 1149 } | 1149 } |
| OLD | NEW |