OLD | NEW |
| (Empty) |
1 // Copyright 2014 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef XFA_FWL_CORE_IFWL_ADAPTERWIDGETMGR_H_ | |
8 #define XFA_FWL_CORE_IFWL_ADAPTERWIDGETMGR_H_ | |
9 | |
10 #include "core/fxcrt/include/fx_coordinates.h" | |
11 #include "core/fxcrt/include/fx_system.h" | |
12 #include "xfa/fwl/core/fwl_error.h" | |
13 | |
14 class IFWL_Widget; | |
15 class IFWL_Menu; | |
16 class IFWL_MenuDP; | |
17 class CFX_Path; | |
18 class CFX_DIBitmap; | |
19 class IFWL_AdapterMessageHook; | |
20 | |
21 class IFWL_AdapterWidgetMgr { | |
22 public: | |
23 virtual ~IFWL_AdapterWidgetMgr() {} | |
24 virtual FWL_ERR CreateWidget(IFWL_Widget* pWidget, | |
25 IFWL_Widget* pParent = NULL) = 0; | |
26 virtual FWL_ERR DestroyWidget(IFWL_Widget* pWidget) = 0; | |
27 virtual FWL_ERR GetWidgetRect(IFWL_Widget* pWidget, CFX_RectF& rect) = 0; | |
28 virtual FWL_ERR SetWidgetRect(IFWL_Widget* pWidget, | |
29 const CFX_RectF& rect) = 0; | |
30 virtual FWL_ERR SetWidgetPosition(IFWL_Widget* pWidget, | |
31 FX_FLOAT fx, | |
32 FX_FLOAT fy) = 0; | |
33 virtual FWL_ERR SetParentWidget(IFWL_Widget* pWidget, | |
34 IFWL_Widget* pParent) = 0; | |
35 virtual FWL_ERR SetWidgetIcon(IFWL_Widget* pWidget, | |
36 const CFX_DIBitmap* pIcon, | |
37 FX_BOOL bBig) = 0; | |
38 virtual FWL_ERR SetWidgetCaption(IFWL_Widget* pWidget, | |
39 const CFX_WideStringC& wsCaption) = 0; | |
40 virtual FWL_ERR SetBorderRegion(IFWL_Widget* pWidget, CFX_Path* pPath) = 0; | |
41 virtual FWL_ERR SetTransparent(IFWL_Widget* pWidget, uint32_t dwAlpha) = 0; | |
42 virtual FWL_ERR ShowWidget(IFWL_Widget* pWidget) = 0; | |
43 virtual FWL_ERR HideWidget(IFWL_Widget* pWidget) = 0; | |
44 virtual FWL_ERR SetNormal(IFWL_Widget* pWidget) = 0; | |
45 virtual FWL_ERR SetMaximize(IFWL_Widget* pWidget) = 0; | |
46 virtual FWL_ERR SetMinimize(IFWL_Widget* pWidget) = 0; | |
47 virtual FX_BOOL CheckMessage() = 0; | |
48 virtual FX_BOOL IsIdleMessage() = 0; | |
49 virtual FWL_ERR DispatchMessage() = 0; | |
50 virtual FWL_ERR RepaintWidget(IFWL_Widget* pWidget, | |
51 const CFX_RectF* pRect) = 0; | |
52 virtual FWL_ERR Exit(int32_t iExitCode) = 0; | |
53 virtual FWL_ERR CreateWidgetWithNativeId(IFWL_Widget* pWidget, | |
54 void* UserData) = 0; | |
55 virtual FWL_ERR GetWidgetDC(IFWL_Widget* pWidget, void*& pDC) = 0; | |
56 virtual FWL_ERR ReleaseWidgetDC(IFWL_Widget* pWidget, | |
57 void* pDC, | |
58 CFX_RectF* pClip = 0) = 0; | |
59 virtual void* GetWindow(IFWL_Widget* pWidget) = 0; | |
60 virtual uint32_t GetKeyState(uint32_t dwVirtKey) = 0; | |
61 virtual FWL_ERR RunLoop(IFWL_Widget* widget) = 0; | |
62 virtual FWL_ERR EndLoop() = 0; | |
63 virtual FWL_ERR InitMenu(IFWL_Menu* pMenu, IFWL_MenuDP* pMenuData) = 0; | |
64 virtual FWL_ERR UpdateMenu(IFWL_Menu* pMenu, | |
65 const void* hItem, | |
66 int32_t iType) = 0; | |
67 virtual FWL_ERR SetMessageHook(IFWL_AdapterMessageHook* hook) = 0; | |
68 virtual FWL_ERR GetSystemBorder(FX_FLOAT& l, | |
69 FX_FLOAT& t, | |
70 FX_FLOAT& r, | |
71 FX_FLOAT& b) = 0; | |
72 virtual FX_BOOL GetPopupPos(IFWL_Widget* pWidget, | |
73 FX_FLOAT fMinHeight, | |
74 FX_FLOAT fMaxHeight, | |
75 const CFX_RectF& rtAnchor, | |
76 CFX_RectF& rtPopup) = 0; | |
77 }; | |
78 | |
79 #endif // XFA_FWL_CORE_IFWL_ADAPTERWIDGETMGR_H_ | |
OLD | NEW |