CharacterStyleDataRef
CharacterStyleData::SetUnderline(uint8 underline)
{
	if (fUnderlineStyle == underline)
		return CharacterStyleDataRef(this);

	CharacterStyleData* ret = new(std::nothrow) CharacterStyleData(*this);
	if (ret == NULL)
		return CharacterStyleDataRef(this);

	ret->fUnderlineStyle = underline;
	return CharacterStyleDataRef(ret, true);
}
CharacterStyleDataRef
CharacterStyleData::SetFont(const BFont& font)
{
	if (fFont == font)
		return CharacterStyleDataRef(this);

	CharacterStyleData* ret = new(std::nothrow) CharacterStyleData(*this);
	if (ret == NULL)
		return CharacterStyleDataRef(this);

	ret->fFont = font;
	return CharacterStyleDataRef(ret, true);
}
CharacterStyleDataRef
CharacterStyleData::SetUnderlineColor(color_which which)
{
	if (fWhichUnderlineColor == which)
		return CharacterStyleDataRef(this);

	CharacterStyleData* ret = new(std::nothrow) CharacterStyleData(*this);
	if (ret == NULL)
		return CharacterStyleDataRef(this);

	ret->fWhichUnderlineColor = which;
	return CharacterStyleDataRef(ret, true);
}
CharacterStyleDataRef
CharacterStyleData::SetStrikeOut(uint8 strikeOut)
{
	if (fStrikeOutStyle == strikeOut)
		return CharacterStyleDataRef(this);

	CharacterStyleData* ret = new(std::nothrow) CharacterStyleData(*this);
	if (ret == NULL)
		return CharacterStyleDataRef(this);

	ret->fStrikeOutStyle = strikeOut;
	return CharacterStyleDataRef(ret, true);
}
CharacterStyleDataRef
CharacterStyleData::SetGlyphSpacing(float glyphSpacing)
{
	if (fGlyphSpacing == glyphSpacing)
		return CharacterStyleDataRef(this);

	CharacterStyleData* ret = new(std::nothrow) CharacterStyleData(*this);
	if (ret == NULL)
		return CharacterStyleDataRef(this);

	ret->fGlyphSpacing = glyphSpacing;
	return CharacterStyleDataRef(ret, true);
}
CharacterStyleDataRef
CharacterStyleData::SetWidth(float width)
{
	if (fWidth == width)
		return CharacterStyleDataRef(this);

	CharacterStyleData* ret = new(std::nothrow) CharacterStyleData(*this);
	if (ret == NULL)
		return CharacterStyleDataRef(this);

	ret->fWidth = width;
	return CharacterStyleDataRef(ret, true);
}
CharacterStyleDataRef
CharacterStyleData::SetDescent(float descent)
{
	if (fDescent == descent)
		return CharacterStyleDataRef(this);

	CharacterStyleData* ret = new(std::nothrow) CharacterStyleData(*this);
	if (ret == NULL)
		return CharacterStyleDataRef(this);

	ret->fDescent = descent;
	return CharacterStyleDataRef(ret, true);
}
Beispiel #8
0
CharacterStyleDataRef
CharacterStyleData::SetUnderlineColor(rgb_color color)
{
	if (fUnderlineColor == color)
		return CharacterStyleDataRef(this);

	CharacterStyleData* ret = new(std::nothrow) CharacterStyleData(*this);
	if (ret == NULL)
		return CharacterStyleDataRef(this);

	ret->fUnderlineColor = color;
	return CharacterStyleDataRef(ret, true);
}
Beispiel #9
0
CharacterStyleDataRef
CharacterStyleData::SetBackgroundColor(rgb_color color)
{
	if (fBgColor == color)
		return CharacterStyleDataRef(this);

	CharacterStyleData* ret = new(std::nothrow) CharacterStyleData(*this);
	if (ret == NULL)
		return CharacterStyleDataRef(this);

	ret->fBgColor = color;
	return CharacterStyleDataRef(ret, true);
}
Beispiel #10
0
CharacterStyleDataRef
CharacterStyleData::SetStrikeOutColor(rgb_color color)
{
	if (fStrikeOutColor == color)
		return CharacterStyleDataRef(this);

	CharacterStyleData* ret = new(std::nothrow) CharacterStyleData(*this);
	if (ret == NULL)
		return CharacterStyleDataRef(this);

	ret->fStrikeOutColor = color;
	ret->fWhichStrikeOutColor = B_NO_COLOR;
	return CharacterStyleDataRef(ret, true);
}
Beispiel #11
0
CharacterStyleDataRef
CharacterStyleData::SetForegroundColor(rgb_color color)
{
	if (fFgColor == color)
		return CharacterStyleDataRef(this);

	CharacterStyleData* ret = new(std::nothrow) CharacterStyleData(*this);
	if (ret == NULL)
		return CharacterStyleDataRef(this);

	ret->fFgColor = color;
	ret->fWhichFgColor = B_NO_COLOR;
	return CharacterStyleDataRef(ret, true);
}