Ejemplo n.º 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;
}
Ejemplo n.º 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);
		}
	}
Ejemplo n.º 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;
	}
Ejemplo n.º 4
0
	void Node::SetClientRect(const ClientRect & _rect)
	{
		mClientRect = _rect;
		_needUpdate(UPDATE_RECT);
	}
Ejemplo n.º 5
0
	void Node::Move(float x, float y)
	{
		mRect.x += x, mRect.y += y;
		_needUpdate(UPDATE_RECT);
	}
Ejemplo n.º 6
0
void TextArea::setPaddingBottomRight(const Size& pad)
{
    _needUpdate(_paddingBottomRight.width() != pad.width());
    _paddingBottomRight = pad;
}
Ejemplo n.º 7
0
void TextArea::setPaddingTopLeft(const Size& pad)
{
    _needUpdate(_paddingTopLeft.width() != pad.width());
    _paddingTopLeft = pad;
}
Ejemplo n.º 8
0
void TextArea::setLineOffset(int offset)
{
    _lineOffset = offset;
    _needUpdate();
}
Ejemplo n.º 9
0
void TextArea::setWordWrap(bool wordWrap)
{
    if (_wordWrap == wordWrap) return;
    _wordWrap = wordWrap;
    _needUpdate(true);
}
Ejemplo n.º 10
0
void TextArea::setFont(Graphics::Font* font)
{
    _font = font;
    _needUpdate(true);
}
Ejemplo n.º 11
0
void TextArea::setText(const std::string& text)
{
    _text = text;
    _needUpdate(true);
}
Ejemplo n.º 12
0
void TextArea::setVerticalAlign(VerticalAlign align)
{
    if (_verticalAlign == align) return;
    _verticalAlign = align;
    _needUpdate();
}
Ejemplo n.º 13
0
void TextArea::setHorizontalAlign(HorizontalAlign align)
{
    if (_horizontalAlign == align) return;
    _horizontalAlign = align;
    _needUpdate();
}