Worldstone
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
SearchableListWidget Class Reference

An imgui ListBox associated to a search filter. More...

#include <SearchableListWidget.h>

Public Member Functions

void replaceElements (Vector< std::string > newElements)
 Replace all the elements of the list by a new one.
 
bool display ()
 Display the filter and the ListBox. More...
 
const char * getSelectedElement ()
 

Detailed Description

An imgui ListBox associated to a search filter.

Note
It will always try to fill as much space as possible vertically

Definition at line 8 of file SearchableListWidget.h.

Member Function Documentation

bool SearchableListWidget::display ( )

Display the filter and the ListBox.

Returns
true if the selected element changed
Note
If the filter is updated, it does not trigger a selection change. This is fine because you can click on the element again to trigger the change.

Definition at line 22 of file SearchableListWidget.cpp.

const char * SearchableListWidget::getSelectedElement ( )
Returns
The presently selected element. Non null if display() returned true;

Definition at line 36 of file SearchableListWidget.cpp.


The documentation for this class was generated from the following files: