예제 #1
0
void
MediaWindow::_AddNodeItems(NodeList& list, MediaListItem::media_type type)
{
	int32 count = list.CountItems();
	for (int32 i = 0; i < count; i++) {
		dormant_node_info* info = list.ItemAt(i);
		if (_FindNodeListItem(info) == NULL)
			fListView->AddItem(new NodeListItem(info, type));
	}
}
예제 #2
0
파일: TreeTable.cpp 프로젝트: DonCN/haiku
void
TreeTableNode::DetachRow()
{

	fRow = NULL;

	if (fChildren != NULL) {
		for (int32 i = 0; TreeTableNode* child = fChildren->ItemAt(i); i++)
			child->DetachRow();
	}
}
예제 #3
0
void
SettingsView::_PopulateMenu(BMenu* menu, NodeList& nodes,
	const BMessage& message)
{
	for (int32 i = 0; i < nodes.CountItems(); i++) {
		dormant_node_info* info = nodes.ItemAt(i);
		menu->AddItem(new NodeMenuItem(info, new BMessage(message)));
	}

	if (Window() != NULL)
		menu->SetTargetForItems(BMessenger(this));
}
예제 #4
0
파일: TreeTable.cpp 프로젝트: DonCN/haiku
TreeTableNode*
TreeTableNode::ChildAt(int32 index)
{
	return fChildren != NULL ? fChildren->ItemAt(index) : NULL;
}