summaryrefslogtreecommitdiff
path: root/xfa/fwl/lightwidget/cfwl_combobox.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-18 06:21:57 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-18 06:21:57 -0700
commit4ce94e118d66064715de5baebeb4b2b580dcac66 (patch)
treeba74181eb90675172d3c7f4be8e71ada3fbc9125 /xfa/fwl/lightwidget/cfwl_combobox.h
parent2fad11a8d9d2704cd9ee28b02373ad7ce19c65e3 (diff)
downloadpdfium-4ce94e118d66064715de5baebeb4b2b580dcac66.tar.xz
Make code compile with clang_use_chrome_plugin (part VI)
This change mainly contains files in xfa/fwl directory. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2070583003
Diffstat (limited to 'xfa/fwl/lightwidget/cfwl_combobox.h')
-rw-r--r--xfa/fwl/lightwidget/cfwl_combobox.h101
1 files changed, 53 insertions, 48 deletions
diff --git a/xfa/fwl/lightwidget/cfwl_combobox.h b/xfa/fwl/lightwidget/cfwl_combobox.h
index a708589d4f..ba5db16f87 100644
--- a/xfa/fwl/lightwidget/cfwl_combobox.h
+++ b/xfa/fwl/lightwidget/cfwl_combobox.h
@@ -20,6 +20,9 @@ class CFWL_ComboBoxItem;
class CFWL_ComboBox : public CFWL_Widget {
public:
+ CFWL_ComboBox();
+ ~CFWL_ComboBox() override;
+
static CFWL_ComboBox* Create();
FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = NULL);
int32_t AddString(const CFX_WideStringC& wsText);
@@ -65,58 +68,59 @@ class CFWL_ComboBox : public CFWL_Widget {
FWL_Error GetBBox(CFX_RectF& rect);
FWL_Error EditModifyStylesEx(uint32_t dwStylesExAdded,
uint32_t dwStylesExRemoved);
- CFWL_ComboBox();
- virtual ~CFWL_ComboBox();
protected:
class CFWL_ComboBoxDP : public IFWL_ComboBoxDP {
public:
CFWL_ComboBoxDP();
- ~CFWL_ComboBoxDP();
- virtual FWL_Error GetCaption(IFWL_Widget* pWidget,
- CFX_WideString& wsCaption) {
- return FWL_Error::Succeeded;
- }
-
- virtual int32_t CountItems(IFWL_Widget* pWidget);
- virtual IFWL_ListItem* GetItem(IFWL_Widget* pWidget, int32_t nIndex);
- virtual int32_t GetItemIndex(IFWL_Widget* pWidget, IFWL_ListItem* pItem);
- virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget,
- IFWL_ListItem* pItem,
- int32_t nIndex);
-
- virtual uint32_t GetItemStyles(IFWL_Widget* pWidget, IFWL_ListItem* pItem);
- virtual FWL_Error GetItemText(IFWL_Widget* pWidget,
- IFWL_ListItem* pItem,
- CFX_WideString& wsText);
- virtual FWL_Error GetItemRect(IFWL_Widget* pWidget,
- IFWL_ListItem* pItem,
- CFX_RectF& rtItem);
- virtual void* GetItemData(IFWL_Widget* pWidget, IFWL_ListItem* pItem);
- virtual FWL_Error SetItemStyles(IFWL_Widget* pWidget,
- IFWL_ListItem* pItem,
- uint32_t dwStyle);
- virtual FWL_Error SetItemText(IFWL_Widget* pWidget,
- IFWL_ListItem* pItem,
- const FX_WCHAR* pszText);
- virtual FWL_Error SetItemRect(IFWL_Widget* pWidget,
- IFWL_ListItem* pItem,
- const CFX_RectF& rtItem);
- virtual FX_FLOAT GetItemHeight(IFWL_Widget* pWidget);
- virtual CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget,
- IFWL_ListItem* pItem);
- virtual FWL_Error GetItemCheckRect(IFWL_Widget* pWidget,
- IFWL_ListItem* pItem,
- CFX_RectF& rtCheck);
- virtual FWL_Error SetItemCheckRect(IFWL_Widget* pWidget,
- IFWL_ListItem* pItem,
- const CFX_RectF& rtCheck);
- virtual uint32_t GetItemCheckState(IFWL_Widget* pWidget,
- IFWL_ListItem* pItem);
- virtual FWL_Error SetItemCheckState(IFWL_Widget* pWidget,
- IFWL_ListItem* pItem,
- uint32_t dwCheckState);
- virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget);
+ ~CFWL_ComboBoxDP() override;
+
+ // IFWL_DataProvider
+ FWL_Error GetCaption(IFWL_Widget* pWidget,
+ CFX_WideString& wsCaption) override;
+
+ // IFWL_ListBoxDP
+ int32_t CountItems(IFWL_Widget* pWidget) override;
+ IFWL_ListItem* GetItem(IFWL_Widget* pWidget, int32_t nIndex) override;
+ int32_t GetItemIndex(IFWL_Widget* pWidget, IFWL_ListItem* pItem) override;
+ FX_BOOL SetItemIndex(IFWL_Widget* pWidget,
+ IFWL_ListItem* pItem,
+ int32_t nIndex) override;
+
+ uint32_t GetItemStyles(IFWL_Widget* pWidget, IFWL_ListItem* pItem) override;
+ FWL_Error GetItemText(IFWL_Widget* pWidget,
+ IFWL_ListItem* pItem,
+ CFX_WideString& wsText) override;
+ FWL_Error GetItemRect(IFWL_Widget* pWidget,
+ IFWL_ListItem* pItem,
+ CFX_RectF& rtItem) override;
+ void* GetItemData(IFWL_Widget* pWidget, IFWL_ListItem* pItem) override;
+ FWL_Error SetItemStyles(IFWL_Widget* pWidget,
+ IFWL_ListItem* pItem,
+ uint32_t dwStyle) override;
+ FWL_Error SetItemText(IFWL_Widget* pWidget,
+ IFWL_ListItem* pItem,
+ const FX_WCHAR* pszText) override;
+ FWL_Error SetItemRect(IFWL_Widget* pWidget,
+ IFWL_ListItem* pItem,
+ const CFX_RectF& rtItem) override;
+ FX_FLOAT GetItemHeight(IFWL_Widget* pWidget) override;
+ CFX_DIBitmap* GetItemIcon(IFWL_Widget* pWidget,
+ IFWL_ListItem* pItem) override;
+ FWL_Error GetItemCheckRect(IFWL_Widget* pWidget,
+ IFWL_ListItem* pItem,
+ CFX_RectF& rtCheck) override;
+ FWL_Error SetItemCheckRect(IFWL_Widget* pWidget,
+ IFWL_ListItem* pItem,
+ const CFX_RectF& rtCheck) override;
+ uint32_t GetItemCheckState(IFWL_Widget* pWidget,
+ IFWL_ListItem* pItem) override;
+ FWL_Error SetItemCheckState(IFWL_Widget* pWidget,
+ IFWL_ListItem* pItem,
+ uint32_t dwCheckState) override;
+
+ // IFWL_ComboBoxDP
+ FX_FLOAT GetListHeight(IFWL_Widget* pWidget) override;
std::vector<std::unique_ptr<CFWL_ComboBoxItem>> m_ItemArray;
FX_FLOAT m_fMaxListHeight;
@@ -127,7 +131,8 @@ class CFWL_ComboBox : public CFWL_Widget {
class CFWL_ComboBoxItem : public IFWL_ListItem {
public:
- CFWL_ComboBoxItem() : m_pDIB(nullptr), m_pData(nullptr) {}
+ CFWL_ComboBoxItem();
+ ~CFWL_ComboBoxItem();
CFX_RectF m_rtItem;
uint32_t m_dwStyles;