• Home
  • Raw
  • Download

Lines Matching refs:pItem

128     CFWL_ListItem* pItem = GetItem(this, i);  in CountSelItems()  local
129 if (!pItem) in CountSelItems()
131 if (pItem->GetStates() & FWL_ITEMSTATE_LTB_Selected) in CountSelItems()
148 CFWL_ListItem* pItem = GetItem(this, i); in GetSelIndex() local
149 if (!pItem) in GetSelIndex()
151 if (pItem->GetStates() & FWL_ITEMSTATE_LTB_Selected) { in GetSelIndex()
160 void CFWL_ListBox::SetSelItem(CFWL_ListItem* pItem, bool bSelect) { in SetSelItem() argument
161 if (!pItem) { in SetSelItem()
171 SetSelectionDirect(pItem, bSelect); in SetSelItem()
173 SetSelection(pItem, pItem, bSelect); in SetSelItem()
176 CFWL_ListItem* CFWL_ListBox::GetListItem(CFWL_ListItem* pItem, in GetListItem() argument
189 int32_t index = GetItemIndex(this, pItem); in GetListItem()
219 CFWL_ListItem* pItem = GetItem(this, i); in SetSelection() local
220 SetSelectionDirect(pItem, false); in SetSelection()
224 CFWL_ListItem* pItem = GetItem(this, iStart); in SetSelection() local
225 SetSelectionDirect(pItem, bSelected); in SetSelection()
229 void CFWL_ListBox::SetSelectionDirect(CFWL_ListItem* pItem, bool bSelect) { in SetSelectionDirect() argument
230 if (!pItem) in SetSelectionDirect()
233 uint32_t dwOldStyle = pItem->GetStates(); in SetSelectionDirect()
236 pItem->SetStates(dwOldStyle); in SetSelectionDirect()
243 bool CFWL_ListBox::IsItemSelected(CFWL_ListItem* pItem) { in IsItemSelected() argument
244 return pItem && (pItem->GetStates() & FWL_ITEMSTATE_LTB_Selected) != 0; in IsItemSelected()
251 CFWL_ListItem* pItem = GetItem(this, i); in ClearSelection() local
252 if (!pItem) in ClearSelection()
254 if (!(pItem->GetStates() & FWL_ITEMSTATE_LTB_Selected)) in ClearSelection()
256 SetSelectionDirect(pItem, false); in ClearSelection()
278 CFWL_ListItem* pItem = GetItem(this, i); in GetFocusedItem() local
279 if (!pItem) in GetFocusedItem()
281 if (pItem->GetStates() & FWL_ITEMSTATE_LTB_Focused) in GetFocusedItem()
282 return pItem; in GetFocusedItem()
287 void CFWL_ListBox::SetFocusItem(CFWL_ListItem* pItem) { in SetFocusItem() argument
289 if (pItem == hFocus) in SetFocusItem()
297 if (pItem) { in SetFocusItem()
298 uint32_t dwStyle = pItem->GetStates(); in SetFocusItem()
300 pItem->SetStates(dwStyle); in SetFocusItem()
316 CFWL_ListItem* pItem = GetItem(this, i); in GetItemAtPoint() local
317 if (!pItem) in GetItemAtPoint()
320 CFX_RectF rtItem = pItem->GetRect(); in GetItemAtPoint()
323 return pItem; in GetItemAtPoint()
328 bool CFWL_ListBox::ScrollToVisible(CFWL_ListItem* pItem) { in ScrollToVisible() argument
332 CFX_RectF rtItem = pItem ? pItem->GetRect() : CFX_RectF(); in ScrollToVisible()
394 CFWL_ListItem* pItem = GetItem(this, i); in DrawItems() local
395 if (!pItem) in DrawItems()
398 CFX_RectF rtItem = pItem->GetRect(); in DrawItems()
404 DrawItem(pGraphics, pTheme, pItem, i, rtItem, pMatrix); in DrawItems()
410 CFWL_ListItem* pItem, in DrawItem() argument
414 uint32_t dwItemStyles = pItem ? pItem->GetStates() : 0; in DrawItem()
444 if (!pItem) in DrawItem()
447 WideString wsText = pItem->GetText(); in DrawItem()
581 void CFWL_ListBox::UpdateItemSize(CFWL_ListItem* pItem, in UpdateItemSize() argument
586 if (!bAutoSize && pItem) { in UpdateItemSize()
588 pItem->SetRect(rtItem); in UpdateItemSize()
598 CFWL_ListItem* pItem = GetItem(this, i); in GetMaxTextWidth() local
599 if (!pItem) in GetMaxTextWidth()
603 CalcTextSize(pItem->GetText(), m_pProperties->m_pThemeProvider, false); in GetMaxTextWidth()
747 CFWL_ListItem* pItem = GetItemAtPoint(pMsg->m_pos); in OnLButtonDown() local
748 if (!pItem) in OnLButtonDown()
753 bool bSelected = IsItemSelected(pItem); in OnLButtonDown()
754 SetSelectionDirect(pItem, !bSelected); in OnLButtonDown()
755 m_hAnchor = pItem; in OnLButtonDown()
758 SetSelection(m_hAnchor, pItem, true); in OnLButtonDown()
760 SetSelectionDirect(pItem, true); in OnLButtonDown()
762 SetSelection(pItem, pItem, true); in OnLButtonDown()
763 m_hAnchor = pItem; in OnLButtonDown()
766 SetSelection(pItem, pItem, true); in OnLButtonDown()
769 SetFocusItem(pItem); in OnLButtonDown()
770 ScrollToVisible(pItem); in OnLButtonDown()
796 CFWL_ListItem* pItem = GetFocusedItem(); in OnKeyDown() local
797 pItem = GetListItem(pItem, dwKeyCode); in OnKeyDown()
800 OnVK(pItem, bShift, bCtrl); in OnKeyDown()
808 void CFWL_ListBox::OnVK(CFWL_ListItem* pItem, bool bShift, bool bCtrl) { in OnVK() argument
809 if (!pItem) in OnVK()
817 SetSelection(m_hAnchor, pItem, true); in OnVK()
819 SetSelectionDirect(pItem, true); in OnVK()
821 SetSelection(pItem, pItem, true); in OnVK()
822 m_hAnchor = pItem; in OnVK()
825 SetSelection(pItem, pItem, true); in OnVK()
828 SetFocusItem(pItem); in OnVK()
829 ScrollToVisible(pItem); in OnVK()
901 int32_t CFWL_ListBox::GetItemIndex(CFWL_Widget* pWidget, CFWL_ListItem* pItem) { in GetItemIndex() argument
904 [pItem](const std::unique_ptr<CFWL_ListItem>& candidate) { in GetItemIndex()
905 return candidate.get() == pItem; in GetItemIndex()
922 void CFWL_ListBox::DeleteString(CFWL_ListItem* pItem) { in DeleteString() argument
923 int32_t nIndex = GetItemIndex(this, pItem); in DeleteString()