Example #1
0
status_t
PLabel::GetProperty(const char *name, PValue *value, const int32 &index) const
{
	if (!name || !value)
		return B_ERROR;
	
	BString str(name);
	PProperty *prop = FindProperty(name,index);
	if (!prop)
		return B_NAME_NOT_FOUND;
	
	BStringView *backend = (BStringView*)fView;

	if (backend->Window())
		backend->Window()->Lock();

	if (str.ICompare("Alignment") == 0)
		((EnumProperty*)prop)->SetValue(backend->Alignment());
	else if (str.ICompare("Text") == 0)
		((StringProperty*)prop)->SetValue(backend->Text());
	else
	{
		if (backend->Window())
			backend->Window()->Unlock();

		return PView::GetProperty(name, value, index);
	}

	if (backend->Window())
		backend->Window()->Unlock();

	return prop->GetValue(value);
}
Example #2
0
File: Box.cpp Project: D-os/BeFree
const char*
BBox::Label() const
{
	if (fLabelView == NULL) return NULL;

	BStringView *strView = cast_as(fLabelView, BStringView);
	if (strView == NULL) return NULL;

	return strView->Text();
}
Example #3
0
const char*
AboutView::Version()
{
	return fVersionView->Text();
}
Example #4
0
const char*
AboutView::Name()
{
	return fNameView->Text();
}