dear_imgui_rs/utils/
item.rs1use crate::sys;
2
3impl crate::ui::Ui {
4 #[doc(alias = "IsItemToggledOpen")]
6 pub fn is_item_toggled_open(&self) -> bool {
7 self.run_with_bound_context(|| unsafe { sys::igIsItemToggledOpen() })
8 }
9
10 #[doc(alias = "GetItemRectMin")]
12 pub fn item_rect_min(&self) -> [f32; 2] {
13 let rect = self.run_with_bound_context(|| unsafe { sys::igGetItemRectMin() });
14 [rect.x, rect.y]
15 }
16
17 #[doc(alias = "GetItemRectMax")]
19 pub fn item_rect_max(&self) -> [f32; 2] {
20 let rect = self.run_with_bound_context(|| unsafe { sys::igGetItemRectMax() });
21 [rect.x, rect.y]
22 }
23
24 #[doc(alias = "SetNextItemAllowOverlap")]
26 pub fn set_next_item_allow_overlap(&self) {
27 self.run_with_bound_context(|| unsafe { sys::igSetNextItemAllowOverlap() });
28 }
29}