GUI: Add method to know if a widget contains a given widget
This commit is contained in:
parent
47d339509f
commit
91125bcbcd
8 changed files with 41 additions and 0 deletions
|
@ -101,6 +101,12 @@ ListWidget::~ListWidget() {
|
|||
delete[] _textWidth;
|
||||
}
|
||||
|
||||
bool ListWidget::containsWidget(Widget *w) const {
|
||||
if (w == _scrollBar || _scrollBar->containsWidget(w))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
Widget *ListWidget::findWidget(int x, int y) {
|
||||
if (x >= _w - _scrollBarWidth)
|
||||
return _scrollBar;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue