25class ImGuiInputTextCallbackData;
51 ChatBox(std::string title =
"JeVois-Pro ChatBox");
66 void freeze(
bool doit, std::string
const & waitmsg);
75 std::deque<std::pair<
bool , std::string> >
itsData;
86 int callback(ImGuiInputTextCallbackData * data);
A simple helper class for a chat box rendered in ImGui.
void freeze(bool doit, std::string const &waitmsg)
Freeze/unfreeze the input box, typically to prevent new inputs until current reply is done.
void draw()
Render into an ImGui window.
std::string get()
Get input string from user, or empty if no new input.
bool wasCleared()
Returns true once after the user clicked the "Clear chat" button.
virtual ~ChatBox()
Destructor.
int callback(ImGuiInputTextCallbackData *data)
void writeString(std::string const &out)
Update text that is displayed above input box (output from the underlying chat bot)
std::string const itsTitle
std::vector< std::string > itsHistory
void clear()
Clear all displayed text:
std::deque< std::pair< bool, std::string > > itsData
Main namespace for all JeVois classes and functions.