mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-30 20:51:06 +01:00 
			
		
		
		
	Merge branch 'master' into docking
# Conflicts: # imgui.cpp # imgui.h
This commit is contained in:
		
							
								
								
									
										21
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								imgui.h
									
									
									
									
									
								
							| @@ -276,13 +276,8 @@ namespace ImGui | ||||
|     IMGUI_API ImVec2        GetWindowSize();                            // get current window size | ||||
|     IMGUI_API float         GetWindowWidth();                           // get current window width (shortcut for GetWindowSize().x) | ||||
|     IMGUI_API float         GetWindowHeight();                          // get current window height (shortcut for GetWindowSize().y) | ||||
|     IMGUI_API ImVec2        GetContentRegionMax();                      // current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates | ||||
|     IMGUI_API ImVec2        GetContentRegionAvail();                    // == GetContentRegionMax() - GetCursorPos() | ||||
|     IMGUI_API float         GetContentRegionAvailWidth();               // == GetContentRegionAvail().x | ||||
|     IMGUI_API ImVec2        GetWindowContentRegionMin();                // content boundaries min (roughly (0,0)-Scroll), in window coordinates | ||||
|     IMGUI_API ImVec2        GetWindowContentRegionMax();                // content boundaries max (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates | ||||
|     IMGUI_API float         GetWindowContentRegionWidth();              // | ||||
|  | ||||
|     // Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). | ||||
|     IMGUI_API void          SetNextWindowPos(const ImVec2& pos, ImGuiCond cond = 0, const ImVec2& pivot = ImVec2(0,0)); // set next window position. call before Begin(). use pivot=(0.5f,0.5f) to center on given point, etc. | ||||
|     IMGUI_API void          SetNextWindowSize(const ImVec2& size, ImGuiCond cond = 0);                  // set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin() | ||||
|     IMGUI_API void          SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL, void* custom_callback_data = NULL); // set next window size limits. use -1,-1 on either X/Y axis to preserve the current size. Use callback to apply non-trivial programmatic constraints. | ||||
| @@ -301,6 +296,15 @@ namespace ImGui | ||||
|     IMGUI_API void          SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond = 0);   // set named window collapsed state | ||||
|     IMGUI_API void          SetWindowFocus(const char* name);                                           // set named window to be focused / front-most. use NULL to remove focus. | ||||
|  | ||||
|     // Content region | ||||
|     // - Those functions are bound to be redesigned soon (they are confusing, incomplete and return values in local window coordinates which increases confusion) | ||||
|     IMGUI_API ImVec2        GetContentRegionMax();                                          // current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates | ||||
|     IMGUI_API ImVec2        GetContentRegionAvail();                                        // == GetContentRegionMax() - GetCursorPos() | ||||
|     IMGUI_API float         GetContentRegionAvailWidth();                                   // == GetContentRegionAvail().x | ||||
|     IMGUI_API ImVec2        GetWindowContentRegionMin();                                    // content boundaries min (roughly (0,0)-Scroll), in window coordinates | ||||
|     IMGUI_API ImVec2        GetWindowContentRegionMax();                                    // content boundaries max (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates | ||||
|     IMGUI_API float         GetWindowContentRegionWidth();                                  // | ||||
|  | ||||
|     // Windows Scrolling | ||||
|     IMGUI_API float         GetScrollX();                                                   // get scrolling amount [0..GetScrollMaxX()] | ||||
|     IMGUI_API float         GetScrollY();                                                   // get scrolling amount [0..GetScrollMaxY()] | ||||
| @@ -329,8 +333,9 @@ namespace ImGui | ||||
|     IMGUI_API ImU32         GetColorU32(ImU32 col);                                         // retrieve given color with style alpha applied | ||||
|  | ||||
|     // Parameters stacks (current window) | ||||
|     IMGUI_API void          PushItemWidth(float item_width);                                // width of items for the common item+label case, pixels. 0.0f = default to ~2/3 of windows width, >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side) | ||||
|     IMGUI_API void          PushItemWidth(float item_width);                                // set width of items for common large "item+label" widgets. >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side). 0.0f = default to ~2/3 of windows width,  | ||||
|     IMGUI_API void          PopItemWidth(); | ||||
|     IMGUI_API void          SetNextItemWidth(float item_width);                             // set width of the _next_ common large "item+label" widget. >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side) | ||||
|     IMGUI_API float         CalcItemWidth();                                                // width of item given pushed settings and current cursor position | ||||
|     IMGUI_API void          PushTextWrapPos(float wrap_local_pos_x = 0.0f);                 // word-wrapping for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space | ||||
|     IMGUI_API void          PopTextWrapPos(); | ||||
| @@ -343,7 +348,7 @@ namespace ImGui | ||||
|     // - By "cursor" we mean the current output position. | ||||
|     // - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down. | ||||
|     IMGUI_API void          Separator();                                                    // separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator. | ||||
|     IMGUI_API void          SameLine(float local_pos_x = 0.0f, float spacing_w = -1.0f);    // call between widgets or groups to layout them horizontally. X position given in window coordinates. | ||||
|     IMGUI_API void          SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f);  // call between widgets or groups to layout them horizontally. X position given in window coordinates. | ||||
|     IMGUI_API void          NewLine();                                                      // undo a SameLine() or force a new line when in an horizontal-layout context. | ||||
|     IMGUI_API void          Spacing();                                                      // add vertical spacing. | ||||
|     IMGUI_API void          Dummy(const ImVec2& size);                                      // add a dummy item of given size. unlike InvisibleButton(), Dummy() won't take the mouse click or be navigable into. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user