int wxSmithAuiToolBar::HitTest(const wxPoint& pt) { for (unsigned int i=0; i<m_items.Count(); i++) { wxAuiToolBarItem& Item = m_items.Item(i); if (!Item.GetSizerItem()) continue; wxRect rect = Item.GetSizerItem()->GetRect(); if ( Item.GetKind() == wxITEM_SPACER ) { if ( rect.Contains(pt.x,rect.y) ) { return GetToolIndex(Item.GetId()); } } if ( rect.Contains(pt.x,pt.y) ) { return GetToolIndex(Item.GetId()); } } return wxNOT_FOUND; }
mm1000_t CGCodeTools::GetHeight(toolnr_t tool) { uint8_t idx = GetToolIndex(tool); if (idx == NOTOOLINDEX) return 0; return pgm_read_dword(&_tools[idx].Height); }