Пример #1
0
void TextArea::setSize(const Size& size)
{
    if (_size == size) return;
    // width affect line composition, so we need full update
    _needUpdate(_size.width() != size.width());
    _size = size;
}
Пример #2
0
	void Node::SetRectPosition(float x, float y)
	{
		if (mRect.x != x || mRect.y != y)
		{
			mRect.x = x; mRect.y = y;
			_needUpdate(UPDATE_RECT);
		}
	}
Пример #3
0
	void Node::_notifyDetach(Node * _child)
	{
		d_assert (_child->mParent != NULL);

		if (_child->IsDockable())
			_needUpdate(UPDATE_RECT);

		int index = -1;
		for (int i = 0; i < mChildren.Size(); ++i)
		{
			if (mChildren[i] == _child)
			{
				index = i;
				break;
			}
		}

		d_assert (index != -1);

		mChildren.Erase(index);
		_child->mParent = NULL;
	}
Пример #4
0
	void Node::SetClientRect(const ClientRect & _rect)
	{
		mClientRect = _rect;
		_needUpdate(UPDATE_RECT);
	}
Пример #5
0
	void Node::Move(float x, float y)
	{
		mRect.x += x, mRect.y += y;
		_needUpdate(UPDATE_RECT);
	}
Пример #6
0
void TextArea::setPaddingBottomRight(const Size& pad)
{
    _needUpdate(_paddingBottomRight.width() != pad.width());
    _paddingBottomRight = pad;
}
Пример #7
0
void TextArea::setPaddingTopLeft(const Size& pad)
{
    _needUpdate(_paddingTopLeft.width() != pad.width());
    _paddingTopLeft = pad;
}
Пример #8
0
void TextArea::setLineOffset(int offset)
{
    _lineOffset = offset;
    _needUpdate();
}
Пример #9
0
void TextArea::setWordWrap(bool wordWrap)
{
    if (_wordWrap == wordWrap) return;
    _wordWrap = wordWrap;
    _needUpdate(true);
}
Пример #10
0
void TextArea::setFont(Graphics::Font* font)
{
    _font = font;
    _needUpdate(true);
}
Пример #11
0
void TextArea::setText(const std::string& text)
{
    _text = text;
    _needUpdate(true);
}
Пример #12
0
void TextArea::setVerticalAlign(VerticalAlign align)
{
    if (_verticalAlign == align) return;
    _verticalAlign = align;
    _needUpdate();
}
Пример #13
0
void TextArea::setHorizontalAlign(HorizontalAlign align)
{
    if (_horizontalAlign == align) return;
    _horizontalAlign = align;
    _needUpdate();
}