Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
ExampleAppConsole Struct Reference
+ Collaboration diagram for ExampleAppConsole:

Public Member Functions

 ExampleAppConsole ()
 
 ~ExampleAppConsole ()
 
void ClearLog ()
 
void AddLog (const char *fmt,...) IM_FMTARGS(2)
 
void Draw (const char *title, bool *p_open)
 
void ExecCommand (const char *command_line)
 
int TextEditCallback (ImGuiInputTextCallbackData *data)
 

Static Public Member Functions

static int Stricmp (const char *s1, const char *s2)
 
static int Strnicmp (const char *s1, const char *s2, int n)
 
static char * Strdup (const char *s)
 
static void Strtrim (char *s)
 
static int TextEditCallbackStub (ImGuiInputTextCallbackData *data)
 

Public Attributes

char InputBuf [256]
 
ImVector< char * > Items
 
ImVector< const char * > Commands
 
ImVector< char * > History
 
int HistoryPos
 
ImGuiTextFilter Filter
 
bool AutoScroll
 
bool ScrollToBottom
 

Detailed Description

Constructor & Destructor Documentation

◆ ExampleAppConsole()

ExampleAppConsole::ExampleAppConsole ( )
inline
6296 {
6297 ClearLog();
6298 memset(InputBuf, 0, sizeof(InputBuf));
6299 HistoryPos = -1;
6300
6301 // "CLASSIFY" is here to provide the test case where "C"+[tab] completes to "CL" and display multiple matches.
6302 Commands.push_back("HELP");
6303 Commands.push_back("HISTORY");
6304 Commands.push_back("CLEAR");
6305 Commands.push_back("CLASSIFY");
6306 AutoScroll = true;
6307 ScrollToBottom = false;
6308 AddLog("Welcome to Dear ImGui!");
6309 }
bool AutoScroll
Definition imgui_demo.cpp:6292
ImVector< const char * > Commands
Definition imgui_demo.cpp:6288
int HistoryPos
Definition imgui_demo.cpp:6290
void ClearLog()
Definition imgui_demo.cpp:6323
bool ScrollToBottom
Definition imgui_demo.cpp:6293
void AddLog(const char *fmt,...) IM_FMTARGS(2)
Definition imgui_demo.cpp:6330
char InputBuf[256]
Definition imgui_demo.cpp:6286
void push_back(const T &v)
Definition imgui.h:1696

References AddLog(), AutoScroll, ClearLog(), Commands, HistoryPos, InputBuf, ImVector< T >::push_back(), and ScrollToBottom.

+ Here is the call graph for this function:

◆ ~ExampleAppConsole()

ExampleAppConsole::~ExampleAppConsole ( )
inline
6311 {
6312 ClearLog();
6313 for (int i = 0; i < History.Size; i++)
6314 free(History[i]);
6315 }
void free(void *)
ImVector< char * > History
Definition imgui_demo.cpp:6289
int Size
Definition imgui.h:1655

References ClearLog(), free(), History, and ImVector< T >::Size.

+ Here is the call graph for this function:

Member Function Documentation

◆ AddLog()

void ExampleAppConsole::AddLog ( const char *  fmt,
  ... 
)
inline
6331 {
6332 // FIXME-OPT
6333 char buf[1024];
6334 va_list args;
6335 va_start(args, fmt);
6336 vsnprintf(buf, IM_ARRAYSIZE(buf), fmt, args);
6337 buf[IM_ARRAYSIZE(buf)-1] = 0;
6338 va_end(args);
6339 Items.push_back(Strdup(buf));
6340 }
#define IM_ARRAYSIZE(_ARR)
Definition imgui.h:83
static char * Strdup(const char *s)
Definition imgui_demo.cpp:6320
ImVector< char * > Items
Definition imgui_demo.cpp:6287

References IM_ARRAYSIZE, Items, ImVector< T >::push_back(), and Strdup().

Referenced by ExampleAppConsole(), Draw(), ExecCommand(), and TextEditCallback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ClearLog()

void ExampleAppConsole::ClearLog ( )
inline
6324 {
6325 for (int i = 0; i < Items.Size; i++)
6326 free(Items[i]);
6327 Items.clear();
6328 }
void clear()
Definition imgui.h:1678

References ImVector< T >::clear(), free(), Items, and ImVector< T >::Size.

Referenced by ExampleAppConsole(), ~ExampleAppConsole(), Draw(), and ExecCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Draw()

void ExampleAppConsole::Draw ( const char *  title,
bool *  p_open 
)
inline
6343 {
6345 if (!ImGui::Begin(title, p_open))
6346 {
6347 ImGui::End();
6348 return;
6349 }
6350
6351 // As a specific feature guaranteed by the library, after calling Begin() the last Item represent the title bar.
6352 // So e.g. IsItemHovered() will return true when hovering the title bar.
6353 // Here we create a context menu only available from the title bar.
6355 {
6356 if (ImGui::MenuItem("Close Console"))
6357 *p_open = false;
6359 }
6360
6362 "This example implements a console with basic coloring, completion (TAB key) and history (Up/Down keys). A more elaborate "
6363 "implementation may want to store entries along with extra data such as timestamp, emitter, etc.");
6364 ImGui::TextWrapped("Enter 'HELP' for help.");
6365
6366 // TODO: display items starting from the bottom
6367
6368 if (ImGui::SmallButton("Add Debug Text")) { AddLog("%d some text", Items.Size); AddLog("some more text"); AddLog("display very important message here!"); }
6370 if (ImGui::SmallButton("Add Debug Error")) { AddLog("[error] something went wrong"); }
6372 if (ImGui::SmallButton("Clear")) { ClearLog(); }
6374 bool copy_to_clipboard = ImGui::SmallButton("Copy");
6375 //static float t = 0.0f; if (ImGui::GetTime() - t > 0.02f) { t = ImGui::GetTime(); AddLog("Spam %f", t); }
6376
6378
6379 // Options menu
6380 if (ImGui::BeginPopup("Options"))
6381 {
6382 ImGui::Checkbox("Auto-scroll", &AutoScroll);
6384 }
6385
6386 // Options, Filter
6387 if (ImGui::Button("Options"))
6388 ImGui::OpenPopup("Options");
6390 Filter.Draw("Filter (\"incl,-excl\") (\"error\")", 180);
6392
6393 // Reserve enough left-over height for 1 separator + 1 input text
6394 const float footer_height_to_reserve = ImGui::GetStyle().ItemSpacing.y + ImGui::GetFrameHeightWithSpacing();
6395 ImGui::BeginChild("ScrollingRegion", ImVec2(0, -footer_height_to_reserve), false, ImGuiWindowFlags_HorizontalScrollbar);
6397 {
6398 if (ImGui::Selectable("Clear")) ClearLog();
6400 }
6401
6402 // Display every line as a separate entry so we can change their color or add custom widgets.
6403 // If you only want raw text you can use ImGui::TextUnformatted(log.begin(), log.end());
6404 // NB- if you have thousands of entries this approach may be too inefficient and may require user-side clipping
6405 // to only process visible items. The clipper will automatically measure the height of your first item and then
6406 // "seek" to display only items in the visible area.
6407 // To use the clipper we can replace your standard loop:
6408 // for (int i = 0; i < Items.Size; i++)
6409 // With:
6410 // ImGuiListClipper clipper;
6411 // clipper.Begin(Items.Size);
6412 // while (clipper.Step())
6413 // for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++)
6414 // - That your items are evenly spaced (same height)
6415 // - That you have cheap random access to your elements (you can access them given their index,
6416 // without processing all the ones before)
6417 // You cannot this code as-is if a filter is active because it breaks the 'cheap random-access' property.
6418 // We would need random-access on the post-filtered list.
6419 // A typical application wanting coarse clipping and filtering may want to pre-compute an array of indices
6420 // or offsets of items that passed the filtering test, recomputing this array when user changes the filter,
6421 // and appending newly elements as they are inserted. This is left as a task to the user until we can manage
6422 // to improve this example code!
6423 // If your items are of variable height:
6424 // - Split them into same height items would be simpler and facilitate random-seeking into your list.
6425 // - Consider using manual call to IsRectVisible() and skipping extraneous decoration from your items.
6426 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(4, 1)); // Tighten spacing
6427 if (copy_to_clipboard)
6429 for (int i = 0; i < Items.Size; i++)
6430 {
6431 const char* item = Items[i];
6432 if (!Filter.PassFilter(item))
6433 continue;
6434
6435 // Normally you would store more information in your item than just a string.
6436 // (e.g. make Items[] an array of structure, store color/type etc.)
6437 ImVec4 color;
6438 bool has_color = false;
6439 if (strstr(item, "[error]")) { color = ImVec4(1.0f, 0.4f, 0.4f, 1.0f); has_color = true; }
6440 else if (strncmp(item, "# ", 2) == 0) { color = ImVec4(1.0f, 0.8f, 0.6f, 1.0f); has_color = true; }
6441 if (has_color)
6444 if (has_color)
6446 }
6447 if (copy_to_clipboard)
6449
6452 ScrollToBottom = false;
6453
6457
6458 // Command-line
6459 bool reclaim_focus = false;
6461 if (ImGui::InputText("Input", InputBuf, IM_ARRAYSIZE(InputBuf), input_text_flags, &TextEditCallbackStub, (void*)this))
6462 {
6463 char* s = InputBuf;
6464 Strtrim(s);
6465 if (s[0])
6466 ExecCommand(s);
6467 strcpy(s, "");
6468 reclaim_focus = true;
6469 }
6470
6471 // Auto-focus on window apparition
6473 if (reclaim_focus)
6474 ImGui::SetKeyboardFocusHere(-1); // Auto focus previous widget
6475
6476 ImGui::End();
6477 }
@ ImGuiStyleVar_ItemSpacing
Definition imgui.h:1492
@ ImGuiInputTextFlags_CallbackHistory
Definition imgui.h:963
@ ImGuiInputTextFlags_CallbackCompletion
Definition imgui.h:962
@ ImGuiInputTextFlags_EnterReturnsTrue
Definition imgui.h:961
int ImGuiInputTextFlags
Definition imgui.h:189
@ ImGuiCol_Text
Definition imgui.h:1413
@ ImGuiWindowFlags_HorizontalScrollbar
Definition imgui.h:927
@ ImGuiCond_FirstUseEver
Definition imgui.h:1617
IMGUI_API bool BeginPopup(const char *str_id, ImGuiWindowFlags flags=0)
Definition imgui.cpp:8311
IMGUI_API void PopStyleVar(int count=1)
Definition imgui.cpp:2565
IMGUI_API void Separator()
Definition imgui_widgets.cpp:1419
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
Definition imgui.cpp:7455
IMGUI_API void LogFinish()
Definition imgui.cpp:10249
IMGUI_API void SetItemDefaultFocus()
Definition imgui.cpp:6989
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
Definition imgui_widgets.cpp:715
IMGUI_API float GetScrollY()
Definition imgui.cpp:7894
IMGUI_API bool BeginPopupContextItem(const char *str_id=NULL, ImGuiPopupFlags popup_flags=1)
Definition imgui.cpp:8406
IMGUI_API void End()
Definition imgui.cpp:6366
IMGUI_API bool Checkbox(const char *label, bool *v)
Definition imgui_widgets.cpp:1071
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
Definition imgui.cpp:5722
IMGUI_API bool SmallButton(const char *label)
Definition imgui_widgets.cpp:721
IMGUI_API bool BeginChild(const char *str_id, const ImVec2 &size=ImVec2(0, 0), bool border=false, ImGuiWindowFlags flags=0)
Definition imgui.cpp:5019
IMGUI_API void LogToClipboard(int auto_open_depth=-1)
Definition imgui.cpp:10233
IMGUI_API void PushStyleColor(ImGuiCol idx, ImU32 col)
Definition imgui.cpp:2462
IMGUI_API float GetFrameHeightWithSpacing()
Definition imgui.cpp:7657
IMGUI_API void TextUnformatted(const char *text, const char *text_end=NULL)
Definition imgui_widgets.cpp:255
IMGUI_API void PopStyleColor(int count=1)
Definition imgui.cpp:2482
IMGUI_API void OpenPopup(const char *str_id, ImGuiPopupFlags popup_flags=0)
Definition imgui.cpp:8121
IMGUI_API bool MenuItem(const char *label, const char *shortcut=NULL, bool selected=false, bool enabled=true)
Definition imgui_widgets.cpp:6872
IMGUI_API void EndPopup()
Definition imgui.cpp:8357
IMGUI_API bool InputText(const char *label, char *buf, size_t buf_size, ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=NULL, void *user_data=NULL)
Definition imgui_widgets.cpp:3506
IMGUI_API void PushStyleVar(ImGuiStyleVar idx, float val)
Definition imgui.cpp:2537
IMGUI_API void SetNextWindowSize(const ImVec2 &size, ImGuiCond cond=0)
Definition imgui.cpp:6870
IMGUI_API float GetScrollMaxY()
Definition imgui.cpp:7906
IMGUI_API ImGuiStyle & GetStyle()
Definition imgui.cpp:2423
IMGUI_API void SetScrollHereY(float center_y_ratio=0.5f)
Definition imgui.cpp:7992
IMGUI_API void TextWrapped(const char *fmt,...) IM_FMTARGS(1)
Definition imgui_widgets.cpp:316
IMGUI_API void SetKeyboardFocusHere(int offset=0)
Definition imgui.cpp:6979
IMGUI_API bool BeginPopupContextWindow(const char *str_id=NULL, ImGuiPopupFlags popup_flags=1)
Definition imgui.cpp:8419
IMGUI_API void EndChild()
Definition imgui.cpp:5031
IMGUI_API bool Selectable(const char *label, bool selected=false, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0))
Definition imgui_widgets.cpp:6016
static int TextEditCallbackStub(ImGuiInputTextCallbackData *data)
Definition imgui_demo.cpp:6522
static void Strtrim(char *s)
Definition imgui_demo.cpp:6321
ImGuiTextFilter Filter
Definition imgui_demo.cpp:6291
void ExecCommand(const char *command_line)
Definition imgui_demo.cpp:6479
ImVec2 ItemSpacing
Definition imgui.h:1736
IMGUI_API bool PassFilter(const char *text, const char *text_end=NULL) const
Definition imgui.cpp:2087
IMGUI_API bool Draw(const char *label="Filter (inc,-exc)", float width=0.0f)
Definition imgui.cpp:2038
Definition imgui.h:245
float y
Definition imgui.h:246
Definition imgui.h:258

References AddLog(), AutoScroll, ImGui::Begin(), ImGui::BeginChild(), ImGui::BeginPopup(), ImGui::BeginPopupContextItem(), ImGui::BeginPopupContextWindow(), ImGui::Button(), ImGui::Checkbox(), ClearLog(), ImGuiTextFilter::Draw(), ImGui::End(), ImGui::EndChild(), ImGui::EndPopup(), ExecCommand(), Filter, ImGui::GetFrameHeightWithSpacing(), ImGui::GetScrollMaxY(), ImGui::GetScrollY(), ImGui::GetStyle(), IM_ARRAYSIZE, ImGuiCol_Text, ImGuiCond_FirstUseEver, ImGuiInputTextFlags_CallbackCompletion, ImGuiInputTextFlags_CallbackHistory, ImGuiInputTextFlags_EnterReturnsTrue, ImGuiStyleVar_ItemSpacing, ImGuiWindowFlags_HorizontalScrollbar, InputBuf, ImGui::InputText(), Items, ImGuiStyle::ItemSpacing, ImGui::LogFinish(), ImGui::LogToClipboard(), ImGui::MenuItem(), ImGui::OpenPopup(), ImGuiTextFilter::PassFilter(), ImGui::PopStyleColor(), ImGui::PopStyleVar(), ImGui::PushStyleColor(), ImGui::PushStyleVar(), ImGui::SameLine(), ScrollToBottom, ImGui::Selectable(), ImGui::Separator(), ImGui::SetItemDefaultFocus(), ImGui::SetKeyboardFocusHere(), ImGui::SetNextWindowSize(), ImGui::SetScrollHereY(), ImVector< T >::Size, ImGui::SmallButton(), Strtrim(), TextEditCallbackStub(), ImGui::TextUnformatted(), ImGui::TextWrapped(), and ImVec2::y.

Referenced by ShowExampleAppConsole().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ExecCommand()

void ExampleAppConsole::ExecCommand ( const char *  command_line)
inline
6480 {
6481 AddLog("# %s\n", command_line);
6482
6483 // Insert into history. First find match and delete it so it can be pushed to the back.
6484 // This isn't trying to be smart or optimal.
6485 HistoryPos = -1;
6486 for (int i = History.Size - 1; i >= 0; i--)
6487 if (Stricmp(History[i], command_line) == 0)
6488 {
6489 free(History[i]);
6490 History.erase(History.begin() + i);
6491 break;
6492 }
6493 History.push_back(Strdup(command_line));
6494
6495 // Process command
6496 if (Stricmp(command_line, "CLEAR") == 0)
6497 {
6498 ClearLog();
6499 }
6500 else if (Stricmp(command_line, "HELP") == 0)
6501 {
6502 AddLog("Commands:");
6503 for (int i = 0; i < Commands.Size; i++)
6504 AddLog("- %s", Commands[i]);
6505 }
6506 else if (Stricmp(command_line, "HISTORY") == 0)
6507 {
6508 int first = History.Size - 10;
6509 for (int i = first > 0 ? first : 0; i < History.Size; i++)
6510 AddLog("%3d: %s\n", i, History[i]);
6511 }
6512 else
6513 {
6514 AddLog("Unknown command: '%s'\n", command_line);
6515 }
6516
6517 // On command input, we scroll to bottom even if AutoScroll==false
6518 ScrollToBottom = true;
6519 }
static int Stricmp(const char *s1, const char *s2)
Definition imgui_demo.cpp:6318
T * erase(const T *it)
Definition imgui.h:1699
T * begin()
Definition imgui.h:1679

References AddLog(), ImVector< T >::begin(), ClearLog(), Commands, ImVector< T >::erase(), free(), History, HistoryPos, ImVector< T >::push_back(), ScrollToBottom, ImVector< T >::Size, Strdup(), and Stricmp().

Referenced by Draw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Strdup()

static char * ExampleAppConsole::Strdup ( const char *  s)
inlinestatic
6320{ IM_ASSERT(s); size_t len = strlen(s) + 1; void* buf = malloc(len); IM_ASSERT(buf); return (char*)memcpy(buf, (const void*)s, len); }
void * malloc(YYSIZE_T)
#define IM_ASSERT(_EXPR)
Definition imgui.h:81

References IM_ASSERT, and malloc().

Referenced by AddLog(), and ExecCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Stricmp()

static int ExampleAppConsole::Stricmp ( const char *  s1,
const char *  s2 
)
inlinestatic
6318{ int d; while ((d = toupper(*s2) - toupper(*s1)) == 0 && *s1) { s1++; s2++; } return d; }

Referenced by ExecCommand().

+ Here is the caller graph for this function:

◆ Strnicmp()

static int ExampleAppConsole::Strnicmp ( const char *  s1,
const char *  s2,
int  n 
)
inlinestatic
6319{ int d = 0; while (n > 0 && (d = toupper(*s2) - toupper(*s1)) == 0 && *s1) { s1++; s2++; n--; } return d; }

Referenced by TextEditCallback().

+ Here is the caller graph for this function:

◆ Strtrim()

static void ExampleAppConsole::Strtrim ( char *  s)
inlinestatic
6321{ char* str_end = s + strlen(s); while (str_end > s && str_end[-1] == ' ') str_end--; *str_end = 0; }

Referenced by Draw().

+ Here is the caller graph for this function:

◆ TextEditCallback()

int ExampleAppConsole::TextEditCallback ( ImGuiInputTextCallbackData data)
inline
6529 {
6530 //AddLog("cursor: %d, selection: %d-%d", data->CursorPos, data->SelectionStart, data->SelectionEnd);
6531 switch (data->EventFlag)
6532 {
6534 {
6535 // Example of TEXT COMPLETION
6536
6537 // Locate beginning of current word
6538 const char* word_end = data->Buf + data->CursorPos;
6539 const char* word_start = word_end;
6540 while (word_start > data->Buf)
6541 {
6542 const char c = word_start[-1];
6543 if (c == ' ' || c == '\t' || c == ',' || c == ';')
6544 break;
6545 word_start--;
6546 }
6547
6548 // Build a list of candidates
6549 ImVector<const char*> candidates;
6550 for (int i = 0; i < Commands.Size; i++)
6551 if (Strnicmp(Commands[i], word_start, (int)(word_end - word_start)) == 0)
6552 candidates.push_back(Commands[i]);
6553
6554 if (candidates.Size == 0)
6555 {
6556 // No match
6557 AddLog("No match for \"%.*s\"!\n", (int)(word_end - word_start), word_start);
6558 }
6559 else if (candidates.Size == 1)
6560 {
6561 // Single match. Delete the beginning of the word and replace it entirely so we've got nice casing.
6562 data->DeleteChars((int)(word_start - data->Buf), (int)(word_end - word_start));
6563 data->InsertChars(data->CursorPos, candidates[0]);
6564 data->InsertChars(data->CursorPos, " ");
6565 }
6566 else
6567 {
6568 // Multiple matches. Complete as much as we can..
6569 // So inputing "C"+Tab will complete to "CL" then display "CLEAR" and "CLASSIFY" as matches.
6570 int match_len = (int)(word_end - word_start);
6571 for (;;)
6572 {
6573 int c = 0;
6574 bool all_candidates_matches = true;
6575 for (int i = 0; i < candidates.Size && all_candidates_matches; i++)
6576 if (i == 0)
6577 c = toupper(candidates[i][match_len]);
6578 else if (c == 0 || c != toupper(candidates[i][match_len]))
6579 all_candidates_matches = false;
6580 if (!all_candidates_matches)
6581 break;
6582 match_len++;
6583 }
6584
6585 if (match_len > 0)
6586 {
6587 data->DeleteChars((int)(word_start - data->Buf), (int)(word_end - word_start));
6588 data->InsertChars(data->CursorPos, candidates[0], candidates[0] + match_len);
6589 }
6590
6591 // List matches
6592 AddLog("Possible matches:\n");
6593 for (int i = 0; i < candidates.Size; i++)
6594 AddLog("- %s\n", candidates[i]);
6595 }
6596
6597 break;
6598 }
6600 {
6601 // Example of HISTORY
6602 const int prev_history_pos = HistoryPos;
6603 if (data->EventKey == ImGuiKey_UpArrow)
6604 {
6605 if (HistoryPos == -1)
6606 HistoryPos = History.Size - 1;
6607 else if (HistoryPos > 0)
6608 HistoryPos--;
6609 }
6610 else if (data->EventKey == ImGuiKey_DownArrow)
6611 {
6612 if (HistoryPos != -1)
6613 if (++HistoryPos >= History.Size)
6614 HistoryPos = -1;
6615 }
6616
6617 // A better implementation would preserve the data on the current input line along with cursor position.
6618 if (prev_history_pos != HistoryPos)
6619 {
6620 const char* history_str = (HistoryPos >= 0) ? History[HistoryPos] : "";
6621 data->DeleteChars(0, data->BufTextLen);
6622 data->InsertChars(0, history_str);
6623 }
6624 }
6625 }
6626 return 0;
6627 }
@ ImGuiKey_DownArrow
Definition imgui.h:1318
@ ImGuiKey_UpArrow
Definition imgui.h:1317
constexpr auto data(C &c) -> decltype(c.data())
Definition span.hpp:195
static int Strnicmp(const char *s1, const char *s2, int n)
Definition imgui_demo.cpp:6319
Definition imgui.h:1654

References AddLog(), Commands, History, HistoryPos, ImGuiInputTextFlags_CallbackCompletion, ImGuiInputTextFlags_CallbackHistory, ImGuiKey_DownArrow, ImGuiKey_UpArrow, ImVector< T >::push_back(), ImVector< T >::Size, and Strnicmp().

Referenced by TextEditCallbackStub().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TextEditCallbackStub()

static int ExampleAppConsole::TextEditCallbackStub ( ImGuiInputTextCallbackData data)
inlinestatic
6523 {
6524 ExampleAppConsole* console = (ExampleAppConsole*)data->UserData;
6525 return console->TextEditCallback(data);
6526 }
Definition imgui_demo.cpp:6285

References TextEditCallback().

Referenced by Draw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ AutoScroll

bool ExampleAppConsole::AutoScroll

Referenced by ExampleAppConsole(), and Draw().

◆ Commands

ImVector<const char*> ExampleAppConsole::Commands

◆ Filter

ImGuiTextFilter ExampleAppConsole::Filter

Referenced by Draw().

◆ History

ImVector<char*> ExampleAppConsole::History

◆ HistoryPos

int ExampleAppConsole::HistoryPos

◆ InputBuf

char ExampleAppConsole::InputBuf[256]

Referenced by ExampleAppConsole(), and Draw().

◆ Items

ImVector<char*> ExampleAppConsole::Items

Referenced by AddLog(), ClearLog(), and Draw().

◆ ScrollToBottom

bool ExampleAppConsole::ScrollToBottom

The documentation for this struct was generated from the following file: