dear_imgui_rs/layout/
metrics.rs1use crate::Ui;
2use crate::sys;
3
4impl Ui {
5 #[doc(alias = "GetTextLineHeight")]
7 pub fn text_line_height(&self) -> f32 {
8 self.run_with_bound_context(|| unsafe { sys::igGetTextLineHeight() })
9 }
10
11 #[doc(alias = "GetTextLineHeightWithSpacing")]
13 pub fn text_line_height_with_spacing(&self) -> f32 {
14 self.run_with_bound_context(|| unsafe { sys::igGetTextLineHeightWithSpacing() })
15 }
16
17 #[doc(alias = "GetFrameHeight")]
19 pub fn frame_height(&self) -> f32 {
20 self.run_with_bound_context(|| unsafe { sys::igGetFrameHeight() })
21 }
22
23 #[doc(alias = "GetFrameHeightWithSpacing")]
25 pub fn frame_height_with_spacing(&self) -> f32 {
26 self.run_with_bound_context(|| unsafe { sys::igGetFrameHeightWithSpacing() })
27 }
28}