Exemple #1
0
String SimpleBinaryOperation::defineHtml() const
{
	if (id().symbol() == Operator::Slash && WebStylist::current()->property("SimpleBinaryOperation", "ProperMaths").toBool())
	{
		String ret = displayParenthesise(L"<^><div style=\"display: inline-block; vertical-align: middle; text-align:center\">%1<hr style=\"margin:0; margin-top:1px; padding:0; border:0; border-bottom: 2px solid #666;\"/>%2</div>");
		return ret	.arg(toHtml(child(FirstOperand), childIs<Operation>(FirstOperand) ? L"class=\"Operation\"" : L""))
					.arg(toHtml(child(SecondOperand), childIs<Operation>(SecondOperand) ? L"class=\"Operation\"" : L""));
	}
	else
		return Super::defineHtml();
}
Exemple #2
0
String BinaryOperation::defineHtml() const
{
	String ret = displayParenthesise(L"%1 <^>" + operatorHtml() + L" %2");
	return ret	.arg(toHtml(child(FirstOperand), childIs<Operation>(FirstOperand) ? L"span class=\"Operation\"" : L"span"))
				.arg(toHtml(child(SecondOperand), childIs<Operation>(SecondOperand) ? L"span class=\"Operation\"" : L"span"));
}