Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: xfa/fwl/core/fwl_formimp.cpp

Issue 1950973003: Cleanup CFWL_ThemePart data. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/core/cfwl_themepart.h ('k') | xfa/fwl/theme/cfwl_edittp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(&param); 330 pTheme->DrawBackground(&param);
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(&param); 341 pTheme->DrawBackground(&param);
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(&param); 351 pTheme->DrawBackground(&param);
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(&param); 358 pTheme->DrawBackground(&param);
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(&param); 364 pTheme->DrawBackground(&param);
365 } 365 }
366 } 366 }
367 #endif 367 #endif
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_themepart.h ('k') | xfa/fwl/theme/cfwl_edittp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698