@ -81,6 +81,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- input text: force scroll to end or scroll to a given line/contents (so user can implement a log or a search feature)
- input text: a side bar that could e.g. preview where errors are. probably left to the user to draw but we'd need to give them the info there.
- input text: a way for the user to provide syntax coloring.
- input text: Shift+TAB with ImGuiInputTextFlags_AllowTabInput could eat preceding blanks, up to tab_count.
- input text multi-line: don't directly call AddText() which does an unnecessary vertex reserve for character count prior to clipping. and/or more line-based clipping to AddText(). and/or reorganize TextUnformatted/RenderText for more efficiency for large text (e.g TextUnformatted could clip and log separately, etc).
- input text multi-line: support for cut/paste without selection (cut/paste the current line)
- input text multi-line: line numbers? status bar? (follow up on #200)
@ -165,7 +166,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- button: provide a button that looks framed. (?)
- image/image button: misalignment on padded/bordered button?
- image/image button: parameters are confusing, image() has tint_col,border_col whereas imagebutton() has bg_col/tint_col. Even thou they are different parameters ordering could be more consistent. can we fix that?
- image button: not taking an explicit id is odd.
- image button: not taking an explicit id can be problematic. (#2464, #1390)
- slider/drag: ctrl+click when format doesn't include a % character.. disable? display underlying value in default format? (see InputScalarAsWidgetReplacement)
- slider: allow using the [-]/[+] buttons used by InputFloat()/InputInt()
- slider: initial absolute click is imprecise. change to relative movement slider (same as scrollbar). (#1946)
@ -371,6 +372,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- examples: glfw: could go idle when minimized? if (glfwGetWindowAttrib(window, GLFW_ICONIFIED)) { glfwWaitEvents(); continue; } // issue: DeltaTime will be super high on resume, perhaps provide a way to let impl know (#440)
- examples: opengl: rename imgui_impl_opengl2 to impl_opengl_legacy and imgui_impl_opengl3 to imgui_impl_opengl? (#1900)
- examples: opengl: could use a single vertex buffer and glBufferSubData for uploads?
- examples: vulkan: viewport: support for synchronized swapping of multiple swap chains.
- optimization: replace vsnprintf with stb_printf? or enable the defines/infrastructure to allow it (#1038)
- optimization: add clipping for multi-component widgets (SliderFloatX, ColorEditX, etc.). one problem is that nav branch can't easily clip parent group when there is a move request.
- optimization: add a flag to disable most of rendering, for the case where the user expect to skip it (#335)
// Setup orthographic projection matrix into our constant buffer
// Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayMin is (0,0) for single viewport apps.
if(g_pFontTextureResource){g_pFontTextureResource->Release();g_pFontTextureResource=NULL;ImGui::GetIO().Fonts->TexID=NULL;}// We copied g_pFontTextureView to io.Fonts->TexID so let's clear that as well.
if(g_pFontTextureResource){g_pFontTextureResource->Release();g_pFontTextureResource=NULL;io.Fonts->TexID=NULL;}// We copied g_pFontTextureView to io.Fonts->TexID so let's clear that as well.
// At this point note that we set ImGui::GetIO().Fonts->TexID to be == g_FontTexture, so clear both.
ImGuiIO&io=ImGui::GetIO();
IM_ASSERT(g_FontTexture==io.Fonts->TexID);
if(g_FontTexture)
g_FontTexture->Release();
g_FontTexture=NULL;
io.Fonts->TexID=NULL;
if(g_pVB){g_pVB->Release();g_pVB=NULL;}
if(g_pIB){g_pIB->Release();g_pIB=NULL;}
if(g_FontTexture){g_FontTexture->Release();g_FontTexture=NULL;ImGui::GetIO().Fonts->TexID=NULL;}// We copied g_pFontTextureView to io.Fonts->TexID so let's clear that as well.
glBindSampler(0,0);// We use combined texture/sampler state. Applications using GL 3.3 may set that otherwise.
#endif
// Recreate the VAO every time (this is to easily allow multiple GL contexts to be rendered to. VAO are not shared among GL contexts)
// The renderer would actually work without any VAO bound, but then our VertexAttrib calls would overwrite the default one currently bound.
#ifndef IMGUI_IMPL_OPENGL_ES2
// Recreate the VAO every time
// (This is to easily allow multiple GL contexts. VAO are not shared among GL contexts, and we don't track creation/deletion of windows so we don't have an obvious key to use to cache them.)
GLuintvao_handle=0;
glGenVertexArrays(1,&vao_handle);
glBindVertexArray(vao_handle);
GLuintvertex_array_object=0;
glGenVertexArrays(1,&vertex_array_object);
glBindVertexArray(vertex_array_object);
#endif
// Bind vertex/index buffers and setup attributes for ImDrawVert
ImGui::Text("Chars queue:");for(inti=0;i<io.InputQueueCharacters.Size;i++){ImWcharc=io.InputQueueCharacters[i];ImGui::SameLine();ImGui::Text("\'%c\' (0x%04X)",(c>''&&c<=255)?(char)c:'?',c);}// FIXME: We should convert 'c' to UTF-8 here but the functions are not public.
#pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used
#pragma GCC diagnostic ignored "-Wdouble-promotion" // warning: implicit conversion from 'float' to 'double' when passing argument to function
#pragma GCC diagnostic ignored "-Wconversion" // warning: conversion to 'xxxx' from 'xxxx' may alter its value
#pragma GCC diagnostic ignored "-Wstack-protector" // warning: stack protector not protecting local variables: variable length buffer
#if __GNUC__ >= 8
#pragma GCC diagnostic ignored "-Wclass-memaccess" // warning: 'memset/memcpy' clearing/writing an object of type 'xxxx' with no trivial copy-assignment; use assignment or value-initialization instead
if(c>=0xE000&&c<=0xF8FF)// Filter private Unicode range. I don't imagine anybody would want to input them. GLFW on OSX seems to send private characters for special keys like arrow keys.
// Filter private Unicode range. GLFW on OSX seems to send private characters for special keys like arrow keys (FIXME)