| e8555c89 Andy McCall | 1 | // dear imgui: wrappers for C++ standard library (STL) types (std::string, etc.) |
| 2 | |
|
| 3 | // This is also an example of how you may wrap your own similar types. |
|
| 4 | // TL;DR; this is using the ImGuiInputTextFlags_CallbackResize facility, |
|
| 5 | // which also demonstrated in 'Dear ImGui Demo->Widgets->Text Input->Resize Callback'. |
|
| 6 | |
|
| 7 | // Changelog: |
|
| 8 | // - v0.10: Initial version. Added InputText() / InputTextMultiline() calls with std::string |
|
| 9 | |
|
| 10 | // Usage: |
|
| 11 | // { |
|
| 12 | // #include "misc/cpp/imgui_stdlib.h" |
|
| 13 | // #include "misc/cpp/imgui_stdlib.cpp" // <-- If you want to include implementation without messing with your project/build. |
|
| 14 | // [...] |
|
| 15 | // std::string my_string; |
|
| 16 | // ImGui::InputText("my string", &my_string); |
|
| 17 | // } |
|
| 18 | |
|
| 19 | // See more C++ related extension (fmt, RAII, syntaxis sugar) on Wiki: |
|
| 20 | // https://github.com/ocornut/imgui/wiki/Useful-Extensions#cness |
|
| 21 | |
|
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | namespace |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | ||
| 37 | // #ifndef IMGUI_DISABLE |