Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / src / fxfa / src / app / xfa_fwladapter.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _XFA_FWL_ADAPTER_IMP_H\r
8 #define _XFA_FWL_ADAPTER_IMP_H\r
9 class CXFA_FWLAdapterWidgetMgr : public CFWL_SDAdapterWidgetMgr\r
10 {\r
11 public:\r
12     virtual FWL_ERR RepaintWidget(IFWL_Widget *pWidget, const CFX_RectF *pRect);\r
13     virtual FX_BOOL      GetPopupPos(IFWL_Widget* pWidget, FX_FLOAT fMinHeight, FX_FLOAT fMaxHeight, const CFX_RectF &rtAnchor, CFX_RectF &rtPopup);\r
14 };\r
15 class IXFA_FWLEventHandler\r
16 {\r
17 public:\r
18     virtual FX_BOOL             GetPopupPos(IFWL_Widget *pWidget, FX_FLOAT fMinPopup, FX_FLOAT fMaxPopup,\r
19                                     const CFX_RectF &rtAnchor, CFX_RectF& rtPopup)\r
20     {\r
21         return FALSE;\r
22     }\r
23     virtual void                OnPreOpen(IFWL_Widget *pWidget) {}\r
24     virtual void                OnPostOpen(IFWL_Widget *pWidget) {}\r
25     virtual     void            OnSelectChanged(IFWL_Widget *pWidget, FX_INT32 iYear, FX_INT32 iMonth, FX_INT32 iDay) {}\r
26     virtual     void            OnTextChanged(IFWL_Widget *pWidget, const CFX_WideString &wsChanged) {}\r
27     virtual void                OnTextFull(IFWL_Widget *pWidget) {}\r
28     virtual FX_BOOL             OnValidate(IFWL_Widget *pWidget, CFX_WideString &wsText)\r
29     {\r
30         return FALSE;\r
31     }\r
32     virtual     void            OnSelectChanged(IFWL_Widget *pWidget, const CFX_Int32Array &arrSels) {}\r
33     virtual void                OnAddDoRecord(IFWL_Widget *pWidget) {}\r
34     virtual CXFA_Edge   GetComboSplitColor(IFWL_Widget *pWidget)\r
35     {\r
36         return CXFA_Edge(NULL);\r
37     }\r
38     virtual void                GetUIMargin(CFX_RectF &rtMargin) {}\r
39     virtual FX_BOOL             CheckWord(FX_BSTR sWord)\r
40     {\r
41         return TRUE;\r
42     }\r
43     virtual FX_BOOL             GetSuggestWords(FX_BSTR sWord, CFX_ByteStringArray &sSuggest)\r
44     {\r
45         return FALSE;\r
46     }\r
47 };\r
48 #endif\r