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

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

Issue 2530993002: Cleanup FWL Event and Message code. (Closed)
Patch Set: Cleanup Created 4 years 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
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/cfwl_form.h" 7 #include "xfa/fwl/core/cfwl_form.h"
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "third_party/base/ptr_util.h" 11 #include "third_party/base/ptr_util.h"
12 #include "xfa/fde/tto/fde_textout.h" 12 #include "xfa/fde/tto/fde_textout.h"
13 #include "xfa/fwl/core/cfwl_app.h" 13 #include "xfa/fwl/core/cfwl_app.h"
14 #include "xfa/fwl/core/cfwl_evtclose.h" 14 #include "xfa/fwl/core/cfwl_event.h"
15 #include "xfa/fwl/core/cfwl_formproxy.h" 15 #include "xfa/fwl/core/cfwl_formproxy.h"
16 #include "xfa/fwl/core/cfwl_msgmouse.h" 16 #include "xfa/fwl/core/cfwl_msgmouse.h"
17 #include "xfa/fwl/core/cfwl_notedriver.h" 17 #include "xfa/fwl/core/cfwl_notedriver.h"
18 #include "xfa/fwl/core/cfwl_noteloop.h" 18 #include "xfa/fwl/core/cfwl_noteloop.h"
19 #include "xfa/fwl/core/cfwl_sysbtn.h" 19 #include "xfa/fwl/core/cfwl_sysbtn.h"
20 #include "xfa/fwl/core/cfwl_themebackground.h" 20 #include "xfa/fwl/core/cfwl_themebackground.h"
21 #include "xfa/fwl/core/cfwl_themepart.h" 21 #include "xfa/fwl/core/cfwl_themepart.h"
22 #include "xfa/fwl/core/cfwl_themetext.h" 22 #include "xfa/fwl/core/cfwl_themetext.h"
23 #include "xfa/fwl/core/cfwl_widgetmgr.h" 23 #include "xfa/fwl/core/cfwl_widgetmgr.h"
24 #include "xfa/fwl/core/ifwl_themeprovider.h" 24 #include "xfa/fwl/core/ifwl_themeprovider.h"
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 if (m_bMaximized) { 549 if (m_bMaximized) {
550 SetWidgetRect(m_rtRestore); 550 SetWidgetRect(m_rtRestore);
551 Update(); 551 Update();
552 Repaint(); 552 Repaint();
553 } else { 553 } else {
554 SetWorkAreaRect(); 554 SetWorkAreaRect();
555 Update(); 555 Update();
556 } 556 }
557 m_bMaximized = !m_bMaximized; 557 m_bMaximized = !m_bMaximized;
558 } else if (pPressedBtn != m_pMinBox) { 558 } else if (pPressedBtn != m_pMinBox) {
559 CFWL_EvtClose eClose; 559 CFWL_Event eClose(CFWL_EventType::Close);
560 eClose.m_pSrcTarget = this; 560 eClose.m_pSrcTarget = this;
561 DispatchEvent(&eClose); 561 DispatchEvent(&eClose);
562 } 562 }
563 } 563 }
564 564
565 void CFWL_Form::OnMouseMove(CFWL_MsgMouse* pMsg) { 565 void CFWL_Form::OnMouseMove(CFWL_MsgMouse* pMsg) {
566 if (m_bLButtonDown) 566 if (m_bLButtonDown)
567 return; 567 return;
568 568
569 CFX_RectF rtInvalidate; 569 CFX_RectF rtInvalidate;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698