@ -178,7 +178,20 @@ Rectangles provided by Dear ImGui are defined as
`(x1=left,y1=top,x2=right,y2=bottom)`
and **NOT** as
`(x1,y1,width,height)`.
Refer to rendering backends in the [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder for references of how to handle the `ClipRect` field.
Refer to rendering backends in the [backends/](https://github.com/ocornut/imgui/tree/master/backends) folder for references of how to handle the `ClipRect` field.
For example, the [DirectX11 backend](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_dx11.cpp) does this:
```cpp
// Project scissor/clipping rectangles into framebuffer space
// Another overly complex function until we reorganize everything into a nice all-in-one helper.
// This is made more complex because we have dissociated the layout rectangle (pos_min..pos_max) which define _where_ the ellipsis is, from actual clipping of text and limit of the ellipsis display.
// This is because in the context of tabs we selectively hide part of the text when the Close Button appears, but we don't want the ellipsis to move.
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345')
#define IMGUI_VERSION "1.89.2"
#define IMGUI_VERSION_NUM 18920
#define IMGUI_VERSION "1.89.3 WIP"
#define IMGUI_VERSION_NUM 18923
#define IMGUI_HAS_TABLE
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
#define IMGUI_HAS_DOCK // Docking WIP branch
@ -2971,8 +2971,10 @@ struct ImFont
constImFontConfig*ConfigData;// 4-8 // in // // Pointer within ContainerAtlas->ConfigData
shortConfigDataCount;// 2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
ImWcharFallbackChar;// 2 // out // = FFFD/'?' // Character used if a glyph isn't found.
ImWcharEllipsisChar;// 2 // out // = '...' // Character used for ellipsis rendering.
ImWcharDotChar;// 2 // out // = '.' // Character used for ellipsis rendering (if a single '...' character isn't found)
ImWcharEllipsisChar;// 2 // out // = '...'/'.'// Character used for ellipsis rendering.
shortEllipsisCharCount;// 1 // out // 1 or 3
floatEllipsisWidth;// 4 // out // Width
floatEllipsisCharStep;// 4 // out // Step between characters when EllipsisCount > 0
boolDirtyLookupTables;// 1 // out //
floatScale;// 4 // in // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
floatAscent,Descent;// 4+4 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
#define IM_BITARRAY_TESTBIT(_ARRAY, _N) ((_ARRAY[(_N) >> 5] & ((ImU32)1 << ((_N) & 31))) != 0) // Macro version of ImBitArrayTestBit(): ensure args have side-effect or are costly!
#define IM_BITARRAY_CLEARBIT(_ARRAY, _N) ((_ARRAY[(_N) >> 5] &= ~((ImU32)1 << ((_N) & 31)))) // Macro version of ImBitArrayClearBit(): ensure args have side-effect or are costly!
voidSetBitRange(intn,intn2){n+=OFFSET;n2+=OFFSET;IM_ASSERT(n>=0&&n<BITCOUNT&&n2>n&&n2<=BITCOUNT);ImBitArraySetBitRange(Storage,n,n2);}// Works on range [n..n2)
#define IM_COL32_DISABLE IM_COL32(0,0,0,1) // Special sentinel code which cannot be used as a regular color.
#define IMGUI_TABLE_MAX_COLUMNS 64 // sizeof(ImU64) * 8. This is solely because we frequently encode columns set in a ImU64.
#define IMGUI_TABLE_MAX_DRAW_CHANNELS (4 + 64 * 2) // See TableSetupDrawChannels()
#define IMGUI_TABLE_MAX_COLUMNS 512 // May be further lifted
// Our current column maximum is 64 but we may raise that in the future.
typedefImS8ImGuiTableColumnIdx;
typedefImU8ImGuiTableDrawChannelIdx;
typedefImS16ImGuiTableColumnIdx;
typedefImU16ImGuiTableDrawChannelIdx;
// [Internal] sizeof() ~ 104
// We use the terminology "Enabled" to refer to a column that is not Hidden by user/api.
@ -2768,10 +2773,9 @@ struct IMGUI_API ImGuiTable
ImSpan<ImGuiTableColumn>Columns;// Point within RawData[]
ImSpan<ImGuiTableColumnIdx>DisplayOrderToIndex;// Point within RawData[]. Store display order of columns (when not reordered, the values are 0...Count-1)
ImSpan<ImGuiTableCellData>RowCellData;// Point within RawData[]. Store cells background requests for current row.
ImU64EnabledMaskByIndex;// Column Index -> IsEnabled map (== not hidden by user/api) in a format adequate for iterating column without touching cold data
ImU64VisibleMaskByIndex;// Column Index -> IsVisibleX|IsVisibleY map (== not hidden by user/api && not hidden by scrolling/cliprect)
ImU64RequestOutputMaskByIndex;// Column Index -> IsVisible || AutoFit (== expect user to submit items)
ImBitArrayPtrEnabledMaskByIndex;// Column Index -> IsEnabled map (== not hidden by user/api) in a format adequate for iterating column without touching cold data
ImBitArrayPtrVisibleMaskByIndex;// Column Index -> IsVisibleX|IsVisibleY map (== not hidden by user/api && not hidden by scrolling/cliprect)
ImGuiTableFlagsSettingsLoadedFlags;// Which data were loaded from the .ini file (e.g. when order is not altered we won't save order)