OLD | NEW |
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 _FWL_WIDGET_H | 7 #ifndef _FWL_WIDGET_H |
8 #define _FWL_WIDGET_H | 8 #define _FWL_WIDGET_H |
9 class IFWL_Target; | 9 class IFWL_Target; |
10 class IFWL_ThemeProvider; | 10 class IFWL_ThemeProvider; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 FX_DWORD m_dwStyles; | 85 FX_DWORD m_dwStyles; |
86 FX_DWORD m_dwStyleExes; | 86 FX_DWORD m_dwStyleExes; |
87 FX_DWORD m_dwStates; | 87 FX_DWORD m_dwStates; |
88 IFWL_ThemeProvider* m_pThemeProvider; | 88 IFWL_ThemeProvider* m_pThemeProvider; |
89 IFWL_DataProvider* m_pDataProvider; | 89 IFWL_DataProvider* m_pDataProvider; |
90 IFWL_Widget* m_pParent; | 90 IFWL_Widget* m_pParent; |
91 IFWL_Widget* m_pOwner; | 91 IFWL_Widget* m_pOwner; |
92 }; | 92 }; |
93 class IFWL_Custom : public IFWL_Widget { | 93 class IFWL_Custom : public IFWL_Widget { |
94 public: | 94 public: |
95 static IFWL_Custom* Create(); | 95 static IFWL_Custom* Create(const CFWL_WidgetImpProperties& properties, |
96 FWL_ERR Initialize(const CFWL_WidgetImpProperties& properties, | 96 IFWL_Widget* pOuter); |
97 IFWL_Widget* pOuter); | 97 |
98 FWL_ERR SetProxy(IFWL_Proxy* pProxy); | 98 FWL_ERR SetProxy(IFWL_Proxy* pProxy); |
99 | 99 |
100 protected: | 100 protected: |
101 IFWL_Custom(); | 101 IFWL_Custom(); |
102 }; | 102 }; |
103 class IFWL_Proxy { | 103 class IFWL_Proxy { |
104 public: | 104 public: |
105 virtual ~IFWL_Proxy() {} | 105 virtual ~IFWL_Proxy() {} |
106 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) = 0; | 106 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) = 0; |
107 virtual FWL_ERR Update() = 0; | 107 virtual FWL_ERR Update() = 0; |
108 }; | 108 }; |
109 #define FWL_ACCEL_Control (1L << 0) | 109 #define FWL_ACCEL_Control (1L << 0) |
110 #define FWL_ACCEL_Alt (1L << 1) | 110 #define FWL_ACCEL_Alt (1L << 1) |
111 #define FWL_ACCEL_Shift (1L << 2) | 111 #define FWL_ACCEL_Shift (1L << 2) |
112 #define FWL_ACCEL_VirtKey (1L << 3) | 112 #define FWL_ACCEL_VirtKey (1L << 3) |
113 typedef struct _FWL_ACCEL { | 113 typedef struct _FWL_ACCEL { |
114 FX_DWORD dwKey; | 114 FX_DWORD dwKey; |
115 FX_DWORD dwCmd; | 115 FX_DWORD dwCmd; |
116 } FWL_ACCEL; | 116 } FWL_ACCEL; |
117 typedef CFX_MapPtrTemplate<FX_DWORD, FX_DWORD> CFX_MapAccelerators; | 117 typedef CFX_MapPtrTemplate<FX_DWORD, FX_DWORD> CFX_MapAccelerators; |
118 FWL_ERR FWL_Accelerator_SetApp(CFX_MapAccelerators* pMapAccel); | 118 FWL_ERR FWL_Accelerator_SetApp(CFX_MapAccelerators* pMapAccel); |
119 FWL_ERR FWL_Accelerator_SetThread(CFX_MapAccelerators* pMapAccel); | 119 FWL_ERR FWL_Accelerator_SetThread(CFX_MapAccelerators* pMapAccel); |
120 FWL_ERR FWL_Accelerator_SetForm(IFWL_Form* pFrom, | 120 FWL_ERR FWL_Accelerator_SetForm(IFWL_Form* pFrom, |
121 CFX_MapAccelerators* pMapAccel); | 121 CFX_MapAccelerators* pMapAccel); |
122 FWL_ERR FWL_EnabelWidget(IFWL_Widget* widget, FX_BOOL bEnable); | 122 FWL_ERR FWL_EnabelWidget(IFWL_Widget* widget, FX_BOOL bEnable); |
123 #endif | 123 #endif |
OLD | NEW |