mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Merge branch 'master' into viewport
# Conflicts: # imgui.cpp # imgui.h
This commit is contained in:
@ -6,8 +6,27 @@
|
||||
// #define IMGUI_DEFINE_MATH_OPERATORS
|
||||
// To implement maths operators for ImVec2 (disabled by default to not collide with using IM_VEC2_CLASS_EXTRA along with your own math types+operators)
|
||||
|
||||
/*
|
||||
|
||||
Index of this file:
|
||||
// Header mess
|
||||
// Forward declarations
|
||||
// STB libraries includes
|
||||
// Context pointer
|
||||
// Generic helpers
|
||||
// Misc data structures
|
||||
// Main imgui context
|
||||
// Tab bar, tab item
|
||||
// Internal API
|
||||
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Header mess
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef IMGUI_VERSION
|
||||
#error Must include imgui.h before imgui_internal.h
|
||||
#endif
|
||||
@ -30,7 +49,7 @@
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
// Forward declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
struct ImRect; // An axis-aligned rectangle (2 points)
|
||||
@ -68,7 +87,7 @@ typedef int ImGuiSliderFlags; // -> enum ImGuiSliderFlags_ // Flags:
|
||||
typedef int ImGuiDragFlags; // -> enum ImGuiDragFlags_ // Flags: for DragBehavior()
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// STB libraries
|
||||
// STB libraries includes
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
namespace ImGuiStb
|
||||
@ -84,7 +103,7 @@ namespace ImGuiStb
|
||||
} // namespace ImGuiStb
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Context
|
||||
// Context pointer
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef GImGui
|
||||
@ -92,7 +111,7 @@ extern IMGUI_API ImGuiContext* GImGui; // Current implicit ImGui context pointe
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Helpers
|
||||
// Generic helpers
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define IM_PI 3.14159265358979323846f
|
||||
@ -144,6 +163,7 @@ IMGUI_API int ImStricmp(const char* str1, const char* str2);
|
||||
IMGUI_API int ImStrnicmp(const char* str1, const char* str2, size_t count);
|
||||
IMGUI_API void ImStrncpy(char* dst, const char* src, size_t count);
|
||||
IMGUI_API char* ImStrdup(const char* str);
|
||||
IMGUI_API char* ImStrdupcpy(char* dst, size_t* p_dst_size, const char* str);
|
||||
IMGUI_API const char* ImStrchrRange(const char* str_begin, const char* str_end, char c);
|
||||
IMGUI_API int ImStrlenW(const ImWchar* str);
|
||||
IMGUI_API const char* ImStreolRange(const char* str, const char* str_end); // End end-of-line
|
||||
@ -242,7 +262,7 @@ struct IMGUI_API ImPool
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Types
|
||||
// Misc data structures
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
enum ImGuiButtonFlags_
|
||||
@ -336,8 +356,8 @@ enum ImGuiItemStatusFlags_
|
||||
// FIXME: this is in development, not exposed/functional as a generic feature yet.
|
||||
enum ImGuiLayoutType_
|
||||
{
|
||||
ImGuiLayoutType_Vertical,
|
||||
ImGuiLayoutType_Horizontal
|
||||
ImGuiLayoutType_Vertical = 0,
|
||||
ImGuiLayoutType_Horizontal = 1
|
||||
};
|
||||
|
||||
enum ImGuiAxis
|
||||
@ -1138,6 +1158,7 @@ struct IMGUI_API ImGuiWindow
|
||||
ImVec2 WindowPadding; // Window padding at the time of begin.
|
||||
float WindowRounding; // Window rounding at the time of begin.
|
||||
float WindowBorderSize; // Window border size at the time of begin.
|
||||
int NameBufLen; // Size of buffer storing Name. May be larger than strlen(Name)!
|
||||
ImGuiID MoveId; // == window->GetID("#MOVE")
|
||||
ImGuiID ChildId; // ID of corresponding item in parent window (for navigation to return from child window to parent window)
|
||||
ImVec2 Scroll;
|
||||
@ -1239,7 +1260,7 @@ struct ImGuiItemHoveredDataBackup
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Tab Bar, Tab Item
|
||||
// Tab bar, tab item
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
enum ImGuiTabBarFlagsPrivate_
|
||||
@ -1288,7 +1309,7 @@ struct ImGuiTabBar
|
||||
short LastTabItemIdx; // For BeginTabItem()/EndTabItem()
|
||||
|
||||
ImGuiTabBar();
|
||||
int GetTabOrder(const ImGuiTabItem* tab) const { return Tabs.index_from_pointer(tab); }
|
||||
int GetTabOrder(const ImGuiTabItem* tab) const { return Tabs.index_from_ptr(tab); }
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -1502,11 +1523,11 @@ IMGUI_API void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned ch
|
||||
// Test engine hooks (imgui-test)
|
||||
//#define IMGUI_ENABLE_TEST_ENGINE
|
||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||
extern void ImGuiTestEngineHook_PreNewFrame();
|
||||
extern void ImGuiTestEngineHook_PostNewFrame();
|
||||
extern void ImGuiTestEngineHook_ItemAdd(const ImRect& bb, ImGuiID id);
|
||||
extern void ImGuiTestEngineHook_ItemInfo(ImGuiID id, const char* label, int flags);
|
||||
#define IMGUI_TEST_ENGINE_ITEM_INFO(_ID, _LABEL, _FLAGS) ImGuiTestEngineHook_ItemInfo(_ID, _LABEL, _FLAGS) // Register status flags
|
||||
extern void ImGuiTestEngineHook_PreNewFrame(ImGuiContext* ctx);
|
||||
extern void ImGuiTestEngineHook_PostNewFrame(ImGuiContext* ctx);
|
||||
extern void ImGuiTestEngineHook_ItemAdd(ImGuiContext* ctx, const ImRect& bb, ImGuiID id);
|
||||
extern void ImGuiTestEngineHook_ItemInfo(ImGuiContext* ctx, ImGuiID id, const char* label, int flags);
|
||||
#define IMGUI_TEST_ENGINE_ITEM_INFO(_ID, _LABEL, _FLAGS) ImGuiTestEngineHook_ItemInfo(&g, _ID, _LABEL, _FLAGS) // Register status flags
|
||||
#else
|
||||
#define IMGUI_TEST_ENGINE_ITEM_INFO(_ID, _LABEL, _FLAGS) do { } while (0)
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user