Added ZLTextArea::isVisible()

This commit is contained in:
Slava Monich 2015-05-31 00:41:30 +03:00
parent 04db4057e4
commit c07daf74a5
2 changed files with 10 additions and 0 deletions

View file

@ -196,3 +196,12 @@ void ZLTextArea::paint() {
++index; ++index;
} }
} }
bool ZLTextArea::isVisible() const {
for (std::vector<ZLTextLineInfoPtr>::const_iterator it = myLineInfos.begin(); it != myLineInfos.end(); ++it) {
if ((*it)->IsVisible) {
return true;
}
}
return false;
}

View file

@ -74,6 +74,7 @@ public:
const ZLTextWordCursor &startCursor() const; const ZLTextWordCursor &startCursor() const;
const ZLTextWordCursor &endCursor() const; const ZLTextWordCursor &endCursor() const;
bool isEmpty() const; bool isEmpty() const;
bool isVisible() const;
const ZLTextElementRectangle *elementByCoordinates(int x, int y, bool absolute = true) const; const ZLTextElementRectangle *elementByCoordinates(int x, int y, bool absolute = true) const;
const ZLTextTreeNodeRectangle *treeNodeByCoordinates(int x, int y, bool absolute = true) const; const ZLTextTreeNodeRectangle *treeNodeByCoordinates(int x, int y, bool absolute = true) const;