summaryrefslogtreecommitdiff
path: root/xfa/fwl/lightwidget/cfwl_combobox.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-04 17:57:03 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-04 17:57:03 -0700
commitc777f486f84611d2fdd2d03af661b14955f9efb6 (patch)
tree679012454d82e885f749d17f75fd12735efec29a /xfa/fwl/lightwidget/cfwl_combobox.h
parent41aad19ba366540bd4efa20a9009ac1c70a81403 (diff)
downloadpdfium-c777f486f84611d2fdd2d03af661b14955f9efb6.tar.xz
Convert FWL_ERR into an enum class.
This Cl updates FWL_ERR to be an FWL_Error enum class. It removes FX_ERR and replaces it with FWL_Error as well as the values were the same. There were many places where we either returned other values for FWL_ERR results. This Cl is the same as: https://codereview.chromium.org/1943413002/ but I seem to have messed up the base URL in that one. TBR=tsepez@chromium.org Review-Url: https://codereview.chromium.org/1952693003
Diffstat (limited to 'xfa/fwl/lightwidget/cfwl_combobox.h')
-rw-r--r--xfa/fwl/lightwidget/cfwl_combobox.h86
1 files changed, 43 insertions, 43 deletions
diff --git a/xfa/fwl/lightwidget/cfwl_combobox.h b/xfa/fwl/lightwidget/cfwl_combobox.h
index c92a063cdf..5a639e33d9 100644
--- a/xfa/fwl/lightwidget/cfwl_combobox.h
+++ b/xfa/fwl/lightwidget/cfwl_combobox.h
@@ -21,33 +21,33 @@ class CFWL_ComboBoxItem;
class CFWL_ComboBox : public CFWL_Widget {
public:
static CFWL_ComboBox* Create();
- FWL_ERR Initialize(const CFWL_WidgetProperties* pProperties = NULL);
+ FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = NULL);
int32_t AddString(const CFX_WideStringC& wsText);
int32_t AddString(const CFX_WideStringC& wsText, CFX_DIBitmap* pIcon);
bool RemoveAt(int32_t iIndex); // Returns false iff |iIndex| out of range.
void RemoveAll();
int32_t CountItems();
- FWL_ERR GetTextByIndex(int32_t iIndex, CFX_WideString& wsText);
+ FWL_Error GetTextByIndex(int32_t iIndex, CFX_WideString& wsText);
int32_t GetCurSel();
- FWL_ERR SetCurSel(int32_t iSel);
- FWL_ERR SetEditText(const CFX_WideString& wsText);
+ FWL_Error SetCurSel(int32_t iSel);
+ FWL_Error SetEditText(const CFX_WideString& wsText);
int32_t GetEditTextLength() const;
- FWL_ERR GetEditText(CFX_WideString& wsText,
- int32_t nStart = 0,
- int32_t nCount = -1) const;
- FWL_ERR SetEditSelRange(int32_t nStart, int32_t nCount = -1);
+ FWL_Error GetEditText(CFX_WideString& wsText,
+ int32_t nStart = 0,
+ int32_t nCount = -1) const;
+ FWL_Error SetEditSelRange(int32_t nStart, int32_t nCount = -1);
int32_t GetEditSelRange(int32_t nIndex, int32_t& nStart);
int32_t GetEditLimit();
- FWL_ERR SetEditLimit(int32_t nLimit);
- FWL_ERR EditDoClipboard(int32_t iCmd);
+ FWL_Error SetEditLimit(int32_t nLimit);
+ FWL_Error EditDoClipboard(int32_t iCmd);
FX_BOOL EditRedo(const CFX_ByteStringC& bsRecord);
FX_BOOL EditUndo(const CFX_ByteStringC& bsRecord);
- FWL_ERR SetMaxListHeight(FX_FLOAT fMaxHeight);
- FWL_ERR SetItemData(int32_t iIndex, void* pData);
+ FWL_Error SetMaxListHeight(FX_FLOAT fMaxHeight);
+ FWL_Error SetItemData(int32_t iIndex, void* pData);
void* GetItemData(int32_t iIndex);
- FWL_ERR SetListTheme(IFWL_ThemeProvider* pTheme);
+ FWL_Error SetListTheme(IFWL_ThemeProvider* pTheme);
FX_BOOL AfterFocusShowDropList();
- FWL_ERR OpenDropDownList(FX_BOOL bActivate);
+ FWL_Error OpenDropDownList(FX_BOOL bActivate);
FX_BOOL EditCanUndo();
FX_BOOL EditCanRedo();
@@ -62,9 +62,9 @@ class CFWL_ComboBox : public CFWL_Widget {
FX_BOOL EditSelectAll();
FX_BOOL EditDelete();
FX_BOOL EditDeSelect();
- FWL_ERR GetBBox(CFX_RectF& rect);
- FWL_ERR EditModifyStylesEx(uint32_t dwStylesExAdded,
- uint32_t dwStylesExRemoved);
+ FWL_Error GetBBox(CFX_RectF& rect);
+ FWL_Error EditModifyStylesEx(uint32_t dwStylesExAdded,
+ uint32_t dwStylesExRemoved);
CFWL_ComboBox();
virtual ~CFWL_ComboBox();
@@ -73,9 +73,9 @@ class CFWL_ComboBox : public CFWL_Widget {
public:
CFWL_ComboBoxDP();
~CFWL_ComboBoxDP();
- virtual FWL_ERR GetCaption(IFWL_Widget* pWidget,
- CFX_WideString& wsCaption) {
- return FWL_ERR_Succeeded;
+ virtual FWL_Error GetCaption(IFWL_Widget* pWidget,
+ CFX_WideString& wsCaption) {
+ return FWL_Error::Succeeded;
}
virtual int32_t CountItems(IFWL_Widget* pWidget);
@@ -86,36 +86,36 @@ class CFWL_ComboBox : public CFWL_Widget {
int32_t nIndex);
virtual uint32_t GetItemStyles(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
- virtual FWL_ERR GetItemText(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- CFX_WideString& wsText);
- virtual FWL_ERR GetItemRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- CFX_RectF& rtItem);
+ virtual FWL_Error GetItemText(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ CFX_WideString& wsText);
+ virtual FWL_Error GetItemRect(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ CFX_RectF& rtItem);
virtual void* GetItemData(IFWL_Widget* pWidget, FWL_HLISTITEM hItem);
- virtual FWL_ERR SetItemStyles(IFWL_Widget* pWidget,
+ virtual FWL_Error SetItemStyles(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ uint32_t dwStyle);
+ virtual FWL_Error SetItemText(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ const FX_WCHAR* pszText);
+ virtual FWL_Error SetItemRect(IFWL_Widget* pWidget,
FWL_HLISTITEM hItem,
- uint32_t dwStyle);
- virtual FWL_ERR SetItemText(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- const FX_WCHAR* pszText);
- virtual FWL_ERR SetItemRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- const CFX_RectF& rtItem);
+ const CFX_RectF& rtItem);
virtual FX_FLOAT GetItemHeight(IFWL_Widget* pWidget);
virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget,
FWL_HLISTITEM hItem);
- virtual FWL_ERR GetItemCheckRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- CFX_RectF& rtCheck);
- virtual FWL_ERR SetItemCheckRect(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- const CFX_RectF& rtCheck);
+ virtual FWL_Error GetItemCheckRect(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ CFX_RectF& rtCheck);
+ virtual FWL_Error SetItemCheckRect(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ const CFX_RectF& rtCheck);
virtual uint32_t GetItemCheckState(IFWL_Widget* pWidget,
FWL_HLISTITEM hItem);
- virtual FWL_ERR SetItemCheckState(IFWL_Widget* pWidget,
- FWL_HLISTITEM hItem,
- uint32_t dwCheckState);
+ virtual FWL_Error SetItemCheckState(IFWL_Widget* pWidget,
+ FWL_HLISTITEM hItem,
+ uint32_t dwCheckState);
virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget);
std::vector<std::unique_ptr<CFWL_ComboBoxItem>> m_ItemArray;