Lines Matching refs:item

39 	which type of item you want to deal with.
99 // #pragma mark - item accessors
131 /*! Returns a pointer to the item in the lists which is
176 DiagramItem *item = ItemAt(i, DiagramItem::M_BOX);
177 if (item->Frame().Contains(point) && (item->howCloseTo(point) == 1.0)) {
178 // DiagramItemGroup *group = dynamic_cast<DiagramItemGroup *>(item);
179 return (fLastItemUnder = item);
188 DiagramItem *item = ItemAt(i, DiagramItem::M_WIRE);
189 if (item->Frame().Contains(point)) {
190 float howClose = item->howCloseTo(point);
192 closestItem = item;
194 return (fLastItemUnder = item);
206 DiagramItem *item = ItemAt(i, DiagramItem::M_ENDPOINT);
207 if (item->Frame().Contains(point) && (item->howCloseTo(point) == 1.0))
208 return (fLastItemUnder = item);
212 return (fLastItemUnder = 0); // no item was found!
216 // #pragma mark - item operations
219 //! Adds an \param item to the group; returns true on success.
221 DiagramItemGroup::AddItem(DiagramItem *item)
224 if (item && (fTypes & item->type())) {
225 if (item->m_group)
226 item->m_group->RemoveItem(item);
228 switch (item->type()) {
232 item->m_group = this;
233 return fBoxes->AddItem(static_cast<void *>(item));
238 item->m_group = this;
239 return fWires->AddItem(static_cast<void *>(item));
244 item->m_group = this;
245 return fEndPoints->AddItem(static_cast<void *>(item));
253 //! Removes an \param item from the group; returns true on success.
255 DiagramItemGroup::RemoveItem(DiagramItem* item)
258 if (item && (fTypes & item->type())) {
259 // reset the lastItemUnder-pointer if it pointed to this item
260 if (fLastItemUnder == item)
264 if (item->isSelected())
265 fSelection->RemoveItem(static_cast<void *>(item));
267 // try to remove the item from its list
268 switch (item->type()) {
271 item->m_group = 0;
272 return fBoxes->RemoveItem(static_cast<void *>(item));
278 item->m_group = 0;
279 return fWires->RemoveItem(static_cast<void *>(item));
285 item->m_group = 0;
286 return fEndPoints->RemoveItem(static_cast<void *>(item));
297 implementation); can't handle more than one item type at a
330 the more recently selected item are drawn above others.
338 DiagramItem *item = ItemAt(i, DiagramItem::M_WIRE);
339 if (item->Frame().Intersects(updateRect))
340 item->Draw(updateRect);
346 DiagramItem *item = ItemAt(i, DiagramItem::M_BOX);
347 if (item && item->Frame().Intersects(updateRect)) {
348 item->Draw(updateRect);
350 updateRegion->Exclude(item->Frame());
357 DiagramItem *item = ItemAt(i, DiagramItem::M_ENDPOINT);
358 if (item && item->Frame().Intersects(updateRect))
359 item->Draw(updateRect);
366 DiagramItem in \param which; returns false if no items are above or the item
379 if (index >= 0) { // the item was found
382 DiagramItem *item = ItemAt(i, DiagramItem::M_BOX);
383 if (item && item->Frame().Intersects(r)) {
384 region->Include(item->Frame() & r);
396 DiagramItem *item = ItemAt(i, DiagramItem::M_BOX);
397 if (item && item->Frame().Intersects(r)) {
398 region->Include(item->Frame() & r);
440 /*! Returns a pointer to the item in the list which is
458 /*! Selects an item, optionally replacing the complete former
459 selection. If the type of the item to be selected differs
469 // check if the item's type is the same as of the other
482 // select the item
503 //! Simply deselects one item
567 item alignment into account; in updateRegion the areas
578 DiagramItem *item = dynamic_cast<DiagramItem *>(SelectedItemAt(i));
579 if (item->isDraggable())
580 item->MoveBy(x, y, updateRegion);