コード例 #1
0
ファイル: PropertyListView.cpp プロジェクト: mariuz/haiku
// PasteProperties
void
PropertyListView::PasteProperties(const PropertyObject* object)
{
	if (!fPropertyObject)
		return;

	// default implementation is to adopt the pasted properties
	int32 count = object->CountProperties();
	for (int32 i = 0; i < count; i++) {
		Property* p = object->PropertyAtFast(i);
		Property* local = fPropertyObject->FindProperty(p->Identifier());
		if (local)
			local->SetValue(p);
	}
}
コード例 #2
0
ファイル: IconObjectListView.cpp プロジェクト: mariuz/haiku
// FocusNameProperty
void
IconObjectListView::FocusNameProperty()
{
	if (fObject == NULL)
		return;

	int32 count = _CountItems();
	for (int32 i = 0; i < count; i++) {
		PropertyItemView* item = _ItemAt(i);
		Property* property = item->GetProperty();
		if (property != NULL && property->Identifier() == PROPERTY_NAME) {
			item->MakeFocus(true);
			break;
		}
	}
}