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

Side by Side Diff: xfa/include/fwl/basewidget/fwl_combobox.h

Issue 1827923002: Move xfa/include/fwl/{core,basewidget} to xfa/fwl/{core,basewidget}. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 9 months 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
(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_INCLUDE_FWL_BASEWIDGET_FWL_COMBOBOX_H_
8 #define XFA_INCLUDE_FWL_BASEWIDGET_FWL_COMBOBOX_H_
9
10 #include "xfa/include/fwl/basewidget/fwl_listbox.h"
11
12 class CFWL_WidgetImpProperties;
13 class IFWL_ComboBox;
14
15 #define FWL_CLASS_ComboBox L"FWL_COMBOBOX"
16 #define FWL_CLASSHASH_ComboBox 602353697
17 #define FWL_STYLEEXT_CMB_DropList (0L << 0)
18 #define FWL_STYLEEXT_CMB_DropDown (1L << 0)
19 #define FWL_STYLEEXT_CMB_Sort (1L << 1)
20 #define FWL_STYLEEXT_CMB_ListDrag (1L << 2)
21 #define FWL_STYLEEXT_CMB_OwnerDraw (1L << 3)
22 #define FWL_STYLEEXT_CMB_EditHNear (0L << 4)
23 #define FWL_STYLEEXT_CMB_EditHCenter (1L << 4)
24 #define FWL_STYLEEXT_CMB_EditHFar (2L << 4)
25 #define FWL_STYLEEXT_CMB_EditVNear (0L << 6)
26 #define FWL_STYLEEXT_CMB_EditVCenter (1L << 6)
27 #define FWL_STYLEEXT_CMB_EditVFar (2L << 6)
28 #define FWL_STYLEEXT_CMB_EditJustified (1L << 8)
29 #define FWL_STYLEEXT_CMB_EditDistributed (2L << 8)
30 #define FWL_STYLEEXT_CMB_EditHAlignMask (3L << 4)
31 #define FWL_STYLEEXT_CMB_EditVAlignMask (3L << 6)
32 #define FWL_STYLEEXT_CMB_EditHAlignModeMask (3L << 8)
33 #define FWL_STYLEEXT_CMB_ListItemLeftAlign (0L << 10)
34 #define FWL_STYLEEXT_CMB_ListItemCenterAlign (1L << 10)
35 #define FWL_STYLEEXT_CMB_ListItemRightAlign (2L << 10)
36 #define FWL_STYLEEXT_CMB_ListItemText (0L << 12)
37 #define FWL_STYLEEXT_CMB_ListItemIconText (1L << 12)
38 #define FWL_STYLEEXT_CMB_ListItemAlignMask (3L << 12)
39 #define FWL_STYLEEXT_CMB_ReadOnly (1L << 13)
40 #define FWL_PART_CMB_Border 1
41 #define FWL_PART_CMB_Edge 2
42 #define FWL_PART_CMB_Background 3
43 #define FWL_PART_CMB_DropDownButton 4
44 #define FWL_PART_CMB_Caption 5
45 #define FWL_PART_CMB_StretcgHandler 6
46 #define FWL_PARTSTATE_CMB_Normal (0L << 0)
47 #define FWL_PARTSTATE_CMB_Hovered (1L << 0)
48 #define FWL_PARTSTATE_CMB_Pressed (2L << 0)
49 #define FWL_PARTSTATE_CMB_Disabled (3L << 0)
50 #define FWL_PARTSTATE_CMB_Selected (1L << 2)
51 #define FWL_WGTCAPACITY_CMB_ComboFormHandler (FWL_WGTCAPACITY_MAX + 7)
52 enum FWL_CMB_TEXTCHANGED {
53 FWL_CMB_TEXTCHANGED_Insert = 0,
54 FWL_CMB_TEXTCHANGED_Delete,
55 FWL_CMB_TEXTCHANGED_Replace,
56 };
57 #define FWL_EVT_CMB_DropDown L"FWL_EVENT_CMB_PreDropDown"
58 #define FWL_EVT_CMB_PostDropDown L"FWL_EVENT_CMB_PostDropDown"
59 #define FWL_EVT_CMB_CloseUp L"FWL_EVENT_CMB_CloseUp"
60 #define FWL_EVT_CMB_EditChanged L"FWL_EVENT_CMB_EditChanged"
61 #define FWL_EVT_CMB_SelChanged L"FWL_EVENT_CMB_SelChanged"
62 #define FWL_EVT_CMB_HoverChanged L"FWL_EVENT_CMB_HoverChanged"
63 #define FWL_EVT_CMB_DrawItem L"FWL_EVENT_CMB_DrawItem"
64 #define FWL_EVTHASH_CMB_PreDropDown 1357646798
65 #define FWL_EVTHASH_CMB_PostDropDown 3677010285
66 #define FWL_EVTHASH_CMB_CloseUp 2871271190
67 #define FWL_EVTHASH_CMB_EditChanged 1527034762
68 #define FWL_EVTHASH_CMB_SelChanged 2923227784
69 #define FWL_EVTHASH_CMB_HoverChanged 944325448
70 #define FWL_EVTHASH_CMB_DrawItem 917354551
71 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPreDropDown, FWL_EVTHASH_CMB_PreDropDown)
72 END_FWL_EVENT_DEF
73 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbPostDropDown, FWL_EVTHASH_CMB_PostDropDown)
74 END_FWL_EVENT_DEF
75 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbCloseUp, FWL_EVTHASH_CMB_CloseUp)
76 END_FWL_EVENT_DEF
77 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbEditChanged, FWL_EVTHASH_CMB_EditChanged)
78 int32_t nChangeType;
79 CFX_WideString wsInsert;
80 CFX_WideString wsDelete;
81 END_FWL_EVENT_DEF
82 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbSelChanged, FWL_EVTHASH_CMB_SelChanged)
83 CFX_Int32Array iArraySels;
84 FX_BOOL bLButtonUp;
85 END_FWL_EVENT_DEF
86 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbHoverChanged, FWL_EVTHASH_CMB_HoverChanged)
87 int32_t m_iCurHover;
88 END_FWL_EVENT_DEF
89 BEGIN_FWL_EVENT_DEF(CFWL_EvtCmbDrawItem, FWL_EVTHASH_CMB_DrawItem)
90 CFX_Graphics* m_pGraphics;
91 CFX_Matrix m_matrix;
92 int32_t m_index;
93 CFX_RectF m_rtItem;
94 END_FWL_EVENT_DEF
95 class IFWL_ComboBoxDP : public IFWL_ListBoxDP {
96 public:
97 virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget) = 0;
98 };
99 class IFWL_ComboBox : public IFWL_Widget {
100 public:
101 static IFWL_ComboBox* Create(const CFWL_WidgetImpProperties& properties);
102
103 int32_t GetCurSel();
104 FWL_ERR SetCurSel(int32_t iSel);
105 FWL_ERR SetEditText(const CFX_WideString& wsText);
106 int32_t GetEditTextLength() const;
107 FWL_ERR GetEditText(CFX_WideString& wsText,
108 int32_t nStart = 0,
109 int32_t nCount = -1) const;
110 FWL_ERR SetEditSelRange(int32_t nStart, int32_t nCount = -1);
111 int32_t GetEditSelRange(int32_t nIndex, int32_t& nStart);
112 int32_t GetEditLimit();
113 FWL_ERR SetEditLimit(int32_t nLimit);
114 FWL_ERR EditDoClipboard(int32_t iCmd);
115 FX_BOOL EditRedo(const CFX_ByteStringC& bsRecord);
116 FX_BOOL EditUndo(const CFX_ByteStringC& bsRecord);
117 IFWL_ListBox* GetListBoxt();
118 FX_BOOL AfterFocusShowDropList();
119 FX_ERR OpenDropDownList(FX_BOOL bActivate);
120 FX_BOOL EditCanUndo();
121 FX_BOOL EditCanRedo();
122 FX_BOOL EditUndo();
123 FX_BOOL EditRedo();
124 FX_BOOL EditCanCopy();
125 FX_BOOL EditCanCut();
126 FX_BOOL EditCanSelectAll();
127 FX_BOOL EditCopy(CFX_WideString& wsCopy);
128 FX_BOOL EditCut(CFX_WideString& wsCut);
129 FX_BOOL EditPaste(const CFX_WideString& wsPaste);
130 FX_BOOL EditSelectAll();
131 FX_BOOL EditDelete();
132 FX_BOOL EditDeSelect();
133 FWL_ERR GetBBox(CFX_RectF& rect);
134 FWL_ERR EditModifyStylesEx(FX_DWORD dwStylesExAdded,
135 FX_DWORD dwStylesExRemoved);
136
137 protected:
138 IFWL_ComboBox();
139 };
140
141 #endif // XFA_INCLUDE_FWL_BASEWIDGET_FWL_COMBOBOX_H_
OLDNEW
« no previous file with comments | « xfa/include/fwl/basewidget/fwl_checkbox.h ('k') | xfa/include/fwl/basewidget/fwl_datetimepicker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698