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

Side by Side Diff: xfa/fwl/basewidget/fwl_comboboximp.h

Issue 2095653002: Remove NULL in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 6 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/basewidget/fwl_checkboximp.cpp ('k') | xfa/fwl/basewidget/fwl_comboboximp.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_BASEWIDGET_FWL_COMBOBOXIMP_H_ 7 #ifndef XFA_FWL_BASEWIDGET_FWL_COMBOBOXIMP_H_
8 #define XFA_FWL_BASEWIDGET_FWL_COMBOBOXIMP_H_ 8 #define XFA_FWL_BASEWIDGET_FWL_COMBOBOXIMP_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 FWL_Error DisForm_Initialize(); 163 FWL_Error DisForm_Initialize();
164 void DisForm_InitComboList(); 164 void DisForm_InitComboList();
165 void DisForm_InitComboEdit(); 165 void DisForm_InitComboEdit();
166 void DisForm_ShowDropList(FX_BOOL bActivate); 166 void DisForm_ShowDropList(FX_BOOL bActivate);
167 FX_BOOL DisForm_IsDropListShowed(); 167 FX_BOOL DisForm_IsDropListShowed();
168 FWL_Error DisForm_ModifyStylesEx(uint32_t dwStylesExAdded, 168 FWL_Error DisForm_ModifyStylesEx(uint32_t dwStylesExAdded,
169 uint32_t dwStylesExRemoved); 169 uint32_t dwStylesExRemoved);
170 FWL_Error DisForm_Update(); 170 FWL_Error DisForm_Update();
171 FWL_WidgetHit DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy); 171 FWL_WidgetHit DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy);
172 FWL_Error DisForm_DrawWidget(CFX_Graphics* pGraphics, 172 FWL_Error DisForm_DrawWidget(CFX_Graphics* pGraphics,
173 const CFX_Matrix* pMatrix = NULL); 173 const CFX_Matrix* pMatrix = nullptr);
174 FWL_Error DisForm_GetBBox(CFX_RectF& rect); 174 FWL_Error DisForm_GetBBox(CFX_RectF& rect);
175 void DisForm_Layout(); 175 void DisForm_Layout();
176 176
177 CFX_RectF m_rtClient; 177 CFX_RectF m_rtClient;
178 CFX_RectF m_rtContent; 178 CFX_RectF m_rtContent;
179 CFX_RectF m_rtBtn; 179 CFX_RectF m_rtBtn;
180 CFX_RectF m_rtList; 180 CFX_RectF m_rtList;
181 CFX_RectF m_rtProxy; 181 CFX_RectF m_rtProxy;
182 CFX_RectF m_rtHandler; 182 CFX_RectF m_rtHandler;
183 std::unique_ptr<IFWL_Edit> m_pEdit; 183 std::unique_ptr<IFWL_Edit> m_pEdit;
184 std::unique_ptr<IFWL_ListBox> m_pListBox; 184 std::unique_ptr<IFWL_ListBox> m_pListBox;
185 IFWL_Form* m_pForm; 185 IFWL_Form* m_pForm;
186 FX_BOOL m_bLButtonDown; 186 FX_BOOL m_bLButtonDown;
187 FX_BOOL m_bUpFormHandler; 187 FX_BOOL m_bUpFormHandler;
188 int32_t m_iCurSel; 188 int32_t m_iCurSel;
189 int32_t m_iBtnState; 189 int32_t m_iBtnState;
190 FX_FLOAT m_fComboFormHandler; 190 FX_FLOAT m_fComboFormHandler;
191 FX_FLOAT m_fItemHeight; 191 FX_FLOAT m_fItemHeight;
192 FX_BOOL m_bNeedShowList; 192 FX_BOOL m_bNeedShowList;
193 CFWL_FormProxyImp* m_pProxy; 193 CFWL_FormProxyImp* m_pProxy;
194 CFWL_ComboProxyImpDelegate* m_pListProxyDelegate; 194 CFWL_ComboProxyImpDelegate* m_pListProxyDelegate;
195 }; 195 };
196 class CFWL_ComboBoxImpDelegate : public CFWL_WidgetImpDelegate { 196 class CFWL_ComboBoxImpDelegate : public CFWL_WidgetImpDelegate {
197 public: 197 public:
198 CFWL_ComboBoxImpDelegate(CFWL_ComboBoxImp* pOwner); 198 CFWL_ComboBoxImpDelegate(CFWL_ComboBoxImp* pOwner);
199 void OnProcessMessage(CFWL_Message* pMessage) override; 199 void OnProcessMessage(CFWL_Message* pMessage) override;
200 void OnProcessEvent(CFWL_Event* pEvent) override; 200 void OnProcessEvent(CFWL_Event* pEvent) override;
201 void OnDrawWidget(CFX_Graphics* pGraphics, 201 void OnDrawWidget(CFX_Graphics* pGraphics,
202 const CFX_Matrix* pMatrix = NULL) override; 202 const CFX_Matrix* pMatrix = nullptr) override;
203 203
204 protected: 204 protected:
205 void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); 205 void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE);
206 void OnLButtonDown(CFWL_MsgMouse* pMsg); 206 void OnLButtonDown(CFWL_MsgMouse* pMsg);
207 void OnLButtonUp(CFWL_MsgMouse* pMsg); 207 void OnLButtonUp(CFWL_MsgMouse* pMsg);
208 void OnMouseMove(CFWL_MsgMouse* pMsg); 208 void OnMouseMove(CFWL_MsgMouse* pMsg);
209 void OnMouseLeave(CFWL_MsgMouse* pMsg); 209 void OnMouseLeave(CFWL_MsgMouse* pMsg);
210 void OnKey(CFWL_MsgKey* pMsg); 210 void OnKey(CFWL_MsgKey* pMsg);
211 void DoSubCtrlKey(CFWL_MsgKey* pMsg); 211 void DoSubCtrlKey(CFWL_MsgKey* pMsg);
212 212
213 protected: 213 protected:
214 void DisForm_OnProcessMessage(CFWL_Message* pMessage); 214 void DisForm_OnProcessMessage(CFWL_Message* pMessage);
215 void DisForm_OnLButtonDown(CFWL_MsgMouse* pMsg); 215 void DisForm_OnLButtonDown(CFWL_MsgMouse* pMsg);
216 void DisForm_OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); 216 void DisForm_OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE);
217 void DisForm_OnKey(CFWL_MsgKey* pMsg); 217 void DisForm_OnKey(CFWL_MsgKey* pMsg);
218 218
219 protected: 219 protected:
220 CFWL_ComboBoxImp* m_pOwner; 220 CFWL_ComboBoxImp* m_pOwner;
221 friend class CFWL_ComboEditImpDelegate; 221 friend class CFWL_ComboEditImpDelegate;
222 friend class CFWL_ComboListImpDelegate; 222 friend class CFWL_ComboListImpDelegate;
223 }; 223 };
224 class CFWL_ComboProxyImpDelegate : public CFWL_WidgetImpDelegate { 224 class CFWL_ComboProxyImpDelegate : public CFWL_WidgetImpDelegate {
225 public: 225 public:
226 CFWL_ComboProxyImpDelegate(IFWL_Form* pForm, CFWL_ComboBoxImp* pComboBox); 226 CFWL_ComboProxyImpDelegate(IFWL_Form* pForm, CFWL_ComboBoxImp* pComboBox);
227 void OnProcessMessage(CFWL_Message* pMessage) override; 227 void OnProcessMessage(CFWL_Message* pMessage) override;
228 void OnDrawWidget(CFX_Graphics* pGraphics, 228 void OnDrawWidget(CFX_Graphics* pGraphics,
229 const CFX_Matrix* pMatrix = NULL) override; 229 const CFX_Matrix* pMatrix = nullptr) override;
230 void Reset() { m_bLButtonUpSelf = FALSE; } 230 void Reset() { m_bLButtonUpSelf = FALSE; }
231 231
232 protected: 232 protected:
233 void OnLButtonDown(CFWL_MsgMouse* pMsg); 233 void OnLButtonDown(CFWL_MsgMouse* pMsg);
234 void OnLButtonUp(CFWL_MsgMouse* pMsg); 234 void OnLButtonUp(CFWL_MsgMouse* pMsg);
235 void OnMouseMove(CFWL_MsgMouse* pMsg); 235 void OnMouseMove(CFWL_MsgMouse* pMsg);
236 void OnDeactive(CFWL_MsgDeactivate* pMsg); 236 void OnDeactive(CFWL_MsgDeactivate* pMsg);
237 void OnFocusChanged(CFWL_MsgKillFocus* pMsg, FX_BOOL bSet); 237 void OnFocusChanged(CFWL_MsgKillFocus* pMsg, FX_BOOL bSet);
238 FX_BOOL m_bLButtonDown; 238 FX_BOOL m_bLButtonDown;
239 FX_BOOL m_bLButtonUpSelf; 239 FX_BOOL m_bLButtonUpSelf;
240 FX_FLOAT m_fStartPos; 240 FX_FLOAT m_fStartPos;
241 IFWL_Form* m_pForm; 241 IFWL_Form* m_pForm;
242 CFWL_ComboBoxImp* m_pComboBox; 242 CFWL_ComboBoxImp* m_pComboBox;
243 }; 243 };
244 244
245 #endif // XFA_FWL_BASEWIDGET_FWL_COMBOBOXIMP_H_ 245 #endif // XFA_FWL_BASEWIDGET_FWL_COMBOBOXIMP_H_
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_checkboximp.cpp ('k') | xfa/fwl/basewidget/fwl_comboboximp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698