Пример #1
0
const char *
BTextWidget::Text(const BPoseView *view) const
{
	StringAttributeText *textAttribute = dynamic_cast<StringAttributeText *>(fText);
	if (textAttribute == NULL)
		return NULL;

	return textAttribute->ValueAsText(view);
}
Пример #2
0
int
StringAttributeText::Compare(WidgetAttributeText& attr, BPoseView* view)
{
	StringAttributeText* compareTo = dynamic_cast<StringAttributeText*>(&attr);
	ThrowOnAssert(compareTo != NULL);

	if (fValueDirty)
		ReadValue(&fFullValueText);

	return NaturalCompare(fFullValueText.String(),
		compareTo->ValueAsText(view));
}