| Index: xfa/fwl/core/ifwl_listbox.h
|
| diff --git a/xfa/fwl/core/ifwl_listbox.h b/xfa/fwl/core/ifwl_listbox.h
|
| index 5d4f896e94706da0c2d79d6b21ab8bc158147bf1..e16778f23e7b3d2ec676019bd6dad7c9b648eaa0 100644
|
| --- a/xfa/fwl/core/ifwl_listbox.h
|
| +++ b/xfa/fwl/core/ifwl_listbox.h
|
| @@ -56,9 +56,9 @@ class IFWL_ListBoxDP : public IFWL_DataProvider {
|
| virtual IFWL_ListItem* GetItem(const IFWL_Widget* pWidget,
|
| int32_t nIndex) = 0;
|
| virtual int32_t GetItemIndex(IFWL_Widget* pWidget, IFWL_ListItem* pItem) = 0;
|
| - virtual FX_BOOL SetItemIndex(IFWL_Widget* pWidget,
|
| - IFWL_ListItem* pItem,
|
| - int32_t nIndex) = 0;
|
| + virtual bool SetItemIndex(IFWL_Widget* pWidget,
|
| + IFWL_ListItem* pItem,
|
| + int32_t nIndex) = 0;
|
| virtual uint32_t GetItemStyles(IFWL_Widget* pWidget,
|
| IFWL_ListItem* pItem) = 0;
|
| virtual FWL_Error GetItemText(IFWL_Widget* pWidget,
|
| @@ -108,7 +108,7 @@ class IFWL_ListBox : public IFWL_Widget {
|
|
|
| // IFWL_Widget
|
| FWL_Type GetClassID() const override;
|
| - FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE) override;
|
| + FWL_Error GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false) override;
|
| FWL_Error Update() override;
|
| FWL_WidgetHit HitTest(FX_FLOAT fx, FX_FLOAT fy) override;
|
| FWL_Error DrawWidget(CFX_Graphics* pGraphics,
|
| @@ -122,29 +122,27 @@ class IFWL_ListBox : public IFWL_Widget {
|
| int32_t CountSelItems();
|
| IFWL_ListItem* GetSelItem(int32_t nIndexSel);
|
| int32_t GetSelIndex(int32_t nIndex);
|
| - FWL_Error SetSelItem(IFWL_ListItem* hItem, FX_BOOL bSelect = TRUE);
|
| + FWL_Error SetSelItem(IFWL_ListItem* hItem, bool bSelect = true);
|
| FWL_Error GetItemText(IFWL_ListItem* hItem, CFX_WideString& wsText);
|
| - FWL_Error GetScrollPos(FX_FLOAT& fPos, FX_BOOL bVert = TRUE);
|
| + FWL_Error GetScrollPos(FX_FLOAT& fPos, bool bVert = true);
|
| FWL_Error* Sort(IFWL_ListBoxCompare* pCom);
|
|
|
| protected:
|
| friend class CFWL_ListBoxImpDelegate;
|
|
|
| IFWL_ListItem* GetItem(IFWL_ListItem* hItem, uint32_t dwKeyCode);
|
| - void SetSelection(IFWL_ListItem* hStart,
|
| - IFWL_ListItem* hEnd,
|
| - FX_BOOL bSelected);
|
| - void SetSelectionDirect(IFWL_ListItem* hItem, FX_BOOL bSelect);
|
| - FX_BOOL IsItemSelected(IFWL_ListItem* hItem);
|
| + void SetSelection(IFWL_ListItem* hStart, IFWL_ListItem* hEnd, bool bSelected);
|
| + void SetSelectionDirect(IFWL_ListItem* hItem, bool bSelect);
|
| + bool IsItemSelected(IFWL_ListItem* hItem);
|
| void ClearSelection();
|
| void SelectAll();
|
| IFWL_ListItem* GetFocusedItem();
|
| void SetFocusItem(IFWL_ListItem* hItem);
|
| IFWL_ListItem* GetItemAtPoint(FX_FLOAT fx, FX_FLOAT fy);
|
| - FX_BOOL GetItemCheckRect(IFWL_ListItem* hItem, CFX_RectF& rtCheck);
|
| - FX_BOOL SetItemChecked(IFWL_ListItem* hItem, FX_BOOL bChecked);
|
| - FX_BOOL GetItemChecked(IFWL_ListItem* hItem);
|
| - FX_BOOL ScrollToVisible(IFWL_ListItem* hItem);
|
| + bool GetItemCheckRect(IFWL_ListItem* hItem, CFX_RectF& rtCheck);
|
| + bool SetItemChecked(IFWL_ListItem* hItem, bool bChecked);
|
| + bool GetItemChecked(IFWL_ListItem* hItem);
|
| + bool ScrollToVisible(IFWL_ListItem* hItem);
|
| void DrawBkground(CFX_Graphics* pGraphics,
|
| IFWL_ThemeProvider* pTheme,
|
| const CFX_Matrix* pMatrix = nullptr);
|
| @@ -158,17 +156,17 @@ class IFWL_ListBox : public IFWL_Widget {
|
| const CFX_RectF& rtItem,
|
| const CFX_Matrix* pMatrix = nullptr);
|
| void DrawStatic(CFX_Graphics* pGraphics, IFWL_ThemeProvider* pTheme);
|
| - CFX_SizeF CalcSize(FX_BOOL bAutoSize = FALSE);
|
| + CFX_SizeF CalcSize(bool bAutoSize = false);
|
| void GetItemSize(CFX_SizeF& size,
|
| IFWL_ListItem* hItem,
|
| FX_FLOAT fWidth,
|
| FX_FLOAT fHeight,
|
| - FX_BOOL bAutoSize = FALSE);
|
| + bool bAutoSize = false);
|
| FX_FLOAT GetMaxTextWidth();
|
| FX_FLOAT GetScrollWidth();
|
| FX_FLOAT GetItemHeigt();
|
| - void InitScrollBar(FX_BOOL bVert = TRUE);
|
| - FX_BOOL IsShowScrollBar(FX_BOOL bVert);
|
| + void InitScrollBar(bool bVert = true);
|
| + bool IsShowScrollBar(bool bVert);
|
| void ProcessSelChanged();
|
|
|
| CFX_RectF m_rtClient;
|
| @@ -181,17 +179,17 @@ class IFWL_ListBox : public IFWL_Widget {
|
| IFWL_ListItem* m_hAnchor;
|
| FX_FLOAT m_fItemHeight;
|
| FX_FLOAT m_fScorllBarWidth;
|
| - FX_BOOL m_bLButtonDown;
|
| + bool m_bLButtonDown;
|
| IFWL_ThemeProvider* m_pScrollBarTP;
|
|
|
| private:
|
| - void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE);
|
| + void OnFocusChanged(CFWL_Message* pMsg, bool bSet = true);
|
| void OnLButtonDown(CFWL_MsgMouse* pMsg);
|
| void OnLButtonUp(CFWL_MsgMouse* pMsg);
|
| void OnMouseWheel(CFWL_MsgMouseWheel* pMsg);
|
| void OnKeyDown(CFWL_MsgKey* pMsg);
|
| - void OnVK(IFWL_ListItem* hItem, FX_BOOL bShift, FX_BOOL bCtrl);
|
| - FX_BOOL OnScroll(IFWL_ScrollBar* pScrollBar, uint32_t dwCode, FX_FLOAT fPos);
|
| + void OnVK(IFWL_ListItem* hItem, bool bShift, bool bCtrl);
|
| + bool OnScroll(IFWL_ScrollBar* pScrollBar, uint32_t dwCode, FX_FLOAT fPos);
|
| void DispatchSelChangedEv();
|
| };
|
|
|
|
|