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

Side by Side Diff: fpdfsdk/include/pdfwindow/PWL_Wnd.h

Issue 1519693002: Merge to XFA: Remove CFX_AffineMatrix/CPDF_Matrix (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: XFA-specific changes Created 5 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 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ 7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_
8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_
9 9
10 #include "core/include/fpdfdoc/fpdf_doc.h" 10 #include "core/include/fpdfdoc/fpdf_doc.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 virtual FX_BOOL CheckWord(const FX_CHAR* sWord) = 0; 172 virtual FX_BOOL CheckWord(const FX_CHAR* sWord) = 0;
173 virtual void SuggestWords(const FX_CHAR* sWord, 173 virtual void SuggestWords(const FX_CHAR* sWord,
174 CFX_ByteStringArray& sSuggest) = 0; 174 CFX_ByteStringArray& sSuggest) = 0;
175 }; 175 };
176 176
177 class IPWL_Provider { 177 class IPWL_Provider {
178 public: 178 public:
179 virtual ~IPWL_Provider() {} 179 virtual ~IPWL_Provider() {}
180 180
181 // get a matrix which map user space to CWnd client space 181 // get a matrix which map user space to CWnd client space
182 virtual CPDF_Matrix GetWindowMatrix(void* pAttachedData) = 0; 182 virtual CFX_Matrix GetWindowMatrix(void* pAttachedData) = 0;
183 183
184 /* 184 /*
185 0 L"&Undo\tCtrl+Z" 185 0 L"&Undo\tCtrl+Z"
186 1 L"&Redo\tCtrl+Shift+Z" 186 1 L"&Redo\tCtrl+Shift+Z"
187 2 L"Cu&t\tCtrl+X" 187 2 L"Cu&t\tCtrl+X"
188 3 L"&Copy\tCtrl+C" 188 3 L"&Copy\tCtrl+C"
189 4 L"&Paste\tCtrl+V" 189 4 L"&Paste\tCtrl+V"
190 5 L"&Delete" 190 5 L"&Delete"
191 6 L"&Select All\tCtrl+A" 191 6 L"&Select All\tCtrl+A"
192 */ 192 */
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 CPWL_Color sBorderColor; // optional 240 CPWL_Color sBorderColor; // optional
241 CPWL_Color sTextColor; // optional 241 CPWL_Color sTextColor; // optional
242 CPWL_Color sTextStrokeColor; // optional 242 CPWL_Color sTextStrokeColor; // optional
243 int32_t nTransparency; // optional 243 int32_t nTransparency; // optional
244 FX_FLOAT fFontSize; // optional 244 FX_FLOAT fFontSize; // optional
245 CPWL_Dash sDash; // optional 245 CPWL_Dash sDash; // optional
246 void* pAttachedData; // optional 246 void* pAttachedData; // optional
247 CPWL_Wnd* pParentWnd; // ignore 247 CPWL_Wnd* pParentWnd; // ignore
248 CPWL_MsgControl* pMsgControl; // ignore 248 CPWL_MsgControl* pMsgControl; // ignore
249 int32_t eCursorType; // ignore 249 int32_t eCursorType; // ignore
250 CPDF_Matrix mtChild; // ignore 250 CFX_Matrix mtChild; // ignore
251 }; 251 };
252 252
253 class CPWL_Timer { 253 class CPWL_Timer {
254 public: 254 public:
255 CPWL_Timer(CPWL_TimerHandler* pAttached, IFX_SystemHandler* pSystemHandler); 255 CPWL_Timer(CPWL_TimerHandler* pAttached, IFX_SystemHandler* pSystemHandler);
256 virtual ~CPWL_Timer(); 256 virtual ~CPWL_Timer();
257 257
258 int32_t SetPWLTimer(int32_t nElapse); 258 int32_t SetPWLTimer(int32_t nElapse);
259 void KillPWLTimer(); 259 void KillPWLTimer();
260 static void TimerProc(int32_t idEvent); 260 static void TimerProc(int32_t idEvent);
(...skipping 25 matching lines...) Expand all
286 CPWL_Wnd(); 286 CPWL_Wnd();
287 ~CPWL_Wnd() override; 287 ~CPWL_Wnd() override;
288 288
289 void Create(const PWL_CREATEPARAM& cp); 289 void Create(const PWL_CREATEPARAM& cp);
290 virtual CFX_ByteString GetClassName() const; 290 virtual CFX_ByteString GetClassName() const;
291 void Destroy(); 291 void Destroy();
292 void Move(const CPDF_Rect& rcNew, FX_BOOL bReset, FX_BOOL bRefresh); 292 void Move(const CPDF_Rect& rcNew, FX_BOOL bReset, FX_BOOL bRefresh);
293 virtual void InvalidateRect(CPDF_Rect* pRect = NULL); 293 virtual void InvalidateRect(CPDF_Rect* pRect = NULL);
294 294
295 void GetAppearanceStream(CFX_ByteString& sAppStream); 295 void GetAppearanceStream(CFX_ByteString& sAppStream);
296 void DrawAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); 296 void DrawAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device);
297 297
298 virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); 298 virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
299 virtual FX_BOOL OnKeyUp(FX_WORD nChar, FX_DWORD nFlag); 299 virtual FX_BOOL OnKeyUp(FX_WORD nChar, FX_DWORD nFlag);
300 virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); 300 virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
301 virtual FX_BOOL OnLButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag); 301 virtual FX_BOOL OnLButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag);
302 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); 302 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
303 virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag); 303 virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
304 virtual FX_BOOL OnMButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag); 304 virtual FX_BOOL OnMButtonDblClk(const CPDF_Point& point, FX_DWORD nFlag);
305 virtual FX_BOOL OnMButtonDown(const CPDF_Point& point, FX_DWORD nFlag); 305 virtual FX_BOOL OnMButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
306 virtual FX_BOOL OnMButtonUp(const CPDF_Point& point, FX_DWORD nFlag); 306 virtual FX_BOOL OnMButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 FX_BOOL IsReadOnly() const; 371 FX_BOOL IsReadOnly() const;
372 CPWL_ScrollBar* GetVScrollBar() const; 372 CPWL_ScrollBar* GetVScrollBar() const;
373 373
374 IFX_Edit_FontMap* GetFontMap() const; 374 IFX_Edit_FontMap* GetFontMap() const;
375 IPWL_Provider* GetProvider() const; 375 IPWL_Provider* GetProvider() const;
376 IPWL_FocusHandler* GetFocusHandler() const; 376 IPWL_FocusHandler* GetFocusHandler() const;
377 377
378 int32_t GetTransparency(); 378 int32_t GetTransparency();
379 void SetTransparency(int32_t nTransparency); 379 void SetTransparency(int32_t nTransparency);
380 380
381 CPDF_Matrix GetChildToRoot() const; 381 CFX_Matrix GetChildToRoot() const;
382 CPDF_Matrix GetChildMatrix() const; 382 CFX_Matrix GetChildMatrix() const;
383 void SetChildMatrix(const CPDF_Matrix& mt); 383 void SetChildMatrix(const CFX_Matrix& mt);
384 CPDF_Matrix GetWindowMatrix() const; 384 CFX_Matrix GetWindowMatrix() const;
385 385
386 virtual CPDF_Point ChildToParent(const CPDF_Point& point) const; 386 virtual CPDF_Point ChildToParent(const CPDF_Point& point) const;
387 virtual CPDF_Rect ChildToParent(const CPDF_Rect& rect) const; 387 virtual CPDF_Rect ChildToParent(const CPDF_Rect& rect) const;
388 virtual CPDF_Point ParentToChild(const CPDF_Point& point) const; 388 virtual CPDF_Point ParentToChild(const CPDF_Point& point) const;
389 virtual CPDF_Rect ParentToChild(const CPDF_Rect& rect) const; 389 virtual CPDF_Rect ParentToChild(const CPDF_Rect& rect) const;
390 390
391 // those methods only implemented by listctrl item 391 // those methods only implemented by listctrl item
392 virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) { return 0; } 392 virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) { return 0; }
393 virtual FX_FLOAT GetItemLeftMargin() { return 0; } 393 virtual FX_FLOAT GetItemLeftMargin() { return 0; }
394 virtual FX_FLOAT GetItemRightMargin() { return 0; } 394 virtual FX_FLOAT GetItemRightMargin() { return 0; }
395 395
396 void EnableWindow(FX_BOOL bEnable); 396 void EnableWindow(FX_BOOL bEnable);
397 FX_BOOL IsEnabled(); 397 FX_BOOL IsEnabled();
398 virtual void SetCursor(); 398 virtual void SetCursor();
399 399
400 protected: 400 protected:
401 // CPWL_TimerHandler 401 // CPWL_TimerHandler
402 IFX_SystemHandler* GetSystemHandler() const override; 402 IFX_SystemHandler* GetSystemHandler() const override;
403 403
404 virtual void CreateChildWnd(const PWL_CREATEPARAM& cp); 404 virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
405 virtual void RePosChildWnd(); 405 virtual void RePosChildWnd();
406 void GetAppearanceStream(CFX_ByteTextBuf& sAppStream); 406 void GetAppearanceStream(CFX_ByteTextBuf& sAppStream);
407 virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream); 407 virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream);
408 virtual void GetChildAppearanceStream(CFX_ByteTextBuf& sAppStream); 408 virtual void GetChildAppearanceStream(CFX_ByteTextBuf& sAppStream);
409 409
410 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, 410 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
411 CPDF_Matrix* pUser2Device); 411 CFX_Matrix* pUser2Device);
412 virtual void DrawChildAppearance(CFX_RenderDevice* pDevice, 412 virtual void DrawChildAppearance(CFX_RenderDevice* pDevice,
413 CPDF_Matrix* pUser2Device); 413 CFX_Matrix* pUser2Device);
414 414
415 virtual void OnCreate(PWL_CREATEPARAM& cp); 415 virtual void OnCreate(PWL_CREATEPARAM& cp);
416 virtual void OnCreated(); 416 virtual void OnCreated();
417 virtual void OnDestroy(); 417 virtual void OnDestroy();
418 418
419 virtual void OnSetFocus(); 419 virtual void OnSetFocus();
420 virtual void OnKillFocus(); 420 virtual void OnKillFocus();
421 421
422 virtual void OnEnabled(); 422 virtual void OnEnabled();
423 virtual void OnDisabled(); 423 virtual void OnDisabled();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 CPDF_Rect m_rcWindow; 467 CPDF_Rect m_rcWindow;
468 CPDF_Rect m_rcClip; 468 CPDF_Rect m_rcClip;
469 469
470 FX_BOOL m_bCreated; 470 FX_BOOL m_bCreated;
471 FX_BOOL m_bVisible; 471 FX_BOOL m_bVisible;
472 FX_BOOL m_bNotifying; 472 FX_BOOL m_bNotifying;
473 FX_BOOL m_bEnabled; 473 FX_BOOL m_bEnabled;
474 }; 474 };
475 475
476 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_ 476 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_WND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698