oarust 0.10.0

GPU-first semantic computing engine written in Rust
// @generated by tool/gen/fn/generate.py; DO NOT EDIT.
// schema=ui_types.json schema_version=1 generator_version=64
// schema_sha256=644f7a5dfed92dd89db94b4d52ef8451b796a7989a3c8162a40e261d81e5e7f5
use super::{FontId, PixelRect, UiDirection};
use crate::Color;
#[derive(Clone, Debug, Default)]
pub struct UiTabBarResult {
	/// Full tab-bar rectangle.
	pub bar: PixelRect,
	/// Rectangle spanning visible tab buttons only.
	pub tabs: PixelRect,
	/// Index of the first visible tab after this call.
	pub first_visible: i32,
	/// One past the last visible tab.
	pub one_past_last: i32,
	/// Index of the tab that was clicked, or -1.
	pub activated_index: i32,
	/// Index of the tab whose close button was clicked, or -1.
	pub close_requested_index: i32,
	/// Whether `state.selected` changed.
	pub selection_changed: bool,
}

#[derive(Clone, Debug, Default)]
pub struct UiTreeRowConfig {
	/// Nesting depth (0 = root).
	pub depth: i32,
	/// Pixels per indent level.
	pub indent: i32,
	/// Width reserved for the disclosure arrow.
	pub disclosure_width: i32,
	/// True if this item has children.
	pub has_children: bool,
	/// True if this item is currently expanded.
	pub open: bool,
	/// True if this item is selected.
	pub selected: bool,
	/// False to render greyed out.
	pub enabled: bool,
}

#[derive(Clone, Debug, Default)]
pub struct UiTreeRowResult {
	/// Full row rectangle.
	pub row: PixelRect,
	/// Disclosure-arrow rectangle.
	pub disclosure: PixelRect,
	/// Label rectangle.
	pub label: PixelRect,
	/// True if the row was activated (clicked).
	pub activated: bool,
	/// True if the open/close state toggled.
	pub open_changed: bool,
	/// Current open state after this call.
	pub open: bool,
}

#[derive(Clone, Debug)]
pub struct UiScrollConfig {
	/// Pixels scrolled per mouse-wheel notch.
	pub wheel_step: f32,
	/// Width of the scrollbar track in pixels.
	pub scrollbar_width: f32,
	/// Gap between content and scrollbar track.
	pub scrollbar_gap: f32,
	/// Whether to show the scrollbar.
	pub show_scrollbar: bool,
}

#[derive(Clone, Debug)]
pub struct UiSplitConfig {
	/// Flow direction: Column = top/bottom split, Row = left/right split.
	pub direction: UiDirection,
	/// Width of the drag handle in pixels.
	pub handle_size: f32,
	/// Minimum size of the first pane in pixels.
	pub minimum_first: f32,
	/// Minimum size of the second pane in pixels.
	pub minimum_second: f32,
	/// Pixels moved per arrow-key press.
	pub keyboard_step: f32,
}

#[derive(Clone, Debug)]
pub struct UiPropertyRowConfig {
	/// Fraction of the row width reserved for the label (0–1).
	pub label_fraction: f32,
	/// Gap between label and value columns in pixels.
	pub gap: f32,
	/// Horizontal padding inside each column.
	pub padding_x: f32,
	/// Draw an alternating background on even rows.
	pub alternate: bool,
}

#[derive(Clone, Debug)]
pub struct UiPopupConfig {
	/// Popup width in pixels.
	pub width: f32,
	/// Popup height in pixels (0 = hug content).
	pub height: f32,
	/// Gap between anchor and popup in pixels.
	pub gap: f32,
	/// Padding inside the popup panel.
	pub padding: f32,
}

#[derive(Clone, Debug)]
pub struct UiDropdownConfig {
	/// Maximum number of visible items before scrolling.
	pub max_visible_items: i32,
	/// Popup width override (0 = match widget width).
	pub popup_width: f32,
	/// Gap between widget and popup.
	pub popup_gap: f32,
}

#[derive(Clone, Debug)]
pub struct UiTooltipConfig {
	/// Milliseconds to wait before showing the tooltip.
	pub delay_ms: f32,
	/// Maximum tooltip width in pixels.
	pub max_width: f32,
	/// Gap between cursor and tooltip box.
	pub gap: f32,
	/// Padding inside the tooltip panel.
	pub padding: f32,
}

#[derive(Clone, Debug)]
pub struct UiHeatmapConfig {
	/// Number of data rows.
	pub rows: i32,
	/// Number of data columns.
	pub cols: i32,
	/// Minimum value mapped to the cold color.
	pub v_min: f32,
	/// Maximum value mapped to the hot color.
	pub v_max: f32,
	/// Colormap index (matches [`crate::plot::axes::HeatmapStyle`] colormap).
	pub colormap: i32,
	/// Auto-scale range from data when true.
	pub auto_scale: bool,
	/// Draw grid lines between cells.
	pub show_grid: bool,
}

#[derive(Clone, Debug)]
pub struct UiGridConfig {
	pub origin: [f32; 2],
	pub minor_spacing: [f32; 2],
	pub major_every: u32,
	/// Number of minor intervals per super-major interval.
	pub super_major_every: u32,
	pub minor_thickness: f32,
	pub major_thickness: f32,
	pub super_major_thickness: f32,
	pub axis_thickness: f32,
	pub opacity: f32,
	pub guide_fade_center: [f32; 2],
	pub guide_fade_inner_radius: f32,
	pub guide_fade_outer_radius: f32,
	pub background_top: Color,
	pub background_bottom: Color,
	pub minor_color: Color,
	pub major_color: Color,
	pub super_major_color: Color,
	pub axis_color: Color,
	pub fill_background: bool,
	pub draw_grid: bool,
	pub draw_axes: bool,
	pub radial_guide_fade: bool,
	pub dither_background: bool,
}

#[derive(Clone, Copy, Debug, PartialEq)]
pub struct UiPlotConfig {
	/// Series line color.
	pub color: Color,
	/// X-axis minimum (screen-space sample domain when not auto-scaled).
	pub x_min: f32,
	/// X-axis maximum.
	pub x_max: f32,
	/// Y-axis minimum, used when `auto_scale` is false.
	pub y_min: f32,
	/// Y-axis maximum, used when `auto_scale` is false.
	pub y_max: f32,
	/// Resolve Y bounds from finite samples.
	pub auto_scale: bool,
	/// Draw the chart grid behind the series.
	pub show_grid: bool,
	/// Fill under the series line.
	pub fill: bool,
	/// Compute-line rasterization samples; the implemented set is 1/4/8. Other values resolve to four samples rather than naming MSAA on a storage-image path.
	pub antialias_samples: u32,
	/// Rasterized line width in pixels.
	pub line_width: f32,
	/// Paint the themed plot surface before drawing.
	pub draw_surface: bool,
}

#[derive(Clone, Copy, Debug)]
pub struct CvBboxesConfig {
	pub color: Color,
	pub line_width: f32,
	pub alpha: f32,
	pub label_scale: i32,
	pub show_labels: bool,
	pub show_scores: bool,
}

#[derive(Clone, Debug)]
pub struct DetectionOverlayConfig {
	pub max_detections: u32,
	pub max_glyphs: u32,
	pub thickness_pixels: f32,
	pub font_size: f32,
	pub label_padding_x: f32,
	pub label_padding_y: f32,
	pub box_color: Color,
	pub label_text_color: Color,
	pub show_labels: bool,
}

#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct GlyphInfo {
	pub codepoint: u32,
	pub atlas_x: f32,
	pub atlas_y: f32,
	pub atlas_w: f32,
	pub atlas_h: f32,
	pub bearing_x: f32,
	pub bearing_y: f32,
	pub advance: f32,
	pub ink_w: f32,
	pub ink_h: f32,
	pub raster_size: f32,
}

#[derive(Clone, Copy, Debug, PartialEq)]
pub struct TextLayoutConfig {
	pub font: FontId,
	pub size: f32,
	pub wrap_width: f32,
	pub monospace: bool,
}