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

Side by Side Diff: fpdfsdk/pdfwindow/PWL_EditCtrl.h

Issue 2453683011: Remove FX_BOOL from fpdfsdk. (Closed)
Patch Set: Regenerate patch after rebase. Created 4 years, 1 month 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 | « fpdfsdk/pdfwindow/PWL_Edit.cpp ('k') | fpdfsdk/pdfwindow/PWL_EditCtrl.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 FPDFSDK_PDFWINDOW_PWL_EDITCTRL_H_ 7 #ifndef FPDFSDK_PDFWINDOW_PWL_EDITCTRL_H_
8 #define FPDFSDK_PDFWINDOW_PWL_EDITCTRL_H_ 8 #define FPDFSDK_PDFWINDOW_PWL_EDITCTRL_H_
9 9
10 #include "core/fxcrt/fx_string.h" 10 #include "core/fxcrt/fx_string.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 CFX_WideString GetText(int32_t& nStartChar, int32_t& nEndChar) const; 43 CFX_WideString GetText(int32_t& nStartChar, int32_t& nEndChar) const;
44 void Clear(); 44 void Clear();
45 void SelectAll(); 45 void SelectAll();
46 46
47 int32_t GetCaret() const; 47 int32_t GetCaret() const;
48 void SetCaret(int32_t nPos); 48 void SetCaret(int32_t nPos);
49 int32_t GetTotalWords() const; 49 int32_t GetTotalWords() const;
50 50
51 void Paint(); 51 void Paint();
52 52
53 void EnableRefresh(FX_BOOL bRefresh); 53 void EnableRefresh(bool bRefresh);
54 CFX_FloatPoint GetScrollPos() const; 54 CFX_FloatPoint GetScrollPos() const;
55 void SetScrollPos(const CFX_FloatPoint& point); 55 void SetScrollPos(const CFX_FloatPoint& point);
56 56
57 void SetCharSet(uint8_t nCharSet) { m_nCharSet = nCharSet; } 57 void SetCharSet(uint8_t nCharSet) { m_nCharSet = nCharSet; }
58 int32_t GetCharSet() const; 58 int32_t GetCharSet() const;
59 59
60 void SetCodePage(int32_t nCodePage) { m_nCodePage = nCodePage; } 60 void SetCodePage(int32_t nCodePage) { m_nCodePage = nCodePage; }
61 int32_t GetCodePage() const { return m_nCodePage; } 61 int32_t GetCodePage() const { return m_nCodePage; }
62 62
63 CPDF_Font* GetCaretFont() const; 63 CPDF_Font* GetCaretFont() const;
64 FX_FLOAT GetCaretFontSize() const; 64 FX_FLOAT GetCaretFontSize() const;
65 65
66 FX_BOOL CanUndo() const; 66 bool CanUndo() const;
67 FX_BOOL CanRedo() const; 67 bool CanRedo() const;
68 void Redo(); 68 void Redo();
69 void Undo(); 69 void Undo();
70 70
71 void SetReadyToInput(); 71 void SetReadyToInput();
72 72
73 // CPWL_Wnd 73 // CPWL_Wnd
74 void OnCreate(PWL_CREATEPARAM& cp) override; 74 void OnCreate(PWL_CREATEPARAM& cp) override;
75 void OnCreated() override; 75 void OnCreated() override;
76 FX_BOOL OnKeyDown(uint16_t nChar, uint32_t nFlag) override; 76 bool OnKeyDown(uint16_t nChar, uint32_t nFlag) override;
77 FX_BOOL OnChar(uint16_t nChar, uint32_t nFlag) override; 77 bool OnChar(uint16_t nChar, uint32_t nFlag) override;
78 FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; 78 bool OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override;
79 FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; 79 bool OnLButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override;
80 FX_BOOL OnMouseMove(const CFX_FloatPoint& point, uint32_t nFlag) override; 80 bool OnMouseMove(const CFX_FloatPoint& point, uint32_t nFlag) override;
81 void OnNotify(CPWL_Wnd* pWnd, 81 void OnNotify(CPWL_Wnd* pWnd,
82 uint32_t msg, 82 uint32_t msg,
83 intptr_t wParam = 0, 83 intptr_t wParam = 0,
84 intptr_t lParam = 0) override; 84 intptr_t lParam = 0) override;
85 void CreateChildWnd(const PWL_CREATEPARAM& cp) override; 85 void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
86 void RePosChildWnd() override; 86 void RePosChildWnd() override;
87 void SetFontSize(FX_FLOAT fFontSize) override; 87 void SetFontSize(FX_FLOAT fFontSize) override;
88 FX_FLOAT GetFontSize() const override; 88 FX_FLOAT GetFontSize() const override;
89 void SetCursor() override; 89 void SetCursor() override;
90 90
91 void IOnSetScrollInfoY(FX_FLOAT fPlateMin, 91 void IOnSetScrollInfoY(FX_FLOAT fPlateMin,
92 FX_FLOAT fPlateMax, 92 FX_FLOAT fPlateMax,
93 FX_FLOAT fContentMin, 93 FX_FLOAT fContentMin,
94 FX_FLOAT fContentMax, 94 FX_FLOAT fContentMax,
95 FX_FLOAT fSmallStep, 95 FX_FLOAT fSmallStep,
96 FX_FLOAT fBigStep); 96 FX_FLOAT fBigStep);
97 void IOnSetScrollPosY(FX_FLOAT fy); 97 void IOnSetScrollPosY(FX_FLOAT fy);
98 void IOnSetCaret(FX_BOOL bVisible, 98 void IOnSetCaret(bool bVisible,
99 const CFX_FloatPoint& ptHead, 99 const CFX_FloatPoint& ptHead,
100 const CFX_FloatPoint& ptFoot, 100 const CFX_FloatPoint& ptFoot,
101 const CPVT_WordPlace& place); 101 const CPVT_WordPlace& place);
102 void IOnCaretChange(const CPVT_SecProps& secProps, 102 void IOnCaretChange(const CPVT_SecProps& secProps,
103 const CPVT_WordProps& wordProps); 103 const CPVT_WordProps& wordProps);
104 void IOnContentChange(const CFX_FloatRect& rcContent); 104 void IOnContentChange(const CFX_FloatRect& rcContent);
105 void IOnInvalidateRect(CFX_FloatRect* pRect); 105 void IOnInvalidateRect(CFX_FloatRect* pRect);
106 106
107 protected: 107 protected:
108 void InsertText(const CFX_WideString& wsText); 108 void InsertText(const CFX_WideString& wsText);
109 void SetText(const CFX_WideString& wsText); 109 void SetText(const CFX_WideString& wsText);
110 void CopyText(); 110 void CopyText();
111 void PasteText(); 111 void PasteText();
112 void CutText(); 112 void CutText();
113 void ShowVScrollBar(FX_BOOL bShow); 113 void ShowVScrollBar(bool bShow);
114 void InsertWord(uint16_t word, int32_t nCharset); 114 void InsertWord(uint16_t word, int32_t nCharset);
115 void InsertReturn(); 115 void InsertReturn();
116 116
117 FX_BOOL IsWndHorV(); 117 bool IsWndHorV();
118 118
119 void Delete(); 119 void Delete();
120 void Backspace(); 120 void Backspace();
121 121
122 void GetCaretInfo(CFX_FloatPoint& ptHead, CFX_FloatPoint& ptFoot) const; 122 void GetCaretInfo(CFX_FloatPoint& ptHead, CFX_FloatPoint& ptFoot) const;
123 void SetCaret(FX_BOOL bVisible, 123 void SetCaret(bool bVisible,
124 const CFX_FloatPoint& ptHead, 124 const CFX_FloatPoint& ptHead,
125 const CFX_FloatPoint& ptFoot); 125 const CFX_FloatPoint& ptFoot);
126 126
127 void SetEditCaret(FX_BOOL bVisible); 127 void SetEditCaret(bool bVisible);
128 128
129 std::unique_ptr<CFX_Edit> m_pEdit; 129 std::unique_ptr<CFX_Edit> m_pEdit;
130 CPWL_Caret* m_pEditCaret; 130 CPWL_Caret* m_pEditCaret;
131 FX_BOOL m_bMouseDown; 131 bool m_bMouseDown;
132 132
133 private: 133 private:
134 void CreateEditCaret(const PWL_CREATEPARAM& cp); 134 void CreateEditCaret(const PWL_CREATEPARAM& cp);
135 135
136 int32_t m_nCharSet; 136 int32_t m_nCharSet;
137 int32_t m_nCodePage; 137 int32_t m_nCodePage;
138 }; 138 };
139 139
140 #endif // FPDFSDK_PDFWINDOW_PWL_EDITCTRL_H_ 140 #endif // FPDFSDK_PDFWINDOW_PWL_EDITCTRL_H_
OLDNEW
« no previous file with comments | « fpdfsdk/pdfwindow/PWL_Edit.cpp ('k') | fpdfsdk/pdfwindow/PWL_EditCtrl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698