Listbox: added getter to check if any row is visible
This commit is contained in:
parent
a281e16bc4
commit
9ea794e5a4
2 changed files with 12 additions and 0 deletions
|
@ -223,6 +223,16 @@ std::vector<bool> tlistbox::get_rows_shown() const
|
|||
return shown;
|
||||
}
|
||||
|
||||
bool tlistbox::any_rows_shown() const
|
||||
{
|
||||
for(size_t i = 0; i < get_item_count(); i++) {
|
||||
if(generator_->get_item_shown(i)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const tgrid* tlistbox::get_row_grid(const unsigned row) const
|
||||
{
|
||||
assert(generator_);
|
||||
|
|
|
@ -149,6 +149,8 @@ public:
|
|||
*/
|
||||
std::vector<bool> get_rows_shown() const;
|
||||
|
||||
bool any_rows_shown() const;
|
||||
|
||||
/**
|
||||
* Returns the grid of the wanted row.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue