mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-10 20:08:31 +01:00
Expose ImGuiListClipper and its members (#19)
* Provide access to ImGuiListClipper members * Added ImGuiListClipper_GetDisplayStart and ImGuiListClipper_GetDisplayEnd to cimgui.h
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
# Compatible with Ubuntu 14.04.1 and Mac OS X
|
||||
|
||||
OBJS = cimgui.o
|
||||
OBJS += fontAtlas.o
|
||||
OBJS += fontAtlas.o
|
||||
OBJS += drawList.o
|
||||
OBJS += listClipper.o
|
||||
#OBJS += test.o
|
||||
OBJS += ../imgui/imgui.o
|
||||
OBJS += ../imgui/imgui_draw.o
|
||||
|
@@ -34,6 +34,7 @@ struct ImFont;
|
||||
struct ImFontConfig;
|
||||
struct ImFontAtlas;
|
||||
struct ImDrawCmd;
|
||||
struct ImGuiListClipper;
|
||||
|
||||
typedef unsigned short ImDrawIdx;
|
||||
typedef unsigned int ImU32;
|
||||
@@ -491,3 +492,10 @@ CIMGUI_API void ImDrawList_PrimWriteIdx(struct ImDrawList* list, ImD
|
||||
CIMGUI_API void ImDrawList_PrimVtx(struct ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col);
|
||||
CIMGUI_API void ImDrawList_UpdateClipRect(struct ImDrawList* list);
|
||||
CIMGUI_API void ImDrawList_UpdateTextureID(struct ImDrawList* list);
|
||||
|
||||
// ImGuiListClipper
|
||||
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* clipper, int count, float items_height);
|
||||
CIMGUI_API void ImGuiListClipper_End(ImGuiListClipper* clipper);
|
||||
CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* clipper);
|
||||
CIMGUI_API int ImGuiListClipper_GetDisplayStart(ImGuiListClipper* clipper);
|
||||
CIMGUI_API int ImGuiListClipper_GetDisplayEnd(ImGuiListClipper* clipper);
|
||||
|
27
cimgui/listClipper.cpp
Normal file
27
cimgui/listClipper.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "../imgui/imgui.h"
|
||||
#include "cimgui.h"
|
||||
|
||||
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* clipper, int count, float items_height)
|
||||
{
|
||||
clipper->Begin(count, items_height);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiListClipper_End(ImGuiListClipper* clipper)
|
||||
{
|
||||
clipper->End();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* clipper)
|
||||
{
|
||||
return clipper->Step();
|
||||
}
|
||||
|
||||
CIMGUI_API int ImGuiListClipper_GetDisplayStart(ImGuiListClipper* clipper)
|
||||
{
|
||||
return clipper->DisplayStart;
|
||||
}
|
||||
|
||||
CIMGUI_API int ImGuiListClipper_GetDisplayEnd(ImGuiListClipper* clipper)
|
||||
{
|
||||
return clipper->DisplayEnd;
|
||||
}
|
Reference in New Issue
Block a user