Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / include / fwl / lightwidget / datetimepicker.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 _FWL_DATETIMEPICKER_LIGHT_H\r
8 #define _FWL_DATETIMEPICKER_LIGHT_H\r
9 class CFWL_Widget;\r
10 class CFWL_WidgetProperties;\r
11 class IFWL_DateTimePickerDP;\r
12 class CFWL_DateTimePicker;\r
13 class CFWL_DateTimePickerDP;\r
14 class CFWL_DateTimePicker : public CFWL_Widget\r
15 {\r
16 public:\r
17     static CFWL_DateTimePicker* Create();\r
18     FWL_ERR     Initialize(const CFWL_WidgetProperties *pProperties = NULL);\r
19     FWL_ERR SetToday(FX_INT32 iYear, FX_INT32 iMonth, FX_INT32 iDay);\r
20     FWL_ERR     GetEditText(CFX_WideString &wsText);\r
21     FWL_ERR     SetEditText(FX_WSTR wsText);\r
22     FX_INT32 CountSelRanges();\r
23     FX_INT32 GetSelRange(FX_INT32 nIndex, FX_INT32 &nStart);\r
24     FWL_ERR GetCurSel(FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay);\r
25     FWL_ERR     SetCurSel(FX_INT32 iYear, FX_INT32 iMonth, FX_INT32 iDay);\r
26     FX_BOOL             CanUndo();\r
27     FX_BOOL             CanRedo();\r
28     FX_BOOL             Undo();\r
29     FX_BOOL             Redo();\r
30     FX_BOOL             CanCopy();\r
31     FX_BOOL             CanCut();\r
32     FX_BOOL             CanSelectAll();\r
33     FX_BOOL             Copy(CFX_WideString &wsCopy);\r
34     FX_BOOL             Cut(CFX_WideString &wsCut);\r
35     FX_BOOL             Paste(const CFX_WideString &wsPaste);\r
36     FX_BOOL             SelectAll();\r
37     FX_BOOL             Delete();\r
38     FX_BOOL             DeSelect();\r
39     FWL_ERR             GetBBox(CFX_RectF &rect);\r
40     FWL_ERR             SetEditLimit(FX_INT32 nLimit);\r
41     FWL_ERR             ModifyEditStylesEx(FX_DWORD dwStylesExAdded, FX_DWORD dwStylesExRemoved);\r
42 protected:\r
43     CFWL_DateTimePicker();\r
44     virtual ~CFWL_DateTimePicker();\r
45     class CFWL_DateTimePickerDP : public IFWL_DateTimePickerDP\r
46     {\r
47     public:\r
48         CFWL_DateTimePickerDP();\r
49         virtual FWL_ERR GetCaption(IFWL_Widget *pWidget, CFX_WideString &wsCaption);\r
50         virtual FWL_ERR GetToday(IFWL_Widget *pWidget, FX_INT32 &iYear, FX_INT32 &iMonth, FX_INT32 &iDay);\r
51         FX_INT32 m_iYear;\r
52         FX_INT32 m_iMonth;\r
53         FX_INT32 m_iDay;\r
54         CFX_WideString  m_wsData;\r
55     };\r
56     CFWL_DateTimePickerDP m_DateTimePickerDP;\r
57 };\r
58 #endif\r