mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-11 04:18:29 +01:00
more preparation for imgui_internal inclusion, main change replace enum with typedef enum
This commit is contained in:
120
cimgui.h
120
cimgui.h
@@ -161,8 +161,7 @@ struct ImVec4
|
|||||||
{
|
{
|
||||||
float x, y, z, w;
|
float x, y, z, w;
|
||||||
};
|
};
|
||||||
enum ImGuiWindowFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiWindowFlags_None = 0,
|
ImGuiWindowFlags_None = 0,
|
||||||
ImGuiWindowFlags_NoTitleBar = 1 << 0,
|
ImGuiWindowFlags_NoTitleBar = 1 << 0,
|
||||||
ImGuiWindowFlags_NoResize = 1 << 1,
|
ImGuiWindowFlags_NoResize = 1 << 1,
|
||||||
@@ -193,9 +192,8 @@ enum ImGuiWindowFlags_
|
|||||||
ImGuiWindowFlags_Popup = 1 << 26,
|
ImGuiWindowFlags_Popup = 1 << 26,
|
||||||
ImGuiWindowFlags_Modal = 1 << 27,
|
ImGuiWindowFlags_Modal = 1 << 27,
|
||||||
ImGuiWindowFlags_ChildMenu = 1 << 28
|
ImGuiWindowFlags_ChildMenu = 1 << 28
|
||||||
};
|
}ImGuiWindowFlags_;
|
||||||
enum ImGuiInputTextFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiInputTextFlags_None = 0,
|
ImGuiInputTextFlags_None = 0,
|
||||||
ImGuiInputTextFlags_CharsDecimal = 1 << 0,
|
ImGuiInputTextFlags_CharsDecimal = 1 << 0,
|
||||||
ImGuiInputTextFlags_CharsHexadecimal = 1 << 1,
|
ImGuiInputTextFlags_CharsHexadecimal = 1 << 1,
|
||||||
@@ -218,9 +216,8 @@ enum ImGuiInputTextFlags_
|
|||||||
ImGuiInputTextFlags_CallbackResize = 1 << 18,
|
ImGuiInputTextFlags_CallbackResize = 1 << 18,
|
||||||
ImGuiInputTextFlags_Multiline = 1 << 20,
|
ImGuiInputTextFlags_Multiline = 1 << 20,
|
||||||
ImGuiInputTextFlags_NoMarkEdited = 1 << 21
|
ImGuiInputTextFlags_NoMarkEdited = 1 << 21
|
||||||
};
|
}ImGuiInputTextFlags_;
|
||||||
enum ImGuiTreeNodeFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiTreeNodeFlags_None = 0,
|
ImGuiTreeNodeFlags_None = 0,
|
||||||
ImGuiTreeNodeFlags_Selected = 1 << 0,
|
ImGuiTreeNodeFlags_Selected = 1 << 0,
|
||||||
ImGuiTreeNodeFlags_Framed = 1 << 1,
|
ImGuiTreeNodeFlags_Framed = 1 << 1,
|
||||||
@@ -237,18 +234,16 @@ enum ImGuiTreeNodeFlags_
|
|||||||
ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12,
|
ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12,
|
||||||
ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 13,
|
ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 13,
|
||||||
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog
|
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog
|
||||||
};
|
}ImGuiTreeNodeFlags_;
|
||||||
enum ImGuiSelectableFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiSelectableFlags_None = 0,
|
ImGuiSelectableFlags_None = 0,
|
||||||
ImGuiSelectableFlags_DontClosePopups = 1 << 0,
|
ImGuiSelectableFlags_DontClosePopups = 1 << 0,
|
||||||
ImGuiSelectableFlags_SpanAllColumns = 1 << 1,
|
ImGuiSelectableFlags_SpanAllColumns = 1 << 1,
|
||||||
ImGuiSelectableFlags_AllowDoubleClick = 1 << 2,
|
ImGuiSelectableFlags_AllowDoubleClick = 1 << 2,
|
||||||
ImGuiSelectableFlags_Disabled = 1 << 3,
|
ImGuiSelectableFlags_Disabled = 1 << 3,
|
||||||
ImGuiSelectableFlags_AllowItemOverlap = 1 << 4
|
ImGuiSelectableFlags_AllowItemOverlap = 1 << 4
|
||||||
};
|
}ImGuiSelectableFlags_;
|
||||||
enum ImGuiComboFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiComboFlags_None = 0,
|
ImGuiComboFlags_None = 0,
|
||||||
ImGuiComboFlags_PopupAlignLeft = 1 << 0,
|
ImGuiComboFlags_PopupAlignLeft = 1 << 0,
|
||||||
ImGuiComboFlags_HeightSmall = 1 << 1,
|
ImGuiComboFlags_HeightSmall = 1 << 1,
|
||||||
@@ -258,9 +253,8 @@ enum ImGuiComboFlags_
|
|||||||
ImGuiComboFlags_NoArrowButton = 1 << 5,
|
ImGuiComboFlags_NoArrowButton = 1 << 5,
|
||||||
ImGuiComboFlags_NoPreview = 1 << 6,
|
ImGuiComboFlags_NoPreview = 1 << 6,
|
||||||
ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest
|
ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest
|
||||||
};
|
}ImGuiComboFlags_;
|
||||||
enum ImGuiTabBarFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiTabBarFlags_None = 0,
|
ImGuiTabBarFlags_None = 0,
|
||||||
ImGuiTabBarFlags_Reorderable = 1 << 0,
|
ImGuiTabBarFlags_Reorderable = 1 << 0,
|
||||||
ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1,
|
ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1,
|
||||||
@@ -272,25 +266,22 @@ enum ImGuiTabBarFlags_
|
|||||||
ImGuiTabBarFlags_FittingPolicyScroll = 1 << 7,
|
ImGuiTabBarFlags_FittingPolicyScroll = 1 << 7,
|
||||||
ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll,
|
ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll,
|
||||||
ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown
|
ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown
|
||||||
};
|
}ImGuiTabBarFlags_;
|
||||||
enum ImGuiTabItemFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiTabItemFlags_None = 0,
|
ImGuiTabItemFlags_None = 0,
|
||||||
ImGuiTabItemFlags_UnsavedDocument = 1 << 0,
|
ImGuiTabItemFlags_UnsavedDocument = 1 << 0,
|
||||||
ImGuiTabItemFlags_SetSelected = 1 << 1,
|
ImGuiTabItemFlags_SetSelected = 1 << 1,
|
||||||
ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2,
|
ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2,
|
||||||
ImGuiTabItemFlags_NoPushId = 1 << 3
|
ImGuiTabItemFlags_NoPushId = 1 << 3
|
||||||
};
|
}ImGuiTabItemFlags_;
|
||||||
enum ImGuiFocusedFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiFocusedFlags_None = 0,
|
ImGuiFocusedFlags_None = 0,
|
||||||
ImGuiFocusedFlags_ChildWindows = 1 << 0,
|
ImGuiFocusedFlags_ChildWindows = 1 << 0,
|
||||||
ImGuiFocusedFlags_RootWindow = 1 << 1,
|
ImGuiFocusedFlags_RootWindow = 1 << 1,
|
||||||
ImGuiFocusedFlags_AnyWindow = 1 << 2,
|
ImGuiFocusedFlags_AnyWindow = 1 << 2,
|
||||||
ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows
|
ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows
|
||||||
};
|
}ImGuiFocusedFlags_;
|
||||||
enum ImGuiHoveredFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiHoveredFlags_None = 0,
|
ImGuiHoveredFlags_None = 0,
|
||||||
ImGuiHoveredFlags_ChildWindows = 1 << 0,
|
ImGuiHoveredFlags_ChildWindows = 1 << 0,
|
||||||
ImGuiHoveredFlags_RootWindow = 1 << 1,
|
ImGuiHoveredFlags_RootWindow = 1 << 1,
|
||||||
@@ -301,9 +292,8 @@ enum ImGuiHoveredFlags_
|
|||||||
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 7,
|
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 7,
|
||||||
ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
|
ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
|
||||||
ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
|
ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
|
||||||
};
|
}ImGuiHoveredFlags_;
|
||||||
enum ImGuiDragDropFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiDragDropFlags_None = 0,
|
ImGuiDragDropFlags_None = 0,
|
||||||
ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0,
|
ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0,
|
||||||
ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1,
|
ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1,
|
||||||
@@ -315,9 +305,8 @@ enum ImGuiDragDropFlags_
|
|||||||
ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11,
|
ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11,
|
||||||
ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12,
|
ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12,
|
||||||
ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect
|
ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect
|
||||||
};
|
}ImGuiDragDropFlags_;
|
||||||
enum ImGuiDataType_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiDataType_S8,
|
ImGuiDataType_S8,
|
||||||
ImGuiDataType_U8,
|
ImGuiDataType_U8,
|
||||||
ImGuiDataType_S16,
|
ImGuiDataType_S16,
|
||||||
@@ -329,18 +318,16 @@ enum ImGuiDataType_
|
|||||||
ImGuiDataType_Float,
|
ImGuiDataType_Float,
|
||||||
ImGuiDataType_Double,
|
ImGuiDataType_Double,
|
||||||
ImGuiDataType_COUNT
|
ImGuiDataType_COUNT
|
||||||
};
|
}ImGuiDataType_;
|
||||||
enum ImGuiDir_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiDir_None = -1,
|
ImGuiDir_None = -1,
|
||||||
ImGuiDir_Left = 0,
|
ImGuiDir_Left = 0,
|
||||||
ImGuiDir_Right = 1,
|
ImGuiDir_Right = 1,
|
||||||
ImGuiDir_Up = 2,
|
ImGuiDir_Up = 2,
|
||||||
ImGuiDir_Down = 3,
|
ImGuiDir_Down = 3,
|
||||||
ImGuiDir_COUNT
|
ImGuiDir_COUNT
|
||||||
};
|
}ImGuiDir_;
|
||||||
enum ImGuiKey_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiKey_Tab,
|
ImGuiKey_Tab,
|
||||||
ImGuiKey_LeftArrow,
|
ImGuiKey_LeftArrow,
|
||||||
ImGuiKey_RightArrow,
|
ImGuiKey_RightArrow,
|
||||||
@@ -364,9 +351,8 @@ enum ImGuiKey_
|
|||||||
ImGuiKey_Y,
|
ImGuiKey_Y,
|
||||||
ImGuiKey_Z,
|
ImGuiKey_Z,
|
||||||
ImGuiKey_COUNT
|
ImGuiKey_COUNT
|
||||||
};
|
}ImGuiKey_;
|
||||||
enum ImGuiNavInput_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiNavInput_Activate,
|
ImGuiNavInput_Activate,
|
||||||
ImGuiNavInput_Cancel,
|
ImGuiNavInput_Cancel,
|
||||||
ImGuiNavInput_Input,
|
ImGuiNavInput_Input,
|
||||||
@@ -390,9 +376,8 @@ enum ImGuiNavInput_
|
|||||||
ImGuiNavInput_KeyDown_,
|
ImGuiNavInput_KeyDown_,
|
||||||
ImGuiNavInput_COUNT,
|
ImGuiNavInput_COUNT,
|
||||||
ImGuiNavInput_InternalStart_ = ImGuiNavInput_KeyMenu_
|
ImGuiNavInput_InternalStart_ = ImGuiNavInput_KeyMenu_
|
||||||
};
|
}ImGuiNavInput_;
|
||||||
enum ImGuiConfigFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiConfigFlags_None = 0,
|
ImGuiConfigFlags_None = 0,
|
||||||
ImGuiConfigFlags_NavEnableKeyboard = 1 << 0,
|
ImGuiConfigFlags_NavEnableKeyboard = 1 << 0,
|
||||||
ImGuiConfigFlags_NavEnableGamepad = 1 << 1,
|
ImGuiConfigFlags_NavEnableGamepad = 1 << 1,
|
||||||
@@ -402,17 +387,15 @@ enum ImGuiConfigFlags_
|
|||||||
ImGuiConfigFlags_NoMouseCursorChange = 1 << 5,
|
ImGuiConfigFlags_NoMouseCursorChange = 1 << 5,
|
||||||
ImGuiConfigFlags_IsSRGB = 1 << 20,
|
ImGuiConfigFlags_IsSRGB = 1 << 20,
|
||||||
ImGuiConfigFlags_IsTouchScreen = 1 << 21
|
ImGuiConfigFlags_IsTouchScreen = 1 << 21
|
||||||
};
|
}ImGuiConfigFlags_;
|
||||||
enum ImGuiBackendFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiBackendFlags_None = 0,
|
ImGuiBackendFlags_None = 0,
|
||||||
ImGuiBackendFlags_HasGamepad = 1 << 0,
|
ImGuiBackendFlags_HasGamepad = 1 << 0,
|
||||||
ImGuiBackendFlags_HasMouseCursors = 1 << 1,
|
ImGuiBackendFlags_HasMouseCursors = 1 << 1,
|
||||||
ImGuiBackendFlags_HasSetMousePos = 1 << 2,
|
ImGuiBackendFlags_HasSetMousePos = 1 << 2,
|
||||||
ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3
|
ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3
|
||||||
};
|
}ImGuiBackendFlags_;
|
||||||
enum ImGuiCol_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiCol_Text,
|
ImGuiCol_Text,
|
||||||
ImGuiCol_TextDisabled,
|
ImGuiCol_TextDisabled,
|
||||||
ImGuiCol_WindowBg,
|
ImGuiCol_WindowBg,
|
||||||
@@ -462,9 +445,8 @@ enum ImGuiCol_
|
|||||||
ImGuiCol_NavWindowingDimBg,
|
ImGuiCol_NavWindowingDimBg,
|
||||||
ImGuiCol_ModalWindowDimBg,
|
ImGuiCol_ModalWindowDimBg,
|
||||||
ImGuiCol_COUNT
|
ImGuiCol_COUNT
|
||||||
};
|
}ImGuiCol_;
|
||||||
enum ImGuiStyleVar_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiStyleVar_Alpha,
|
ImGuiStyleVar_Alpha,
|
||||||
ImGuiStyleVar_WindowPadding,
|
ImGuiStyleVar_WindowPadding,
|
||||||
ImGuiStyleVar_WindowRounding,
|
ImGuiStyleVar_WindowRounding,
|
||||||
@@ -489,9 +471,8 @@ enum ImGuiStyleVar_
|
|||||||
ImGuiStyleVar_ButtonTextAlign,
|
ImGuiStyleVar_ButtonTextAlign,
|
||||||
ImGuiStyleVar_SelectableTextAlign,
|
ImGuiStyleVar_SelectableTextAlign,
|
||||||
ImGuiStyleVar_COUNT
|
ImGuiStyleVar_COUNT
|
||||||
};
|
}ImGuiStyleVar_;
|
||||||
enum ImGuiColorEditFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiColorEditFlags_None = 0,
|
ImGuiColorEditFlags_None = 0,
|
||||||
ImGuiColorEditFlags_NoAlpha = 1 << 1,
|
ImGuiColorEditFlags_NoAlpha = 1 << 1,
|
||||||
ImGuiColorEditFlags_NoPicker = 1 << 2,
|
ImGuiColorEditFlags_NoPicker = 1 << 2,
|
||||||
@@ -520,9 +501,8 @@ enum ImGuiColorEditFlags_
|
|||||||
ImGuiColorEditFlags__DataTypeMask = ImGuiColorEditFlags_Uint8|ImGuiColorEditFlags_Float,
|
ImGuiColorEditFlags__DataTypeMask = ImGuiColorEditFlags_Uint8|ImGuiColorEditFlags_Float,
|
||||||
ImGuiColorEditFlags__PickerMask = ImGuiColorEditFlags_PickerHueWheel|ImGuiColorEditFlags_PickerHueBar,
|
ImGuiColorEditFlags__PickerMask = ImGuiColorEditFlags_PickerHueWheel|ImGuiColorEditFlags_PickerHueBar,
|
||||||
ImGuiColorEditFlags__InputMask = ImGuiColorEditFlags_InputRGB|ImGuiColorEditFlags_InputHSV
|
ImGuiColorEditFlags__InputMask = ImGuiColorEditFlags_InputRGB|ImGuiColorEditFlags_InputHSV
|
||||||
};
|
}ImGuiColorEditFlags_;
|
||||||
enum ImGuiMouseCursor_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiMouseCursor_None = -1,
|
ImGuiMouseCursor_None = -1,
|
||||||
ImGuiMouseCursor_Arrow = 0,
|
ImGuiMouseCursor_Arrow = 0,
|
||||||
ImGuiMouseCursor_TextInput,
|
ImGuiMouseCursor_TextInput,
|
||||||
@@ -533,14 +513,13 @@ enum ImGuiMouseCursor_
|
|||||||
ImGuiMouseCursor_ResizeNWSE,
|
ImGuiMouseCursor_ResizeNWSE,
|
||||||
ImGuiMouseCursor_Hand,
|
ImGuiMouseCursor_Hand,
|
||||||
ImGuiMouseCursor_COUNT
|
ImGuiMouseCursor_COUNT
|
||||||
};
|
}ImGuiMouseCursor_;
|
||||||
enum ImGuiCond_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiCond_Always = 1 << 0,
|
ImGuiCond_Always = 1 << 0,
|
||||||
ImGuiCond_Once = 1 << 1,
|
ImGuiCond_Once = 1 << 1,
|
||||||
ImGuiCond_FirstUseEver = 1 << 2,
|
ImGuiCond_FirstUseEver = 1 << 2,
|
||||||
ImGuiCond_Appearing = 1 << 3
|
ImGuiCond_Appearing = 1 << 3
|
||||||
};
|
}ImGuiCond_;
|
||||||
struct ImGuiStyle
|
struct ImGuiStyle
|
||||||
{
|
{
|
||||||
float Alpha;
|
float Alpha;
|
||||||
@@ -747,8 +726,7 @@ struct ImDrawListSplitter
|
|||||||
int _Count;
|
int _Count;
|
||||||
ImVector_ImDrawChannel _Channels;
|
ImVector_ImDrawChannel _Channels;
|
||||||
};
|
};
|
||||||
enum ImDrawCornerFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImDrawCornerFlags_None = 0,
|
ImDrawCornerFlags_None = 0,
|
||||||
ImDrawCornerFlags_TopLeft = 1 << 0,
|
ImDrawCornerFlags_TopLeft = 1 << 0,
|
||||||
ImDrawCornerFlags_TopRight = 1 << 1,
|
ImDrawCornerFlags_TopRight = 1 << 1,
|
||||||
@@ -759,14 +737,13 @@ enum ImDrawCornerFlags_
|
|||||||
ImDrawCornerFlags_Left = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotLeft,
|
ImDrawCornerFlags_Left = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotLeft,
|
||||||
ImDrawCornerFlags_Right = ImDrawCornerFlags_TopRight | ImDrawCornerFlags_BotRight,
|
ImDrawCornerFlags_Right = ImDrawCornerFlags_TopRight | ImDrawCornerFlags_BotRight,
|
||||||
ImDrawCornerFlags_All = 0xF
|
ImDrawCornerFlags_All = 0xF
|
||||||
};
|
}ImDrawCornerFlags_;
|
||||||
enum ImDrawListFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImDrawListFlags_None = 0,
|
ImDrawListFlags_None = 0,
|
||||||
ImDrawListFlags_AntiAliasedLines = 1 << 0,
|
ImDrawListFlags_AntiAliasedLines = 1 << 0,
|
||||||
ImDrawListFlags_AntiAliasedFill = 1 << 1,
|
ImDrawListFlags_AntiAliasedFill = 1 << 1,
|
||||||
ImDrawListFlags_AllowVtxOffset = 1 << 2
|
ImDrawListFlags_AllowVtxOffset = 1 << 2
|
||||||
};
|
}ImDrawListFlags_;
|
||||||
struct ImDrawList
|
struct ImDrawList
|
||||||
{
|
{
|
||||||
ImVector_ImDrawCmd CmdBuffer;
|
ImVector_ImDrawCmd CmdBuffer;
|
||||||
@@ -837,12 +814,11 @@ struct ImFontAtlasCustomRect
|
|||||||
ImVec2 GlyphOffset;
|
ImVec2 GlyphOffset;
|
||||||
ImFont* Font;
|
ImFont* Font;
|
||||||
};
|
};
|
||||||
enum ImFontAtlasFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImFontAtlasFlags_None = 0,
|
ImFontAtlasFlags_None = 0,
|
||||||
ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0,
|
ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0,
|
||||||
ImFontAtlasFlags_NoMouseCursors = 1 << 1
|
ImFontAtlasFlags_NoMouseCursors = 1 << 1
|
||||||
};
|
}ImFontAtlasFlags_;
|
||||||
struct ImFontAtlas
|
struct ImFontAtlas
|
||||||
{
|
{
|
||||||
bool Locked;
|
bool Locked;
|
||||||
|
@@ -104,7 +104,7 @@ local function strip(cad)
|
|||||||
return cad:gsub("^%s*(.-)%s*$","%1") --remove initial and final spaces
|
return cad:gsub("^%s*(.-)%s*$","%1") --remove initial and final spaces
|
||||||
end
|
end
|
||||||
local function strip_end(cad)
|
local function strip_end(cad)
|
||||||
return cad:gsub("^(.-)%s*$","%1") --remove initial and final spaces
|
return cad:gsub("^(.-)%s*$","%1") --remove final spaces
|
||||||
end
|
end
|
||||||
local function clean_spaces(cad)
|
local function clean_spaces(cad)
|
||||||
cad = strip(cad)
|
cad = strip(cad)
|
||||||
@@ -630,6 +630,7 @@ end
|
|||||||
|
|
||||||
--only basic ending
|
--only basic ending
|
||||||
local c_types = {
|
local c_types = {
|
||||||
|
["bool"]=true,
|
||||||
["char"]=true,
|
["char"]=true,
|
||||||
["int"]=true,
|
["int"]=true,
|
||||||
["float"]=true,
|
["float"]=true,
|
||||||
@@ -641,6 +642,7 @@ local c_types = {
|
|||||||
["size_t"]=true,
|
["size_t"]=true,
|
||||||
["ptrdiff_t"]=true,
|
["ptrdiff_t"]=true,
|
||||||
}
|
}
|
||||||
|
M.c_types = c_types
|
||||||
local function check_arg_detection(fdefs,typedefs)
|
local function check_arg_detection(fdefs,typedefs)
|
||||||
print"-----------------check arg detection---------------------------"
|
print"-----------------check arg detection---------------------------"
|
||||||
for k,defT in pairs(fdefs) do
|
for k,defT in pairs(fdefs) do
|
||||||
@@ -808,6 +810,7 @@ function M.Parser()
|
|||||||
--local ttype,template = it.item:match("([^%s,%(%)]+)%s*<(.+)>")
|
--local ttype,template = it.item:match("([^%s,%(%)]+)%s*<(.+)>")
|
||||||
local ttype,template = it.item:match"([^%s,%(%)]+)%s*<(.+)>"
|
local ttype,template = it.item:match"([^%s,%(%)]+)%s*<(.+)>"
|
||||||
if template then
|
if template then
|
||||||
|
--if template=="T" then print("T found in---------");print(stru) end
|
||||||
local te = template:gsub("%s","_")
|
local te = template:gsub("%s","_")
|
||||||
te = te:gsub("%*","Ptr")
|
te = te:gsub("%*","Ptr")
|
||||||
self.templates[ttype] = self.templates[ttype] or {}
|
self.templates[ttype] = self.templates[ttype] or {}
|
||||||
@@ -850,7 +853,9 @@ function M.Parser()
|
|||||||
--then structs and enums
|
--then structs and enums
|
||||||
for i,it in ipairs(itemsarr) do
|
for i,it in ipairs(itemsarr) do
|
||||||
if it.re_name == "enum_re" then
|
if it.re_name == "enum_re" then
|
||||||
table.insert(outtab,it.item)
|
local enumname, enumbody = it.item:match"^%s*enum%s+([^%s;{}]+)[%s\n\r]*(%b{})"
|
||||||
|
--print("enum is:",enumname, enumbody)
|
||||||
|
table.insert(outtab,"\ntypedef enum ".. enumbody..enumname..";")
|
||||||
elseif it.re_name == "struct_re" then
|
elseif it.re_name == "struct_re" then
|
||||||
local cleanst,structname = self:clean_struct(it.item)
|
local cleanst,structname = self:clean_struct(it.item)
|
||||||
--if not void stname or templated
|
--if not void stname or templated
|
||||||
@@ -913,11 +918,38 @@ function M.Parser()
|
|||||||
end
|
end
|
||||||
function par:gen_structs_and_enums_table()
|
function par:gen_structs_and_enums_table()
|
||||||
local outtab = {enums={},structs={}}
|
local outtab = {enums={},structs={}}
|
||||||
local outtabpre = {}
|
self.typedefs_table = {}
|
||||||
local typedefs_table = {}
|
self.vardefs = {}
|
||||||
|
|
||||||
self.inerstructs = {}
|
self.inerstructs = {}
|
||||||
self.order = {}
|
self.order = {}
|
||||||
|
|
||||||
|
--first typedefs
|
||||||
|
for i,it in ipairs(itemsarr) do
|
||||||
|
if it.re_name == "typedef_re" then --or it.re_name == "functypedef_re" or it.re_name == "vardef_re" then
|
||||||
|
local typedefdef,typedefname = it.item:match"typedef(.+)%s([^%s;]+);$"
|
||||||
|
typedefname = strip(typedefname)
|
||||||
|
self.typedefs_table[typedefname] = strip(typedefdef)
|
||||||
|
self.order[typedefname] = i
|
||||||
|
-- add typedef after struct name
|
||||||
|
-- if it.re_name == "vardef_re" and it.item:match"struct" then
|
||||||
|
-- local stname = it.item:match("struct%s*(%S+)%s*;")
|
||||||
|
-- table.insert(typedefs_table,"typedef struct "..stname.." "..stname..";\n")
|
||||||
|
-- self.typedefs_dict[stname]="struct "..stname
|
||||||
|
-- end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--vardefs
|
||||||
|
for i,it in ipairs(itemsarr) do
|
||||||
|
if it.re_name == "vardef_re" then
|
||||||
|
local stname = it.item:match"struct%s(%S+)$"
|
||||||
|
if stname then
|
||||||
|
stname = strip(stname)
|
||||||
|
self.vardefs[stname] = true
|
||||||
|
self.order[stname] = i
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
--then structs and enums
|
--then structs and enums
|
||||||
for i,it in ipairs(itemsarr) do
|
for i,it in ipairs(itemsarr) do
|
||||||
if it.re_name == "enum_re" then
|
if it.re_name == "enum_re" then
|
||||||
|
@@ -438,16 +438,20 @@ local function generate_templates(code,templates)
|
|||||||
--local te = k:gsub("%s","_")
|
--local te = k:gsub("%s","_")
|
||||||
--te = te:gsub("%*","Ptr")
|
--te = te:gsub("%*","Ptr")
|
||||||
if ttype == "ImVector" then
|
if ttype == "ImVector" then
|
||||||
for te,newte in pairs(v) do
|
for te,newte in pairs(v) do
|
||||||
table.insert(code,"typedef struct ImVector_"..newte.." {int Size;int Capacity;"..te.."* Data;} ImVector_"..newte..";\n")
|
table.insert(code,"typedef struct ImVector_"..newte.." {int Size;int Capacity;"..te.."* Data;} ImVector_"..newte..";\n")
|
||||||
end
|
end
|
||||||
|
elseif ttype == "ImPool" then
|
||||||
|
for te,newte in pairs(v) do
|
||||||
|
table.insert(code,"typedef struct ImVector_"..newte.." {int Size;int Capacity;"..te.."* Data;} ImVector_"..newte..";\n")
|
||||||
|
table.insert(code,"typedef struct ImPool_"..newte.." {ImVector_"..te.." Buf;ImGuiStorage Map;ImPoolIdx FreeIdx;} ImPool_"..newte..";\n")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--generate cimgui.cpp cimgui.h
|
--generate cimgui.cpp cimgui.h
|
||||||
local function cimgui_generation(parser)
|
local function cimgui_generation(parser)
|
||||||
cpp2ffi.prtable(parser.templates)
|
|
||||||
cpp2ffi.prtable(parser.typenames)
|
|
||||||
--[[
|
--[[
|
||||||
-- clean ImVector:contains() for not applicable types
|
-- clean ImVector:contains() for not applicable types
|
||||||
local clean_f = {}
|
local clean_f = {}
|
||||||
@@ -472,6 +476,9 @@ local function cimgui_generation(parser)
|
|||||||
local hstrfile = read_data"./cimgui_template.h"
|
local hstrfile = read_data"./cimgui_template.h"
|
||||||
|
|
||||||
local outpre,outpost = parser:gen_structs_and_enums()
|
local outpre,outpost = parser:gen_structs_and_enums()
|
||||||
|
parser.templates.ImVector.T = nil
|
||||||
|
cpp2ffi.prtable(parser.templates)
|
||||||
|
cpp2ffi.prtable(parser.typenames)
|
||||||
|
|
||||||
local outtab = {}
|
local outtab = {}
|
||||||
generate_templates(outtab,parser.templates)
|
generate_templates(outtab,parser.templates)
|
||||||
@@ -560,19 +567,42 @@ parser1:do_parse()
|
|||||||
local parser1i = parseImGuiHeader([[../imgui/imgui_internal.h]],{[[imgui_internal]],[[imstb_textedit]]})
|
local parser1i = parseImGuiHeader([[../imgui/imgui_internal.h]],{[[imgui_internal]],[[imstb_textedit]]})
|
||||||
parser1i:do_parse()
|
parser1i:do_parse()
|
||||||
local p1isten = parser1i:gen_structs_and_enums_table()
|
local p1isten = parser1i:gen_structs_and_enums_table()
|
||||||
|
--parser1i:printItems()
|
||||||
|
print"typedefs_table---------------------------"
|
||||||
|
cpp2ffi.prtable(parser1i.typedefs_table)
|
||||||
|
print"typedefs_table end---------------------------"
|
||||||
local needed = {ImGuiContext = {type = "ImGuiContext", kind = "structs", order = parser1i.order["ImGuiContext"]}}
|
local needed = {ImGuiContext = {type = "ImGuiContext", kind = "structs", order = parser1i.order["ImGuiContext"]}}
|
||||||
local function RecurseNeeded(Ini,IniKind)
|
local seen = {}
|
||||||
|
local function RecurseNeeded(Ini,IniKind,level)
|
||||||
|
--if level > 5 then return end
|
||||||
|
if seen[Ini] then return end
|
||||||
|
seen[Ini] = true
|
||||||
|
print("RecurseNeeded",Ini,IniKind,level)
|
||||||
for i,v in ipairs(p1isten[IniKind][Ini]) do
|
for i,v in ipairs(p1isten[IniKind][Ini]) do
|
||||||
local kind = p1isten.enums[v.type] and "enums" or p1isten.structs[v.type] and "structs"
|
--if not v.type then print("nil type in",Ini,IniKind) end
|
||||||
if kind then
|
--dont want pointers
|
||||||
needed[v.type] = {type = v.type, kind = kind, order = parser1i.order[v.type]}
|
local type = v.type:match"([^%*]+)"
|
||||||
RecurseNeeded(v.type,kind)
|
--ImVector out
|
||||||
|
if type:match"ImVector_" then type=type:match"ImVector_(.+)" end
|
||||||
|
|
||||||
|
local kind = p1isten.enums[type] and "enums" or p1isten.structs[type] and "structs" or nil
|
||||||
|
if kind=="structs" then
|
||||||
|
if not needed[type] then RecurseNeeded(type,kind,level+1) end
|
||||||
|
needed[type] = {type = type, kind = kind, order = parser1i.order[type]}
|
||||||
|
elseif kind=="enums" then
|
||||||
|
needed[type] = {type = type, kind = kind, order = parser1i.order[type]}
|
||||||
|
elseif parser1i.typedefs_table[type] then
|
||||||
|
needed[type] = {type = type, kind = "typedef", order = parser1i.order[type]}
|
||||||
|
elseif parser1i.vardefs[type] then
|
||||||
|
needed[type] = {type = type, kind = "vardef", order = parser1i.order[type]}
|
||||||
|
elseif not cpp2ffi.c_types[type] then
|
||||||
|
print("RecurseNeded failed",type)
|
||||||
|
--error"failed recurse"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
RecurseNeeded("ImGuiContext","structs")
|
RecurseNeeded("ImGuiContext","structs",0)
|
||||||
|
|
||||||
|
|
||||||
local ordered_needed = {}
|
local ordered_needed = {}
|
||||||
@@ -581,13 +611,15 @@ for k,v in pairs(needed) do
|
|||||||
end
|
end
|
||||||
table.sort(ordered_needed, function(a,b) return a.order < b.order end)
|
table.sort(ordered_needed, function(a,b) return a.order < b.order end)
|
||||||
|
|
||||||
|
print"needed are-----------------------"
|
||||||
for i,vv in ipairs(ordered_needed) do
|
for i,vv in ipairs(ordered_needed) do
|
||||||
print(vv.order,vv.type)
|
print(vv.order,vv.type,vv.kind)
|
||||||
local v = parser1i.itemsarr[vv.order]
|
local v = parser1i.itemsarr[vv.order]
|
||||||
|
|
||||||
if v.item:match"^[%s\n\r]*struct%s*ImGuiContext" then
|
--if v.item:match"^[%s\n\r]*struct%s*ImGuiContext" then
|
||||||
|
if vv.kind=="structs" then
|
||||||
--add enum keyword where necessary
|
--add enum keyword where necessary
|
||||||
print"setting enum keyword------------------------"
|
--print"setting enum keyword------------------------"
|
||||||
local newitem = ""
|
local newitem = ""
|
||||||
for line in v.item:gmatch("([^\n]+)") do
|
for line in v.item:gmatch("([^\n]+)") do
|
||||||
local typen = line:match"^%s*(%S+)"
|
local typen = line:match"^%s*(%S+)"
|
||||||
|
@@ -161,8 +161,7 @@ struct ImVec4
|
|||||||
{
|
{
|
||||||
float x, y, z, w;
|
float x, y, z, w;
|
||||||
};
|
};
|
||||||
enum ImGuiWindowFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiWindowFlags_None = 0,
|
ImGuiWindowFlags_None = 0,
|
||||||
ImGuiWindowFlags_NoTitleBar = 1 << 0,
|
ImGuiWindowFlags_NoTitleBar = 1 << 0,
|
||||||
ImGuiWindowFlags_NoResize = 1 << 1,
|
ImGuiWindowFlags_NoResize = 1 << 1,
|
||||||
@@ -193,9 +192,8 @@ enum ImGuiWindowFlags_
|
|||||||
ImGuiWindowFlags_Popup = 1 << 26,
|
ImGuiWindowFlags_Popup = 1 << 26,
|
||||||
ImGuiWindowFlags_Modal = 1 << 27,
|
ImGuiWindowFlags_Modal = 1 << 27,
|
||||||
ImGuiWindowFlags_ChildMenu = 1 << 28
|
ImGuiWindowFlags_ChildMenu = 1 << 28
|
||||||
};
|
}ImGuiWindowFlags_;
|
||||||
enum ImGuiInputTextFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiInputTextFlags_None = 0,
|
ImGuiInputTextFlags_None = 0,
|
||||||
ImGuiInputTextFlags_CharsDecimal = 1 << 0,
|
ImGuiInputTextFlags_CharsDecimal = 1 << 0,
|
||||||
ImGuiInputTextFlags_CharsHexadecimal = 1 << 1,
|
ImGuiInputTextFlags_CharsHexadecimal = 1 << 1,
|
||||||
@@ -218,9 +216,8 @@ enum ImGuiInputTextFlags_
|
|||||||
ImGuiInputTextFlags_CallbackResize = 1 << 18,
|
ImGuiInputTextFlags_CallbackResize = 1 << 18,
|
||||||
ImGuiInputTextFlags_Multiline = 1 << 20,
|
ImGuiInputTextFlags_Multiline = 1 << 20,
|
||||||
ImGuiInputTextFlags_NoMarkEdited = 1 << 21
|
ImGuiInputTextFlags_NoMarkEdited = 1 << 21
|
||||||
};
|
}ImGuiInputTextFlags_;
|
||||||
enum ImGuiTreeNodeFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiTreeNodeFlags_None = 0,
|
ImGuiTreeNodeFlags_None = 0,
|
||||||
ImGuiTreeNodeFlags_Selected = 1 << 0,
|
ImGuiTreeNodeFlags_Selected = 1 << 0,
|
||||||
ImGuiTreeNodeFlags_Framed = 1 << 1,
|
ImGuiTreeNodeFlags_Framed = 1 << 1,
|
||||||
@@ -237,18 +234,16 @@ enum ImGuiTreeNodeFlags_
|
|||||||
ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12,
|
ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12,
|
||||||
ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 13,
|
ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 13,
|
||||||
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog
|
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog
|
||||||
};
|
}ImGuiTreeNodeFlags_;
|
||||||
enum ImGuiSelectableFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiSelectableFlags_None = 0,
|
ImGuiSelectableFlags_None = 0,
|
||||||
ImGuiSelectableFlags_DontClosePopups = 1 << 0,
|
ImGuiSelectableFlags_DontClosePopups = 1 << 0,
|
||||||
ImGuiSelectableFlags_SpanAllColumns = 1 << 1,
|
ImGuiSelectableFlags_SpanAllColumns = 1 << 1,
|
||||||
ImGuiSelectableFlags_AllowDoubleClick = 1 << 2,
|
ImGuiSelectableFlags_AllowDoubleClick = 1 << 2,
|
||||||
ImGuiSelectableFlags_Disabled = 1 << 3,
|
ImGuiSelectableFlags_Disabled = 1 << 3,
|
||||||
ImGuiSelectableFlags_AllowItemOverlap = 1 << 4
|
ImGuiSelectableFlags_AllowItemOverlap = 1 << 4
|
||||||
};
|
}ImGuiSelectableFlags_;
|
||||||
enum ImGuiComboFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiComboFlags_None = 0,
|
ImGuiComboFlags_None = 0,
|
||||||
ImGuiComboFlags_PopupAlignLeft = 1 << 0,
|
ImGuiComboFlags_PopupAlignLeft = 1 << 0,
|
||||||
ImGuiComboFlags_HeightSmall = 1 << 1,
|
ImGuiComboFlags_HeightSmall = 1 << 1,
|
||||||
@@ -258,9 +253,8 @@ enum ImGuiComboFlags_
|
|||||||
ImGuiComboFlags_NoArrowButton = 1 << 5,
|
ImGuiComboFlags_NoArrowButton = 1 << 5,
|
||||||
ImGuiComboFlags_NoPreview = 1 << 6,
|
ImGuiComboFlags_NoPreview = 1 << 6,
|
||||||
ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest
|
ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest
|
||||||
};
|
}ImGuiComboFlags_;
|
||||||
enum ImGuiTabBarFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiTabBarFlags_None = 0,
|
ImGuiTabBarFlags_None = 0,
|
||||||
ImGuiTabBarFlags_Reorderable = 1 << 0,
|
ImGuiTabBarFlags_Reorderable = 1 << 0,
|
||||||
ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1,
|
ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1,
|
||||||
@@ -272,25 +266,22 @@ enum ImGuiTabBarFlags_
|
|||||||
ImGuiTabBarFlags_FittingPolicyScroll = 1 << 7,
|
ImGuiTabBarFlags_FittingPolicyScroll = 1 << 7,
|
||||||
ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll,
|
ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll,
|
||||||
ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown
|
ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown
|
||||||
};
|
}ImGuiTabBarFlags_;
|
||||||
enum ImGuiTabItemFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiTabItemFlags_None = 0,
|
ImGuiTabItemFlags_None = 0,
|
||||||
ImGuiTabItemFlags_UnsavedDocument = 1 << 0,
|
ImGuiTabItemFlags_UnsavedDocument = 1 << 0,
|
||||||
ImGuiTabItemFlags_SetSelected = 1 << 1,
|
ImGuiTabItemFlags_SetSelected = 1 << 1,
|
||||||
ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2,
|
ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2,
|
||||||
ImGuiTabItemFlags_NoPushId = 1 << 3
|
ImGuiTabItemFlags_NoPushId = 1 << 3
|
||||||
};
|
}ImGuiTabItemFlags_;
|
||||||
enum ImGuiFocusedFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiFocusedFlags_None = 0,
|
ImGuiFocusedFlags_None = 0,
|
||||||
ImGuiFocusedFlags_ChildWindows = 1 << 0,
|
ImGuiFocusedFlags_ChildWindows = 1 << 0,
|
||||||
ImGuiFocusedFlags_RootWindow = 1 << 1,
|
ImGuiFocusedFlags_RootWindow = 1 << 1,
|
||||||
ImGuiFocusedFlags_AnyWindow = 1 << 2,
|
ImGuiFocusedFlags_AnyWindow = 1 << 2,
|
||||||
ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows
|
ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows
|
||||||
};
|
}ImGuiFocusedFlags_;
|
||||||
enum ImGuiHoveredFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiHoveredFlags_None = 0,
|
ImGuiHoveredFlags_None = 0,
|
||||||
ImGuiHoveredFlags_ChildWindows = 1 << 0,
|
ImGuiHoveredFlags_ChildWindows = 1 << 0,
|
||||||
ImGuiHoveredFlags_RootWindow = 1 << 1,
|
ImGuiHoveredFlags_RootWindow = 1 << 1,
|
||||||
@@ -301,9 +292,8 @@ enum ImGuiHoveredFlags_
|
|||||||
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 7,
|
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 7,
|
||||||
ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
|
ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
|
||||||
ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
|
ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
|
||||||
};
|
}ImGuiHoveredFlags_;
|
||||||
enum ImGuiDragDropFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiDragDropFlags_None = 0,
|
ImGuiDragDropFlags_None = 0,
|
||||||
ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0,
|
ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0,
|
||||||
ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1,
|
ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1,
|
||||||
@@ -315,9 +305,8 @@ enum ImGuiDragDropFlags_
|
|||||||
ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11,
|
ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11,
|
||||||
ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12,
|
ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12,
|
||||||
ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect
|
ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect
|
||||||
};
|
}ImGuiDragDropFlags_;
|
||||||
enum ImGuiDataType_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiDataType_S8,
|
ImGuiDataType_S8,
|
||||||
ImGuiDataType_U8,
|
ImGuiDataType_U8,
|
||||||
ImGuiDataType_S16,
|
ImGuiDataType_S16,
|
||||||
@@ -329,18 +318,16 @@ enum ImGuiDataType_
|
|||||||
ImGuiDataType_Float,
|
ImGuiDataType_Float,
|
||||||
ImGuiDataType_Double,
|
ImGuiDataType_Double,
|
||||||
ImGuiDataType_COUNT
|
ImGuiDataType_COUNT
|
||||||
};
|
}ImGuiDataType_;
|
||||||
enum ImGuiDir_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiDir_None = -1,
|
ImGuiDir_None = -1,
|
||||||
ImGuiDir_Left = 0,
|
ImGuiDir_Left = 0,
|
||||||
ImGuiDir_Right = 1,
|
ImGuiDir_Right = 1,
|
||||||
ImGuiDir_Up = 2,
|
ImGuiDir_Up = 2,
|
||||||
ImGuiDir_Down = 3,
|
ImGuiDir_Down = 3,
|
||||||
ImGuiDir_COUNT
|
ImGuiDir_COUNT
|
||||||
};
|
}ImGuiDir_;
|
||||||
enum ImGuiKey_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiKey_Tab,
|
ImGuiKey_Tab,
|
||||||
ImGuiKey_LeftArrow,
|
ImGuiKey_LeftArrow,
|
||||||
ImGuiKey_RightArrow,
|
ImGuiKey_RightArrow,
|
||||||
@@ -364,9 +351,8 @@ enum ImGuiKey_
|
|||||||
ImGuiKey_Y,
|
ImGuiKey_Y,
|
||||||
ImGuiKey_Z,
|
ImGuiKey_Z,
|
||||||
ImGuiKey_COUNT
|
ImGuiKey_COUNT
|
||||||
};
|
}ImGuiKey_;
|
||||||
enum ImGuiNavInput_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiNavInput_Activate,
|
ImGuiNavInput_Activate,
|
||||||
ImGuiNavInput_Cancel,
|
ImGuiNavInput_Cancel,
|
||||||
ImGuiNavInput_Input,
|
ImGuiNavInput_Input,
|
||||||
@@ -390,9 +376,8 @@ enum ImGuiNavInput_
|
|||||||
ImGuiNavInput_KeyDown_,
|
ImGuiNavInput_KeyDown_,
|
||||||
ImGuiNavInput_COUNT,
|
ImGuiNavInput_COUNT,
|
||||||
ImGuiNavInput_InternalStart_ = ImGuiNavInput_KeyMenu_
|
ImGuiNavInput_InternalStart_ = ImGuiNavInput_KeyMenu_
|
||||||
};
|
}ImGuiNavInput_;
|
||||||
enum ImGuiConfigFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiConfigFlags_None = 0,
|
ImGuiConfigFlags_None = 0,
|
||||||
ImGuiConfigFlags_NavEnableKeyboard = 1 << 0,
|
ImGuiConfigFlags_NavEnableKeyboard = 1 << 0,
|
||||||
ImGuiConfigFlags_NavEnableGamepad = 1 << 1,
|
ImGuiConfigFlags_NavEnableGamepad = 1 << 1,
|
||||||
@@ -402,17 +387,15 @@ enum ImGuiConfigFlags_
|
|||||||
ImGuiConfigFlags_NoMouseCursorChange = 1 << 5,
|
ImGuiConfigFlags_NoMouseCursorChange = 1 << 5,
|
||||||
ImGuiConfigFlags_IsSRGB = 1 << 20,
|
ImGuiConfigFlags_IsSRGB = 1 << 20,
|
||||||
ImGuiConfigFlags_IsTouchScreen = 1 << 21
|
ImGuiConfigFlags_IsTouchScreen = 1 << 21
|
||||||
};
|
}ImGuiConfigFlags_;
|
||||||
enum ImGuiBackendFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiBackendFlags_None = 0,
|
ImGuiBackendFlags_None = 0,
|
||||||
ImGuiBackendFlags_HasGamepad = 1 << 0,
|
ImGuiBackendFlags_HasGamepad = 1 << 0,
|
||||||
ImGuiBackendFlags_HasMouseCursors = 1 << 1,
|
ImGuiBackendFlags_HasMouseCursors = 1 << 1,
|
||||||
ImGuiBackendFlags_HasSetMousePos = 1 << 2,
|
ImGuiBackendFlags_HasSetMousePos = 1 << 2,
|
||||||
ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3
|
ImGuiBackendFlags_RendererHasVtxOffset = 1 << 3
|
||||||
};
|
}ImGuiBackendFlags_;
|
||||||
enum ImGuiCol_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiCol_Text,
|
ImGuiCol_Text,
|
||||||
ImGuiCol_TextDisabled,
|
ImGuiCol_TextDisabled,
|
||||||
ImGuiCol_WindowBg,
|
ImGuiCol_WindowBg,
|
||||||
@@ -462,9 +445,8 @@ enum ImGuiCol_
|
|||||||
ImGuiCol_NavWindowingDimBg,
|
ImGuiCol_NavWindowingDimBg,
|
||||||
ImGuiCol_ModalWindowDimBg,
|
ImGuiCol_ModalWindowDimBg,
|
||||||
ImGuiCol_COUNT
|
ImGuiCol_COUNT
|
||||||
};
|
}ImGuiCol_;
|
||||||
enum ImGuiStyleVar_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiStyleVar_Alpha,
|
ImGuiStyleVar_Alpha,
|
||||||
ImGuiStyleVar_WindowPadding,
|
ImGuiStyleVar_WindowPadding,
|
||||||
ImGuiStyleVar_WindowRounding,
|
ImGuiStyleVar_WindowRounding,
|
||||||
@@ -489,9 +471,8 @@ enum ImGuiStyleVar_
|
|||||||
ImGuiStyleVar_ButtonTextAlign,
|
ImGuiStyleVar_ButtonTextAlign,
|
||||||
ImGuiStyleVar_SelectableTextAlign,
|
ImGuiStyleVar_SelectableTextAlign,
|
||||||
ImGuiStyleVar_COUNT
|
ImGuiStyleVar_COUNT
|
||||||
};
|
}ImGuiStyleVar_;
|
||||||
enum ImGuiColorEditFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiColorEditFlags_None = 0,
|
ImGuiColorEditFlags_None = 0,
|
||||||
ImGuiColorEditFlags_NoAlpha = 1 << 1,
|
ImGuiColorEditFlags_NoAlpha = 1 << 1,
|
||||||
ImGuiColorEditFlags_NoPicker = 1 << 2,
|
ImGuiColorEditFlags_NoPicker = 1 << 2,
|
||||||
@@ -520,9 +501,8 @@ enum ImGuiColorEditFlags_
|
|||||||
ImGuiColorEditFlags__DataTypeMask = ImGuiColorEditFlags_Uint8|ImGuiColorEditFlags_Float,
|
ImGuiColorEditFlags__DataTypeMask = ImGuiColorEditFlags_Uint8|ImGuiColorEditFlags_Float,
|
||||||
ImGuiColorEditFlags__PickerMask = ImGuiColorEditFlags_PickerHueWheel|ImGuiColorEditFlags_PickerHueBar,
|
ImGuiColorEditFlags__PickerMask = ImGuiColorEditFlags_PickerHueWheel|ImGuiColorEditFlags_PickerHueBar,
|
||||||
ImGuiColorEditFlags__InputMask = ImGuiColorEditFlags_InputRGB|ImGuiColorEditFlags_InputHSV
|
ImGuiColorEditFlags__InputMask = ImGuiColorEditFlags_InputRGB|ImGuiColorEditFlags_InputHSV
|
||||||
};
|
}ImGuiColorEditFlags_;
|
||||||
enum ImGuiMouseCursor_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiMouseCursor_None = -1,
|
ImGuiMouseCursor_None = -1,
|
||||||
ImGuiMouseCursor_Arrow = 0,
|
ImGuiMouseCursor_Arrow = 0,
|
||||||
ImGuiMouseCursor_TextInput,
|
ImGuiMouseCursor_TextInput,
|
||||||
@@ -533,14 +513,13 @@ enum ImGuiMouseCursor_
|
|||||||
ImGuiMouseCursor_ResizeNWSE,
|
ImGuiMouseCursor_ResizeNWSE,
|
||||||
ImGuiMouseCursor_Hand,
|
ImGuiMouseCursor_Hand,
|
||||||
ImGuiMouseCursor_COUNT
|
ImGuiMouseCursor_COUNT
|
||||||
};
|
}ImGuiMouseCursor_;
|
||||||
enum ImGuiCond_
|
typedef enum {
|
||||||
{
|
|
||||||
ImGuiCond_Always = 1 << 0,
|
ImGuiCond_Always = 1 << 0,
|
||||||
ImGuiCond_Once = 1 << 1,
|
ImGuiCond_Once = 1 << 1,
|
||||||
ImGuiCond_FirstUseEver = 1 << 2,
|
ImGuiCond_FirstUseEver = 1 << 2,
|
||||||
ImGuiCond_Appearing = 1 << 3
|
ImGuiCond_Appearing = 1 << 3
|
||||||
};
|
}ImGuiCond_;
|
||||||
struct ImGuiStyle
|
struct ImGuiStyle
|
||||||
{
|
{
|
||||||
float Alpha;
|
float Alpha;
|
||||||
@@ -747,8 +726,7 @@ struct ImDrawListSplitter
|
|||||||
int _Count;
|
int _Count;
|
||||||
ImVector_ImDrawChannel _Channels;
|
ImVector_ImDrawChannel _Channels;
|
||||||
};
|
};
|
||||||
enum ImDrawCornerFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImDrawCornerFlags_None = 0,
|
ImDrawCornerFlags_None = 0,
|
||||||
ImDrawCornerFlags_TopLeft = 1 << 0,
|
ImDrawCornerFlags_TopLeft = 1 << 0,
|
||||||
ImDrawCornerFlags_TopRight = 1 << 1,
|
ImDrawCornerFlags_TopRight = 1 << 1,
|
||||||
@@ -759,14 +737,13 @@ enum ImDrawCornerFlags_
|
|||||||
ImDrawCornerFlags_Left = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotLeft,
|
ImDrawCornerFlags_Left = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotLeft,
|
||||||
ImDrawCornerFlags_Right = ImDrawCornerFlags_TopRight | ImDrawCornerFlags_BotRight,
|
ImDrawCornerFlags_Right = ImDrawCornerFlags_TopRight | ImDrawCornerFlags_BotRight,
|
||||||
ImDrawCornerFlags_All = 0xF
|
ImDrawCornerFlags_All = 0xF
|
||||||
};
|
}ImDrawCornerFlags_;
|
||||||
enum ImDrawListFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImDrawListFlags_None = 0,
|
ImDrawListFlags_None = 0,
|
||||||
ImDrawListFlags_AntiAliasedLines = 1 << 0,
|
ImDrawListFlags_AntiAliasedLines = 1 << 0,
|
||||||
ImDrawListFlags_AntiAliasedFill = 1 << 1,
|
ImDrawListFlags_AntiAliasedFill = 1 << 1,
|
||||||
ImDrawListFlags_AllowVtxOffset = 1 << 2
|
ImDrawListFlags_AllowVtxOffset = 1 << 2
|
||||||
};
|
}ImDrawListFlags_;
|
||||||
struct ImDrawList
|
struct ImDrawList
|
||||||
{
|
{
|
||||||
ImVector_ImDrawCmd CmdBuffer;
|
ImVector_ImDrawCmd CmdBuffer;
|
||||||
@@ -837,12 +814,11 @@ struct ImFontAtlasCustomRect
|
|||||||
ImVec2 GlyphOffset;
|
ImVec2 GlyphOffset;
|
||||||
ImFont* Font;
|
ImFont* Font;
|
||||||
};
|
};
|
||||||
enum ImFontAtlasFlags_
|
typedef enum {
|
||||||
{
|
|
||||||
ImFontAtlasFlags_None = 0,
|
ImFontAtlasFlags_None = 0,
|
||||||
ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0,
|
ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0,
|
||||||
ImFontAtlasFlags_NoMouseCursors = 1 << 1
|
ImFontAtlasFlags_NoMouseCursors = 1 << 1
|
||||||
};
|
}ImFontAtlasFlags_;
|
||||||
struct ImFontAtlas
|
struct ImFontAtlas
|
||||||
{
|
{
|
||||||
bool Locked;
|
bool Locked;
|
||||||
|
Reference in New Issue
Block a user