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