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

Unified Diff: xfa/fwl/core/ifwl_listbox.h

Issue 2494743002: IFWL cleanup in the Combo classes (Closed)
Patch Set: Review feedback Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_combolist.h ('k') | xfa/fwl/core/ifwl_widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_listbox.h
diff --git a/xfa/fwl/core/ifwl_listbox.h b/xfa/fwl/core/ifwl_listbox.h
index 608a7d93727c4b0ced60a66518dd9857daf08bee..32865c116e4b259126fc28c3206cca50cadae3a3 100644
--- a/xfa/fwl/core/ifwl_listbox.h
+++ b/xfa/fwl/core/ifwl_listbox.h
@@ -51,9 +51,9 @@ FWL_EVENT_DEF(CFWL_EvtLtbDrawItem,
class IFWL_ListBoxDP : public IFWL_DataProvider {
public:
- virtual int32_t CountItems(const IFWL_Widget* pWidget) = 0;
+ virtual int32_t CountItems(const IFWL_Widget* pWidget) const = 0;
virtual CFWL_ListItem* GetItem(const IFWL_Widget* pWidget,
- int32_t nIndex) = 0;
+ int32_t nIndex) const = 0;
virtual int32_t GetItemIndex(IFWL_Widget* pWidget, CFWL_ListItem* pItem) = 0;
virtual bool SetItemIndex(IFWL_Widget* pWidget,
CFWL_ListItem* pItem,
@@ -119,15 +119,16 @@ class IFWL_ListBox : public IFWL_Widget {
void GetItemText(CFWL_ListItem* hItem, CFX_WideString& wsText);
void GetScrollPos(FX_FLOAT& fPos, bool bVert = true);
+ FX_FLOAT GetItemHeight() const { return m_fItemHeight; }
+ FX_FLOAT CalcItemHeight();
+
protected:
CFWL_ListItem* GetItem(CFWL_ListItem* hItem, uint32_t dwKeyCode);
void SetSelection(CFWL_ListItem* hStart, CFWL_ListItem* hEnd, bool bSelected);
CFWL_ListItem* GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy);
bool ScrollToVisible(CFWL_ListItem* hItem);
- FX_FLOAT CalcItemHeight();
void InitScrollBar(bool bVert = true);
bool IsShowScrollBar(bool bVert);
- FX_FLOAT GetItemHeight() const { return m_fItemHeight; }
IFWL_ScrollBar* GetVertScrollBar() const { return m_pVertScrollBar.get(); }
const CFX_RectF& GetRTClient() const { return m_rtClient; }
« no previous file with comments | « xfa/fwl/core/ifwl_combolist.h ('k') | xfa/fwl/core/ifwl_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698