mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-30 20:51:06 +01:00 
			
		
		
		
	Added commentary about ContentRegion functions. Added internal GetContentRegionMaxScreen() to facilitate internal code at the moment.
This commit is contained in:
		
							
								
								
									
										17
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								imgui.h
									
									
									
									
									
								
							| @@ -261,18 +261,12 @@ namespace ImGui | ||||
|     IMGUI_API bool          IsWindowFocused(ImGuiFocusedFlags flags=0); // is current window focused? or its root/child, depending on flags. see flags for options. | ||||
|     IMGUI_API bool          IsWindowHovered(ImGuiHoveredFlags flags=0); // is current window hovered (and typically: not blocked by a popup/modal)? see flags for options. NB: If you are trying to check whether your mouse should be dispatched to imgui or to your app, you should use the 'io.WantCaptureMouse' boolean for that! Please read the FAQ! | ||||
|     IMGUI_API ImDrawList*   GetWindowDrawList();                        // get draw list associated to the current window, to append your own drawing primitives | ||||
|  | ||||
|     IMGUI_API ImVec2        GetWindowPos();                             // get current window position in screen space (useful if you want to do your own drawing via the DrawList API) | ||||
|     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. | ||||
| @@ -290,6 +284,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()] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user