mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-27 05:18:27 +00:00
fmt
This commit is contained in:
parent
291b7a5b47
commit
a350e8dcd8
@ -73,10 +73,7 @@ fn main() -> io::Result<()> {
|
|||||||
build.flag("-fno-exceptions").flag("-fno-rtti");
|
build.flag("-fno-exceptions").flag("-fno-rtti");
|
||||||
}
|
}
|
||||||
// TODO: disable linking C++ stdlib? Not sure if it's allowed.
|
// TODO: disable linking C++ stdlib? Not sure if it's allowed.
|
||||||
build
|
build.warnings(false).file(imgui_cpp).compile("libcimgui.a");
|
||||||
.warnings(false)
|
|
||||||
.file(imgui_cpp)
|
|
||||||
.compile("libcimgui.a");
|
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
@ -233,9 +233,10 @@ pub struct Io {
|
|||||||
pub(crate) set_clipboard_text_fn:
|
pub(crate) set_clipboard_text_fn:
|
||||||
Option<unsafe extern "C" fn(user_data: *mut c_void, text: *const c_char)>,
|
Option<unsafe extern "C" fn(user_data: *mut c_void, text: *const c_char)>,
|
||||||
pub(crate) clipboard_user_data: *mut c_void,
|
pub(crate) clipboard_user_data: *mut c_void,
|
||||||
#[cfg(not(feature="docking"))]
|
#[cfg(not(feature = "docking"))]
|
||||||
ime_set_input_screen_pos_fn: Option<unsafe extern "C" fn(x: std::os::raw::c_int, y: std::os::raw::c_int)>,
|
ime_set_input_screen_pos_fn:
|
||||||
#[cfg(not(feature="docking"))]
|
Option<unsafe extern "C" fn(x: std::os::raw::c_int, y: std::os::raw::c_int)>,
|
||||||
|
#[cfg(not(feature = "docking"))]
|
||||||
ime_window_handle: *mut c_void,
|
ime_window_handle: *mut c_void,
|
||||||
/// Mouse position, in pixels.
|
/// Mouse position, in pixels.
|
||||||
///
|
///
|
||||||
@ -480,9 +481,9 @@ fn test_io_memory_layout() {
|
|||||||
assert_field_offset!(get_clipboard_text_fn, GetClipboardTextFn);
|
assert_field_offset!(get_clipboard_text_fn, GetClipboardTextFn);
|
||||||
assert_field_offset!(set_clipboard_text_fn, SetClipboardTextFn);
|
assert_field_offset!(set_clipboard_text_fn, SetClipboardTextFn);
|
||||||
assert_field_offset!(clipboard_user_data, ClipboardUserData);
|
assert_field_offset!(clipboard_user_data, ClipboardUserData);
|
||||||
#[cfg(not(feature="docking"))]
|
#[cfg(not(feature = "docking"))]
|
||||||
assert_field_offset!(ime_set_input_screen_pos_fn, ImeSetInputScreenPosFn);
|
assert_field_offset!(ime_set_input_screen_pos_fn, ImeSetInputScreenPosFn);
|
||||||
#[cfg(not(feature="docking"))]
|
#[cfg(not(feature = "docking"))]
|
||||||
assert_field_offset!(ime_window_handle, ImeWindowHandle);
|
assert_field_offset!(ime_window_handle, ImeWindowHandle);
|
||||||
assert_field_offset!(mouse_pos, MousePos);
|
assert_field_offset!(mouse_pos, MousePos);
|
||||||
assert_field_offset!(mouse_down, MouseDown);
|
assert_field_offset!(mouse_down, MouseDown);
|
||||||
|
|||||||
@ -161,9 +161,7 @@ unsafe fn push_style_var(style_var: StyleVar) {
|
|||||||
}
|
}
|
||||||
IndentSpacing(v) => igPushStyleVarFloat(sys::ImGuiStyleVar_IndentSpacing as i32, v),
|
IndentSpacing(v) => igPushStyleVarFloat(sys::ImGuiStyleVar_IndentSpacing as i32, v),
|
||||||
ScrollbarSize(v) => igPushStyleVarFloat(sys::ImGuiStyleVar_ScrollbarSize as i32, v),
|
ScrollbarSize(v) => igPushStyleVarFloat(sys::ImGuiStyleVar_ScrollbarSize as i32, v),
|
||||||
ScrollbarRounding(v) => {
|
ScrollbarRounding(v) => igPushStyleVarFloat(sys::ImGuiStyleVar_ScrollbarRounding as i32, v),
|
||||||
igPushStyleVarFloat(sys::ImGuiStyleVar_ScrollbarRounding as i32, v)
|
|
||||||
}
|
|
||||||
GrabMinSize(v) => igPushStyleVarFloat(sys::ImGuiStyleVar_GrabMinSize as i32, v),
|
GrabMinSize(v) => igPushStyleVarFloat(sys::ImGuiStyleVar_GrabMinSize as i32, v),
|
||||||
GrabRounding(v) => igPushStyleVarFloat(sys::ImGuiStyleVar_GrabRounding as i32, v),
|
GrabRounding(v) => igPushStyleVarFloat(sys::ImGuiStyleVar_GrabRounding as i32, v),
|
||||||
TabRounding(v) => igPushStyleVarFloat(sys::ImGuiStyleVar_TabRounding as i32, v),
|
TabRounding(v) => igPushStyleVarFloat(sys::ImGuiStyleVar_TabRounding as i32, v),
|
||||||
|
|||||||
@ -59,7 +59,10 @@ pub struct Selectable<'ui, T> {
|
|||||||
impl<'ui, T: AsRef<str>> Selectable<'ui, T> {
|
impl<'ui, T: AsRef<str>> Selectable<'ui, T> {
|
||||||
/// Constructs a new selectable builder.
|
/// Constructs a new selectable builder.
|
||||||
#[doc(alias = "Selectable")]
|
#[doc(alias = "Selectable")]
|
||||||
#[deprecated(since = "0.9.0", note = "use `ui.selectable` or `ui.selectable_config`")]
|
#[deprecated(
|
||||||
|
since = "0.9.0",
|
||||||
|
note = "use `ui.selectable` or `ui.selectable_config`"
|
||||||
|
)]
|
||||||
pub fn new(label: T, ui: &'ui Ui) -> Self {
|
pub fn new(label: T, ui: &'ui Ui) -> Self {
|
||||||
Selectable {
|
Selectable {
|
||||||
label,
|
label,
|
||||||
|
|||||||
@ -36,7 +36,9 @@ impl Ui {
|
|||||||
out.into()
|
out.into()
|
||||||
}
|
}
|
||||||
#[doc(alias = "GetContentRegionWidth")]
|
#[doc(alias = "GetContentRegionWidth")]
|
||||||
#[deprecated(note = "Removed in Dear ImGui 1.85, 'not very useful in practice' and can be done with window_content_region_min/_max")]
|
#[deprecated(
|
||||||
|
note = "Removed in Dear ImGui 1.85, 'not very useful in practice' and can be done with window_content_region_min/_max"
|
||||||
|
)]
|
||||||
pub fn window_content_region_width(&self) -> f32 {
|
pub fn window_content_region_width(&self) -> f32 {
|
||||||
self.window_content_region_max()[0] - self.window_content_region_min()[0]
|
self.window_content_region_max()[0] - self.window_content_region_min()[0]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user