Exposed a few functions related to content regions

This commit is contained in:
Antoine Gersant 2018-12-04 21:06:33 -08:00
parent d61e69eee2
commit 2b15498654

View File

@ -613,6 +613,16 @@ impl<'ui> Ui<'ui> {
let size = unsafe { sys::igGetWindowPos_nonUDT2() };
size.into()
}
pub fn get_window_content_region_min(&self) -> (f32, f32) {
let size = unsafe { sys::igGetWindowContentRegionMin_nonUDT2() };
size.into()
}
pub fn get_window_content_region_max(&self) -> (f32, f32) {
let size = unsafe { sys::igGetWindowContentRegionMax_nonUDT2() };
size.into()
}
}
// Layout
@ -718,6 +728,11 @@ impl<'ui> Ui<'ui> {
unsafe { sys::igSetCursorPos(pos.into()) }
}
pub fn get_content_region_max(&self) -> (f32, f32) {
let size = unsafe { sys::igGetContentRegionMax_nonUDT2() };
size.into()
}
/// Get available space left between the cursor and the edges of the current
/// window.
pub fn get_content_region_avail(&self) -> (f32, f32) {