mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-04 07:01:04 +01:00 
			
		
		
		
	Merge branch 'master' into viewport
# Conflicts: # examples/allegro5_example/main.cpp # examples/directx10_example/main.cpp # examples/directx11_example/main.cpp # examples/directx12_example/main.cpp # examples/directx9_example/main.cpp # examples/imgui_impl_dx10.cpp # examples/imgui_impl_dx11.cpp # examples/imgui_impl_dx12.cpp # examples/imgui_impl_dx9.cpp # examples/imgui_impl_glfw.h # examples/imgui_impl_vulkan.cpp # examples/opengl2_example/imgui_impl_glfw_gl2.cpp # examples/opengl2_example/main.cpp # examples/opengl3_example/imgui_impl_glfw_gl3.cpp # examples/opengl3_example/main.cpp # examples/sdl_opengl2_example/imgui_impl_sdl_gl2.cpp # examples/sdl_opengl2_example/main.cpp # examples/sdl_opengl3_example/imgui_impl_sdl_gl3.cpp # examples/sdl_opengl3_example/main.cpp # examples/vulkan_example/main.cpp # imgui.cpp # imgui.h
This commit is contained in:
		
							
								
								
									
										43
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										43
									
								
								imgui.h
									
									
									
									
									
								
							@@ -76,12 +76,16 @@ struct ImGuiPayload;                // User data payload for drag and drop opera
 | 
			
		||||
struct ImGuiViewport;               // Viewport (generally ~1 per window to output to at the OS level. Need per-platform support to use multiple viewports)
 | 
			
		||||
struct ImGuiContext;                // ImGui context (opaque)
 | 
			
		||||
 | 
			
		||||
// Typedefs and Enumerations (declared as int for compatibility and to not pollute the top of this file)
 | 
			
		||||
#ifndef ImTextureID
 | 
			
		||||
typedef void* ImTextureID;          // user data to identify a texture (this is whatever to you want it to be! read the FAQ about ImTextureID in imgui.cpp)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
// Typedefs and Enumerations (declared as int for compatibility with old C++ and to not pollute the top of this file)
 | 
			
		||||
typedef unsigned int ImU32;         // 32-bit unsigned integer (typically used to store packed colors)
 | 
			
		||||
typedef unsigned int ImGuiID;       // unique ID used by widgets (typically hashed from a stack of string)
 | 
			
		||||
typedef unsigned short ImWchar;     // character for keyboard input/display
 | 
			
		||||
typedef void* ImTextureID;          // user data to identify a texture (this is whatever to you want it to be! read the FAQ about ImTextureID in imgui.cpp)
 | 
			
		||||
typedef int ImGuiCol;               // enum: a color identifier for styling     // enum ImGuiCol_
 | 
			
		||||
typedef int ImGuiDir;               // enum: a cardinal direction               // enum ImGuiDir_
 | 
			
		||||
typedef int ImGuiCond;              // enum: a condition for Set*()             // enum ImGuiCond_
 | 
			
		||||
typedef int ImGuiKey;               // enum: a key identifier (ImGui-side enum) // enum ImGuiKey_
 | 
			
		||||
typedef int ImGuiNavInput;          // enum: an input identifier for navigation // enum ImGuiNavInput_
 | 
			
		||||
@@ -313,6 +317,7 @@ namespace ImGui
 | 
			
		||||
    // Widgets: Main
 | 
			
		||||
    IMGUI_API bool          Button(const char* label, const ImVec2& size = ImVec2(0,0));            // button
 | 
			
		||||
    IMGUI_API bool          SmallButton(const char* label);                                         // button with FramePadding=(0,0) to easily embed within text
 | 
			
		||||
    IMGUI_API bool          ArrowButton(const char* str_id, ImGuiDir dir);
 | 
			
		||||
    IMGUI_API bool          InvisibleButton(const char* str_id, const ImVec2& size);                // button behavior without the visuals, useful to build custom behaviors using the public api (along with IsItemActive, IsItemHovered, etc.)
 | 
			
		||||
    IMGUI_API void          Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0,0), const ImVec2& uv1 = ImVec2(1,1), const ImVec4& tint_col = ImVec4(1,1,1,1), const ImVec4& border_col = ImVec4(0,0,0,0));
 | 
			
		||||
    IMGUI_API bool          ImageButton(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0,0),  const ImVec2& uv1 = ImVec2(1,1), int frame_padding = -1, const ImVec4& bg_col = ImVec4(0,0,0,0), const ImVec4& tint_col = ImVec4(1,1,1,1));    // <0 frame_padding uses default frame padding settings. 0 for no padding
 | 
			
		||||
@@ -641,6 +646,8 @@ enum ImGuiComboFlags_
 | 
			
		||||
    ImGuiComboFlags_HeightRegular           = 1 << 2,   // Max ~8 items visible (default)
 | 
			
		||||
    ImGuiComboFlags_HeightLarge             = 1 << 3,   // Max ~20 items visible
 | 
			
		||||
    ImGuiComboFlags_HeightLargest           = 1 << 4,   // As many fitting items as possible
 | 
			
		||||
    ImGuiComboFlags_NoArrowButton           = 1 << 5,   // Display on the preview box without the square arrow button
 | 
			
		||||
    ImGuiComboFlags_NoPreview               = 1 << 6,   // Display only a square arrow button
 | 
			
		||||
    ImGuiComboFlags_HeightMask_             = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -687,6 +694,17 @@ enum ImGuiDragDropFlags_
 | 
			
		||||
#define IMGUI_PAYLOAD_TYPE_COLOR_3F     "_COL3F"    // float[3]     // Standard type for colors, without alpha. User code may use this type. 
 | 
			
		||||
#define IMGUI_PAYLOAD_TYPE_COLOR_4F     "_COL4F"    // float[4]     // Standard type for colors. User code may use this type.
 | 
			
		||||
 | 
			
		||||
// A direction
 | 
			
		||||
enum ImGuiDir_
 | 
			
		||||
{
 | 
			
		||||
    ImGuiDir_None    = -1,
 | 
			
		||||
    ImGuiDir_Left    = 0,
 | 
			
		||||
    ImGuiDir_Right   = 1,
 | 
			
		||||
    ImGuiDir_Up      = 2,
 | 
			
		||||
    ImGuiDir_Down    = 3,
 | 
			
		||||
    ImGuiDir_COUNT
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// User fill ImGuiIO.KeyMap[] array with indices into the ImGuiIO.KeysDown[512] array
 | 
			
		||||
enum ImGuiKey_
 | 
			
		||||
{
 | 
			
		||||
@@ -715,14 +733,14 @@ enum ImGuiKey_
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// [BETA] Gamepad/Keyboard directional navigation
 | 
			
		||||
// Keyboard: Set io.ConfigFlags |= ImGuiConfigFlags_EnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.KeyDown[] + io.KeyMap[] arrays.
 | 
			
		||||
// Gamepad:  Set io.ConfigFlags |= ImGuiConfigFlags_EnableGamepad to enable. Fill the io.NavInputs[] fields before calling NewFrame(). Note that io.NavInputs[] is cleared by EndFrame().
 | 
			
		||||
// Read instructions in imgui.cpp for more details.
 | 
			
		||||
// Keyboard: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.KeyDown[] + io.KeyMap[] arrays.
 | 
			
		||||
// Gamepad:  Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable. Fill the io.NavInputs[] fields before calling NewFrame(). Note that io.NavInputs[] is cleared by EndFrame().
 | 
			
		||||
// Read instructions in imgui.cpp for more details. Download PNG/PSD at goo.gl/9LgVZW.
 | 
			
		||||
enum ImGuiNavInput_
 | 
			
		||||
{
 | 
			
		||||
    // Gamepad Mapping
 | 
			
		||||
    ImGuiNavInput_Activate,      // activate / open / toggle / tweak value       // e.g. Circle (PS4), A (Xbox), B (Switch), Space (Keyboard)
 | 
			
		||||
    ImGuiNavInput_Cancel,        // cancel / close / exit                        // e.g. Cross  (PS4), B (Xbox), A (Switch), Escape (Keyboard)
 | 
			
		||||
    ImGuiNavInput_Activate,      // activate / open / toggle / tweak value       // e.g. Circle (PS4), A (Xbox), A (Switch), Space (Keyboard)
 | 
			
		||||
    ImGuiNavInput_Cancel,        // cancel / close / exit                        // e.g. Cross  (PS4), B (Xbox), B (Switch), Escape (Keyboard)
 | 
			
		||||
    ImGuiNavInput_Input,         // text input / on-screen keyboard              // e.g. Triang.(PS4), Y (Xbox), X (Switch), Return (Keyboard)
 | 
			
		||||
    ImGuiNavInput_Menu,          // tap: toggle menu / hold: focus, move, resize // e.g. Square (PS4), X (Xbox), Y (Switch), Alt (Keyboard)
 | 
			
		||||
    ImGuiNavInput_DpadLeft,      // move / tweak / resize window (w/ PadMenu)    // e.g. D-pad Left/Right/Up/Down (Gamepads), Arrow keys (Keyboard)
 | 
			
		||||
@@ -854,11 +872,11 @@ enum ImGuiStyleVar_
 | 
			
		||||
    ImGuiStyleVar_GrabMinSize,         // float     GrabMinSize
 | 
			
		||||
    ImGuiStyleVar_GrabRounding,        // float     GrabRounding
 | 
			
		||||
    ImGuiStyleVar_ButtonTextAlign,     // ImVec2    ButtonTextAlign
 | 
			
		||||
    ImGuiStyleVar_Count_
 | 
			
		||||
    ImGuiStyleVar_COUNT
 | 
			
		||||
 | 
			
		||||
    // Obsolete names (will be removed)
 | 
			
		||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
 | 
			
		||||
    , ImGuiStyleVar_ChildWindowRounding = ImGuiStyleVar_ChildRounding
 | 
			
		||||
    , ImGuiStyleVar_Count_ = ImGuiStyleVar_COUNT, ImGuiStyleVar_ChildWindowRounding = ImGuiStyleVar_ChildRounding
 | 
			
		||||
#endif
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -903,7 +921,12 @@ enum ImGuiMouseCursor_
 | 
			
		||||
    ImGuiMouseCursor_ResizeEW,          // When hovering over a vertical border or a column
 | 
			
		||||
    ImGuiMouseCursor_ResizeNESW,        // When hovering over the bottom-left corner of a window
 | 
			
		||||
    ImGuiMouseCursor_ResizeNWSE,        // When hovering over the bottom-right corner of a window
 | 
			
		||||
    ImGuiMouseCursor_Count_
 | 
			
		||||
    ImGuiMouseCursor_COUNT
 | 
			
		||||
 | 
			
		||||
    // Obsolete names (will be removed)
 | 
			
		||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
 | 
			
		||||
    , ImGuiMouseCursor_Count_ = ImGuiMouseCursor_COUNT
 | 
			
		||||
#endif
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// Condition for ImGui::SetWindow***(), SetNextWindow***(), SetNextTreeNode***() functions
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user