Docs: fixed some typos (#9217)

This commit is contained in:
tanksdude
2026-02-10 07:40:52 -08:00
committed by GitHub
parent 1bcc23ef12
commit 5fe48b6a0e
12 changed files with 18 additions and 18 deletions

View File

@@ -48,7 +48,7 @@ IMGUI_IMPL_API void ImGui_ImplGlfw_InstallEmscriptenCallbacks(GLFWwindow* wi
IMGUI_IMPL_API void ImGui_ImplGlfw_InstallCallbacks(GLFWwindow* window); IMGUI_IMPL_API void ImGui_ImplGlfw_InstallCallbacks(GLFWwindow* window);
IMGUI_IMPL_API void ImGui_ImplGlfw_RestoreCallbacks(GLFWwindow* window); IMGUI_IMPL_API void ImGui_ImplGlfw_RestoreCallbacks(GLFWwindow* window);
// GFLW callbacks options: // GLFW callbacks options:
// - Set 'chain_for_all_windows=true' to enable chaining callbacks for all windows (including secondary viewports created by backends or by user) // - Set 'chain_for_all_windows=true' to enable chaining callbacks for all windows (including secondary viewports created by backends or by user)
IMGUI_IMPL_API void ImGui_ImplGlfw_SetCallbacksChainForAllWindows(bool chain_for_all_windows); IMGUI_IMPL_API void ImGui_ImplGlfw_SetCallbacksChainForAllWindows(bool chain_for_all_windows);

View File

@@ -337,7 +337,7 @@ void MyImGuiBackend_UpdateTexture(ImTextureData* tex)
{ {
// Create texture based on tex->Width, tex->Height. // Create texture based on tex->Width, tex->Height.
// - Most backends only support tex->Format == ImTextureFormat_RGBA32. // - Most backends only support tex->Format == ImTextureFormat_RGBA32.
// - Backends for particularly memory constrainted platforms may support tex->Format == ImTextureFormat_Alpha8. // - Backends for particularly memory constrained platforms may support tex->Format == ImTextureFormat_Alpha8.
// Upload all texture pixels // Upload all texture pixels
// - Read from our CPU-side copy of the texture and copy to your graphics API. // - Read from our CPU-side copy of the texture and copy to your graphics API.

View File

@@ -346,7 +346,7 @@ Other Changes:
debug/metrics window is not in the same viewport as the table. debug/metrics window is not in the same viewport as the table.
- Backends: - Backends:
- NULL: added imgui_impl_null platform/renderer backend. - NULL: added imgui_impl_null platform/renderer backend.
This is designed if you need to run e.g. context with no input or no ouput. This is designed if you need to run e.g. context with no input or no output.
- GLFW: fixed building on Linux platforms where Wayland headers - GLFW: fixed building on Linux platforms where Wayland headers
are not available. (#9024, #8969, #8921, #8920) [@jagot] are not available. (#9024, #8969, #8921, #8920) [@jagot]
- GLFW: lower minimum requirement from GLFW 3.1 to GLFW 3.0. Though - GLFW: lower minimum requirement from GLFW 3.1 to GLFW 3.0. Though
@@ -828,7 +828,7 @@ Breaking changes:
which font input is providing which glyph. which font input is providing which glyph.
- Fonts: **IMPORTANT** on Thread Safety: - Fonts: **IMPORTANT** on Thread Safety:
- A few functions such as font->CalcTextSizeA() were by sheer luck (== accidentally) - A few functions such as font->CalcTextSizeA() were by sheer luck (== accidentally)
thread-safe even thou we had never provided that guarantee before. They are thread-safe even though we had never provided that guarantee before. They are
definitively not thread-safe anymore as new glyphs may be loaded. definitively not thread-safe anymore as new glyphs may be loaded.
- Textures: - Textures:

View File

@@ -102,7 +102,7 @@ else() # Native/Desktop build
option(DAWN_FETCH_DEPENDENCIES "Use fetch_dawn_dependencies.py as an alternative to using depot_tools" ON) option(DAWN_FETCH_DEPENDENCIES "Use fetch_dawn_dependencies.py as an alternative to using depot_tools" ON)
set(DAWN_BUILD_MONOLITHIC_LIBRARY "STATIC" CACHE STRING "Build monolithic library: SHARED, STATIC, or OFF.") set(DAWN_BUILD_MONOLITHIC_LIBRARY "STATIC" CACHE STRING "Build monolithic library: SHARED, STATIC, or OFF.")
option(DAWN_USE_GLFW OFF) # disable buildin GLFW in DAWN when we use SDL2 / SDL3 option(DAWN_USE_GLFW OFF) # disable builtin GLFW in DAWN when we use SDL2 / SDL3
# Dawn builds many things by default - disable things we don't need # Dawn builds many things by default - disable things we don't need
option(DAWN_BUILD_SAMPLES "Enables building Dawn's samples" OFF) option(DAWN_BUILD_SAMPLES "Enables building Dawn's samples" OFF)

View File

@@ -89,7 +89,7 @@ Once the procedure for the specific builder is generated, the build command is *
--- ---
### CMake useful options ### CMake useful options
#### Generator types (alternative to **ninja** bulder): #### Generator types (alternative to **ninja** builder):
- `-G Ninja` to build with __ninja__ builder - `-G Ninja` to build with __ninja__ builder
- `-G "Unix Makefiles"` to build with __make__ builder - `-G "Unix Makefiles"` to build with __make__ builder
- `-G "Visual Studio 17 2022" -A x64` to create a VS 2022 solution (.sln) file, Windows only - `-G "Visual Studio 17 2022" -A x64` to create a VS 2022 solution (.sln) file, Windows only

View File

@@ -92,7 +92,7 @@ else() # Native/Desktop build
else() else()
set(IMGUI_DAWN_DIR CACHE PATH "Path to Dawn repository") set(IMGUI_DAWN_DIR CACHE PATH "Path to Dawn repository")
option(DAWN_USE_GLFW OFF) # disable buildin GLFW in DAWN when we use SDL2 / SDL3 option(DAWN_USE_GLFW OFF) # disable builtin GLFW in DAWN when we use SDL2 / SDL3
option(DAWN_FETCH_DEPENDENCIES "Use fetch_dawn_dependencies.py as an alternative to using depot_tools" ON) option(DAWN_FETCH_DEPENDENCIES "Use fetch_dawn_dependencies.py as an alternative to using depot_tools" ON)
set(DAWN_BUILD_MONOLITHIC_LIBRARY "STATIC" CACHE STRING "Build monolithic library: SHARED, STATIC, or OFF.") set(DAWN_BUILD_MONOLITHIC_LIBRARY "STATIC" CACHE STRING "Build monolithic library: SHARED, STATIC, or OFF.")

View File

@@ -89,7 +89,7 @@ Once the procedure for the specific builder is generated, the build command is *
--- ---
### CMake useful options ### CMake useful options
#### Generator types (alternative to **ninja** bulder): #### Generator types (alternative to **ninja** builder):
- `-G Ninja` to build with __ninja__ builder - `-G Ninja` to build with __ninja__ builder
- `-G "Unix Makefiles"` to build with __make__ builder - `-G "Unix Makefiles"` to build with __make__ builder
- `-G "Visual Studio 17 2022" -A x64` to create a VS 2022 solution (.sln) file, Windows only - `-G "Visual Studio 17 2022" -A x64` to create a VS 2022 solution (.sln) file, Windows only

View File

@@ -95,7 +95,7 @@ else() # Native/Desktop build
else() else()
set(IMGUI_DAWN_DIR CACHE PATH "Path to Dawn repository") set(IMGUI_DAWN_DIR CACHE PATH "Path to Dawn repository")
option(DAWN_USE_GLFW OFF) # disable buildin GLFW in DAWN when we use SDL2 / SDL3 option(DAWN_USE_GLFW OFF) # disable builtin GLFW in DAWN when we use SDL2 / SDL3
option(DAWN_FETCH_DEPENDENCIES "Use fetch_dawn_dependencies.py as an alternative to using depot_tools" ON) option(DAWN_FETCH_DEPENDENCIES "Use fetch_dawn_dependencies.py as an alternative to using depot_tools" ON)
set(DAWN_BUILD_MONOLITHIC_LIBRARY "STATIC" CACHE STRING "Build monolithic library: SHARED, STATIC, or OFF.") set(DAWN_BUILD_MONOLITHIC_LIBRARY "STATIC" CACHE STRING "Build monolithic library: SHARED, STATIC, or OFF.")

View File

@@ -89,7 +89,7 @@ Once the procedure for the specific builder is generated, the build command is *
--- ---
### CMake useful options ### CMake useful options
#### Generator types (alternative to **ninja** bulder): #### Generator types (alternative to **ninja** builder):
- `-G Ninja` to build with __ninja__ builder - `-G Ninja` to build with __ninja__ builder
- `-G "Unix Makefiles"` to build with __make__ builder - `-G "Unix Makefiles"` to build with __make__ builder
- `-G "Visual Studio 17 2022" -A x64` to create a VS 2022 solution (.sln) file, Windows only - `-G "Visual Studio 17 2022" -A x64` to create a VS 2022 solution (.sln) file, Windows only

View File

@@ -486,7 +486,7 @@ IMPLEMENTING SUPPORT for ImGuiBackendFlags_RendererHasTextures:
io.Fonts->AddFontFromFileTTF("FontAwesome4.ttf", 0.0f, &cfg2); io.Fonts->AddFontFromFileTTF("FontAwesome4.ttf", 0.0f, &cfg2);
- You can use `Metrics/Debugger->Fonts->Font->Input Glyphs Overlap Detection Tool` to see list of glyphs available in multiple font sources. This can facilitate understanding which font input is providing which glyph. - You can use `Metrics/Debugger->Fonts->Font->Input Glyphs Overlap Detection Tool` to see list of glyphs available in multiple font sources. This can facilitate understanding which font input is providing which glyph.
- Fonts: **IMPORTANT** on Thread Safety: - Fonts: **IMPORTANT** on Thread Safety:
- A few functions such as font->CalcTextSizeA() were, by sheer luck (== accidentally) thread-safe even thou we had never provided that guarantee. They are definitively not thread-safe anymore as new glyphs may be loaded. - A few functions such as font->CalcTextSizeA() were, by sheer luck (== accidentally) thread-safe even though we had never provided that guarantee. They are definitively not thread-safe anymore as new glyphs may be loaded.
- Fonts: ImFont::FontSize was removed and does not make sense anymore. ImFont::LegacySize is the size passed to AddFont(). - Fonts: ImFont::FontSize was removed and does not make sense anymore. ImFont::LegacySize is the size passed to AddFont().
- Fonts: Removed support for PushFont(NULL) which was a shortcut for "default font". - Fonts: Removed support for PushFont(NULL) which was a shortcut for "default font".
- Fonts: Renamed/moved 'io.FontGlobalScale' to 'style.FontScaleMain'. - Fonts: Renamed/moved 'io.FontGlobalScale' to 'style.FontScaleMain'.
@@ -1467,7 +1467,7 @@ ImGuiStyle::ImGuiStyle()
ColumnsMinSpacing = 6.0f; // Minimum horizontal spacing between two columns. Preferably > (FramePadding.x + 1). ColumnsMinSpacing = 6.0f; // Minimum horizontal spacing between two columns. Preferably > (FramePadding.x + 1).
ScrollbarSize = 14.0f; // Width of the vertical scrollbar, Height of the horizontal scrollbar ScrollbarSize = 14.0f; // Width of the vertical scrollbar, Height of the horizontal scrollbar
ScrollbarRounding = 9.0f; // Radius of grab corners rounding for scrollbar ScrollbarRounding = 9.0f; // Radius of grab corners rounding for scrollbar
ScrollbarPadding = 2.0f; // Padding of scrollbar grab within its frame (same for both axises) ScrollbarPadding = 2.0f; // Padding of scrollbar grab within its frame (same for both axes)
GrabMinSize = 12.0f; // Minimum width/height of a grab box for slider/scrollbar GrabMinSize = 12.0f; // Minimum width/height of a grab box for slider/scrollbar
GrabRounding = 0.0f; // Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs. GrabRounding = 0.0f; // Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
LogSliderDeadzone = 4.0f; // The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero. LogSliderDeadzone = 4.0f; // The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero.
@@ -5215,7 +5215,7 @@ void ImGui::StartMouseMovingWindow(ImGuiWindow* window)
g.MovingWindow = window; g.MovingWindow = window;
} }
// This is not 100% symetric with StartMouseMovingWindow(). // This is not 100% symmetric with StartMouseMovingWindow().
// We do NOT clear ActiveID, because: // We do NOT clear ActiveID, because:
// - It would lead to rather confusing recursive code paths. Caller can call ClearActiveID() if desired. // - It would lead to rather confusing recursive code paths. Caller can call ClearActiveID() if desired.
// - Some code intentionally cancel moving but keep the ActiveID to lock inputs (e.g. code path taken when clicking a disabled item). // - Some code intentionally cancel moving but keep the ActiveID to lock inputs (e.g. code path taken when clicking a disabled item).
@@ -5296,7 +5296,7 @@ void ImGui::UpdateMouseMovingWindowEndFrame()
StartMouseMovingWindow(hovered_window); //-V595 StartMouseMovingWindow(hovered_window); //-V595
// FIXME: In principle we might be able to call StopMouseMovingWindow() below. // FIXME: In principle we might be able to call StopMouseMovingWindow() below.
// Please note how StartMouseMovingWindow() and StopMouseMovingWindow() and not entirely symetrical, at the later doesn't clear ActiveId. // Please note how StartMouseMovingWindow() and StopMouseMovingWindow() and not entirely symmetrical, at the later doesn't clear ActiveId.
// Cancel moving if clicked outside of title bar // Cancel moving if clicked outside of title bar
if ((hovered_window->BgClickFlags & ImGuiWindowBgClickFlags_Move) == 0) // set by io.ConfigWindowsMoveFromTitleBarOnly if ((hovered_window->BgClickFlags & ImGuiWindowBgClickFlags_Move) == 0) // set by io.ConfigWindowsMoveFromTitleBarOnly
@@ -6704,7 +6704,7 @@ static ImVec2 CalcWindowAutoFitSize(ImGuiWindow* window, const ImVec2& size_cont
size_desired[ImGuiAxis_Y] = (axis_mask & 2) ? size_contents.y + size_pad.y + decoration_h_without_scrollbars : window->Size.y; size_desired[ImGuiAxis_Y] = (axis_mask & 2) ? size_contents.y + size_pad.y + decoration_h_without_scrollbars : window->Size.y;
// Determine maximum window size // Determine maximum window size
// Child windows are layed within their parent (unless they are also popups/menus) and thus have no restriction // Child windows are laid within their parent (unless they are also popups/menus) and thus have no restriction
ImVec2 size_max = ((window->Flags & ImGuiWindowFlags_ChildWindow) && !(window->Flags & ImGuiWindowFlags_Popup)) ? ImVec2(FLT_MAX, FLT_MAX) : ImGui::GetMainViewport()->WorkSize - style.DisplaySafeAreaPadding * 2.0f; ImVec2 size_max = ((window->Flags & ImGuiWindowFlags_ChildWindow) && !(window->Flags & ImGuiWindowFlags_Popup)) ? ImVec2(FLT_MAX, FLT_MAX) : ImGui::GetMainViewport()->WorkSize - style.DisplaySafeAreaPadding * 2.0f;
if (window->Flags & ImGuiWindowFlags_Tooltip) if (window->Flags & ImGuiWindowFlags_Tooltip)
@@ -8030,7 +8030,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
g.TooltipPreviousWindow = window; g.TooltipPreviousWindow = window;
// Set default BgClickFlags // Set default BgClickFlags
// This is set at the end of this function, so UpdateWindowManualResize()/ClampWindowPos() may use last-frame value if overriden by user code. // This is set at the end of this function, so UpdateWindowManualResize()/ClampWindowPos() may use last-frame value if overridden by user code.
// FIXME: The general intent is that we will later expose config options to default to enable scrolling + select scrolling mouse button. // FIXME: The general intent is that we will later expose config options to default to enable scrolling + select scrolling mouse button.
window->BgClickFlags = (flags & ImGuiWindowFlags_ChildWindow) ? parent_window->BgClickFlags : (g.IO.ConfigWindowsMoveFromTitleBarOnly ? ImGuiWindowBgClickFlags_None : ImGuiWindowBgClickFlags_Move); window->BgClickFlags = (flags & ImGuiWindowFlags_ChildWindow) ? parent_window->BgClickFlags : (g.IO.ConfigWindowsMoveFromTitleBarOnly ? ImGuiWindowBgClickFlags_None : ImGuiWindowBgClickFlags_Move);

View File

@@ -3815,7 +3815,7 @@ struct ImFontBaked
unsigned int MetricsTotalSurface:26;// 3 // out // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs) unsigned int MetricsTotalSurface:26;// 3 // out // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
unsigned int WantDestroy:1; // 0 // // Queued for destroy unsigned int WantDestroy:1; // 0 // // Queued for destroy
unsigned int LoadNoFallback:1; // 0 // // Disable loading fallback in lower-level calls. unsigned int LoadNoFallback:1; // 0 // // Disable loading fallback in lower-level calls.
unsigned int LoadNoRenderOnLayout:1;// 0 // // Enable a two-steps mode where CalcTextSize() calls will load AdvanceX *without* rendering/packing glyphs. Only advantagous if you know that the glyph is unlikely to actually be rendered, otherwise it is slower because we'd do one query on the first CalcTextSize and one query on the first Draw. unsigned int LoadNoRenderOnLayout:1;// 0 // // Enable a two-steps mode where CalcTextSize() calls will load AdvanceX *without* rendering/packing glyphs. Only advantageous if you know that the glyph is unlikely to actually be rendered, otherwise it is slower because we'd do one query on the first CalcTextSize and one query on the first Draw.
int LastUsedFrame; // 4 // // Record of that time this was bounds int LastUsedFrame; // 4 // // Record of that time this was bounds
ImGuiID BakedId; // 4 // // Unique ID for this baked storage ImGuiID BakedId; // 4 // // Unique ID for this baked storage
ImFont* OwnerFont; // 4-8 // in // Parent font ImFont* OwnerFont; // 4-8 // in // Parent font

View File

@@ -3695,7 +3695,7 @@ void ImFontAtlasFontDestroySourceData(ImFontAtlas* atlas, ImFontConfig* src)
IM_UNUSED(atlas); IM_UNUSED(atlas);
// IF YOU GET A CRASH IN THE IM_FREE() CALL HERE AND USED AddFontFromMemoryTTF(): // IF YOU GET A CRASH IN THE IM_FREE() CALL HERE AND USED AddFontFromMemoryTTF():
// - DUE TO LEGACY REASON AddFontFromMemoryTTF() TRANSFERS MEMORY OWNERSHIP BY DEFAULT. // - DUE TO LEGACY REASON AddFontFromMemoryTTF() TRANSFERS MEMORY OWNERSHIP BY DEFAULT.
// - IT WILL THEREFORE CRASH WHEN PASSED DATA WHICH MAY NOT BE FREEED BY IMGUI. // - IT WILL THEREFORE CRASH WHEN PASSED DATA WHICH MAY NOT BE FREED BY IMGUI.
// - USE `ImFontConfig font_cfg; font_cfg.FontDataOwnedByAtlas = false; io.Fonts->AddFontFromMemoryTTF(....., &cfg);` to disable passing ownership/ // - USE `ImFontConfig font_cfg; font_cfg.FontDataOwnedByAtlas = false; io.Fonts->AddFontFromMemoryTTF(....., &cfg);` to disable passing ownership/
// WE WILL ADDRESS THIS IN A FUTURE REWORK OF THE API. // WE WILL ADDRESS THIS IN A FUTURE REWORK OF THE API.
if (src->FontDataOwnedByAtlas) if (src->FontDataOwnedByAtlas)