InputText: (Breaking change) removed ImGuiTextEditCallbackData::ReadOnly since it is a duplication of (ImGuiTextEditCallbackData::Flags & ImGuiInputTextFlags_ReadOnly) (#211)

This commit is contained in:
omar
2018-08-21 11:26:57 +02:00
parent 5942c08143
commit e6c78f9470
3 changed files with 7 additions and 7 deletions

11
imgui.h
View File

@ -1117,12 +1117,12 @@ struct ImGuiIO
void* ImeWindowHandle; // (Windows) Set this to your HWND to get automatic IME cursor positioning.
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
// [OBSOLETE] Rendering function, will be automatically called in Render(). Please call your rendering function yourself now!
// [OBSOLETE since 1.60+] Rendering function, will be automatically called in Render(). Please call your rendering function yourself now!
// You can obtain the ImDrawData* by calling ImGui::GetDrawData() after Render(). See example applications if you are unsure of how to implement this.
void (*RenderDrawListsFn)(ImDrawData* data);
#else
// This is only here to keep ImGuiIO the same size, so that IMGUI_DISABLE_OBSOLETE_FUNCTIONS can exceptionally be used outside of imconfig.h.
void* RenderDrawListsFnDummy;
void* RenderDrawListsFnUnused;
#endif
//------------------------------------------------------------------
@ -1420,7 +1420,6 @@ struct ImGuiTextEditCallbackData
ImGuiInputTextFlags EventFlag; // One of ImGuiInputTextFlags_Callback* // Read-only
ImGuiInputTextFlags Flags; // What user passed to InputText() // Read-only
void* UserData; // What user passed to InputText() // Read-only
bool ReadOnly; // Read-only mode // Read-only
// CharFilter event:
ImWchar EventChar; // Character input // Read-write (replace character or set to zero)
@ -1437,9 +1436,9 @@ struct ImGuiTextEditCallbackData
int SelectionEnd; // // Read-write
// NB: Helper functions for text manipulation. Calling those function loses selection.
IMGUI_API void DeleteChars(int pos, int bytes_count);
IMGUI_API void InsertChars(int pos, const char* text, const char* text_end = NULL);
bool HasSelection() const { return SelectionStart != SelectionEnd; }
IMGUI_API void DeleteChars(int pos, int bytes_count);
IMGUI_API void InsertChars(int pos, const char* text, const char* text_end = NULL);
bool HasSelection() const { return SelectionStart != SelectionEnd; }
};
// Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin().