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

Side by Side Diff: xfa/fwl/core/cfwl_pushbutton.h

Issue 2556873004: Convert GetWidgetRect to return rect. (Closed)
Patch Set: Review feedback 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
« no previous file with comments | « xfa/fwl/core/cfwl_picturebox.cpp ('k') | xfa/fwl/core/cfwl_pushbutton.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 #ifndef XFA_FWL_CORE_CFWL_PUSHBUTTON_H_ 7 #ifndef XFA_FWL_CORE_CFWL_PUSHBUTTON_H_
8 #define XFA_FWL_CORE_CFWL_PUSHBUTTON_H_ 8 #define XFA_FWL_CORE_CFWL_PUSHBUTTON_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 21 matching lines...) Expand all
32 class CFX_DIBitmap; 32 class CFX_DIBitmap;
33 class CFWL_Widget; 33 class CFWL_Widget;
34 34
35 class CFWL_PushButton : public CFWL_Widget { 35 class CFWL_PushButton : public CFWL_Widget {
36 public: 36 public:
37 explicit CFWL_PushButton(const CFWL_App*); 37 explicit CFWL_PushButton(const CFWL_App*);
38 ~CFWL_PushButton() override; 38 ~CFWL_PushButton() override;
39 39
40 // CFWL_Widget 40 // CFWL_Widget
41 FWL_Type GetClassID() const override; 41 FWL_Type GetClassID() const override;
42 void GetWidgetRect(CFX_RectF& rect, bool bAutoSize) override;
43 void SetStates(uint32_t dwStates) override; 42 void SetStates(uint32_t dwStates) override;
44 void Update() override; 43 void Update() override;
45 void DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) override; 44 void DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) override;
46 void OnProcessMessage(CFWL_Message* pMessage) override; 45 void OnProcessMessage(CFWL_Message* pMessage) override;
47 void OnDrawWidget(CFX_Graphics* pGraphics, 46 void OnDrawWidget(CFX_Graphics* pGraphics,
48 const CFX_Matrix* pMatrix) override; 47 const CFX_Matrix* pMatrix) override;
49 48
50 private: 49 private:
51 void DrawBkground(CFX_Graphics* pGraphics, 50 void DrawBkground(CFX_Graphics* pGraphics,
52 IFWL_ThemeProvider* pTheme, 51 IFWL_ThemeProvider* pTheme,
53 const CFX_Matrix* pMatrix); 52 const CFX_Matrix* pMatrix);
54 uint32_t GetPartStates(); 53 uint32_t GetPartStates();
55 void UpdateTextOutStyles(); 54 void UpdateTextOutStyles();
56 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); 55 void OnFocusChanged(CFWL_Message* pMsg, bool bSet);
57 void OnLButtonDown(CFWL_MsgMouse* pMsg); 56 void OnLButtonDown(CFWL_MsgMouse* pMsg);
58 void OnLButtonUp(CFWL_MsgMouse* pMsg); 57 void OnLButtonUp(CFWL_MsgMouse* pMsg);
59 void OnMouseMove(CFWL_MsgMouse* pMsg); 58 void OnMouseMove(CFWL_MsgMouse* pMsg);
60 void OnMouseLeave(CFWL_MsgMouse* pMsg); 59 void OnMouseLeave(CFWL_MsgMouse* pMsg);
61 void OnKeyDown(CFWL_MsgKey* pMsg); 60 void OnKeyDown(CFWL_MsgKey* pMsg);
62 61
63 CFX_RectF m_rtClient; 62 CFX_RectF m_rtClient;
64 CFX_RectF m_rtCaption; 63 CFX_RectF m_rtCaption;
65 bool m_bBtnDown; 64 bool m_bBtnDown;
66 uint32_t m_dwTTOStyles; 65 uint32_t m_dwTTOStyles;
67 int32_t m_iTTOAlign; 66 int32_t m_iTTOAlign;
68 }; 67 };
69 68
70 #endif // XFA_FWL_CORE_CFWL_PUSHBUTTON_H_ 69 #endif // XFA_FWL_CORE_CFWL_PUSHBUTTON_H_
OLDNEW
« no previous file with comments | « xfa/fwl/core/cfwl_picturebox.cpp ('k') | xfa/fwl/core/cfwl_pushbutton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698