Exemple #1
0
void
TeamWindow::BreakpointSelectionChanged(BreakpointProxyList &proxies)
{
	if (proxies.CountItems() == 0 && fActiveBreakpoint != NULL) {
		fActiveBreakpoint->ReleaseReference();
		fActiveBreakpoint = NULL;
	} else if (proxies.CountItems() == 1) {
		BreakpointProxy* proxy = proxies.ItemAt(0);
		if (proxy->Type() == BREAKPOINT_PROXY_TYPE_BREAKPOINT)
			_SetActiveBreakpoint(proxy->GetBreakpoint());
	}
	// if more than one item is selected, do nothing.
}
void
BreakpointsView::_SetSelection(BreakpointProxyList& proxies)
{
	for (int32 i = 0; i < fSelectedBreakpoints.CountItems(); i++)
		fSelectedBreakpoints.ItemAt(i)->ReleaseReference();

	fSelectedBreakpoints.MakeEmpty();

	for (int32 i = 0; i < proxies.CountItems(); i++) {
		BreakpointProxy* proxy = proxies.ItemAt(i);
		if (!fSelectedBreakpoints.AddItem(proxy))
			return;
		proxy->AcquireReference();
	}

	_UpdateButtons();
}
Exemple #3
0
void
BreakpointListView::TableSelectionChanged(Table* table)
{
	if (fListener == NULL)
		return;

	TableSelectionModel* selectionModel = table->SelectionModel();
	BreakpointProxyList proxyList;
	for (int32 i = 0; i < selectionModel->CountRows(); i++) {
		BreakpointProxy* proxy = fBreakpointsTableModel->BreakpointProxyAt(
			selectionModel->RowAt(i));
		if (proxy == NULL)
			continue;
		if (!proxyList.AddItem(proxy))
			return;
	}

	fListener->BreakpointSelectionChanged(proxyList);
}