pub struct Ui {Show 53 fields
pub is_scrolling: bool,
pub is_typing: bool,
pub enabled: bool,
pub is_started: bool,
pub is_pushed: bool,
pub is_hovered: bool,
pub is_released: bool,
pub changed: bool,
pub image_invert_y: bool,
pub scroll_enabled: bool,
pub always_redraw: bool,
pub highlight_on_select: bool,
pub tab_switch_enabled: bool,
pub window_border_top: u32,
pub window_border_bottom: u32,
pub window_border_left: u32,
pub window_border_right: u32,
pub touch_controls: bool,
pub input_registered: bool,
pub input_enabled: bool,
pub input_x: f32,
pub input_y: f32,
pub input_started_x: f32,
pub input_started_y: f32,
pub input_dx: f32,
pub input_dy: f32,
pub input_wheel_delta: i32,
pub input_started: bool,
pub input_started_r: bool,
pub input_released: bool,
pub input_released_r: bool,
pub input_down: bool,
pub input_down_r: bool,
pub is_key_pressed: bool,
pub is_key_down: bool,
pub is_shift_down: bool,
pub is_ctrl_down: bool,
pub is_alt_down: bool,
pub is_adown: bool,
pub is_backspace_down: bool,
pub is_delete_down: bool,
pub is_escape_down: bool,
pub is_return_down: bool,
pub is_tab_down: bool,
pub key: Option<VirtualKeyCode>,
pub char: char,
pub painter: Painter,
pub theme: Theme,
pub ops: UiOptions,
pub x: f32,
pub y: f32,
pub w: f32,
pub h: f32,
/* private fields */
}
Fields
is_scrolling: bool
is_typing: bool
enabled: bool
is_started: bool
is_pushed: bool
is_hovered: bool
is_released: bool
changed: bool
image_invert_y: bool
scroll_enabled: bool
always_redraw: bool
highlight_on_select: bool
tab_switch_enabled: bool
window_border_top: u32
window_border_bottom: u32
window_border_left: u32
window_border_right: u32
touch_controls: bool
input_registered: bool
input_enabled: bool
input_x: f32
input_y: f32
input_started_x: f32
input_started_y: f32
input_dx: f32
input_dy: f32
input_wheel_delta: i32
input_started: bool
input_started_r: bool
input_released: bool
input_released_r: bool
input_down: bool
input_down_r: bool
is_key_pressed: bool
is_key_down: bool
is_shift_down: bool
is_ctrl_down: bool
is_alt_down: bool
is_adown: bool
is_backspace_down: bool
is_delete_down: bool
is_escape_down: bool
is_return_down: bool
is_tab_down: bool
key: Option<VirtualKeyCode>
char: char
painter: Painter
theme: Theme
ops: UiOptions
x: f32
y: f32
w: f32
h: f32
Implementations
sourceimpl Ui
impl Ui
pub fn new(ops: UiOptions) -> Ui
pub fn set_scale(&mut self, factor: f32)
pub fn remove(&mut self)
pub fn register_input(&mut self)
pub fn unregister_input(&mut self)
pub fn begin(&mut self)
pub fn end(&mut self, last: bool)
pub fn begin_region(&mut self, x: i32, y: i32, w: i32)
pub fn end_region(&mut self, last: bool)
pub fn begin_sticky(&mut self)
pub fn end_sticky(&mut self)
pub fn window_dirty(
&self,
handle: &Handle,
x: i32,
y: i32,
w: i32,
h: i32
) -> bool
pub fn window(
&mut self,
handle: &Handle,
x: i32,
y: i32,
w: i32,
h: i32,
drag: bool
) -> bool
pub fn end_window(&mut self, bind_global_g: bool)
pub fn tab(
&mut self,
handle: &Handle,
text: &str,
vertical: bool,
color: Option<Color>
) -> bool
pub fn panel(
&mut self,
handle: &Handle,
text: &str,
is_tree: bool,
filled: bool,
pack: bool
) -> bool
pub fn image(
&mut self,
image: &Image,
tint: Color,
h: Option<f32>,
sx: i32,
sy: i32,
sw: i32,
sh: i32
) -> State
pub fn text(&mut self, text: &str, align: Align, bg: Option<Color>) -> State
pub fn text_input(
&mut self,
handle: &Handle,
label: &str,
align: Align,
editable: bool
) -> String
pub fn check(&mut self, handle: &Handle, text: &str) -> bool
pub fn radio(&mut self, handle: &Handle, position: i32, text: &str) -> bool
pub fn combo(
&mut self,
handle: &Handle,
texts: Vec<String, Global>,
label: &str,
show_label: bool,
align: Align
) -> i32
pub fn slider(
&mut self,
handle: &Handle,
text: &str,
from: f32,
to: f32,
filled: bool,
precision: f32,
display_value: bool,
align: Align,
text_edit: bool
) -> f32
pub fn separator(&mut self, h: u32, fill: bool)
pub fn tooltip(&mut self, text: &str)
pub fn tooltip_image(&mut self, image: Image, max_width: Option<i32>)
pub fn highlight_next_row(&mut self)
pub fn row(&mut self, ratios: &[f32])
pub fn indent(&mut self, both_sides: bool)
pub fn unindent(&mut self, both_sides: bool)
pub fn fill(&self, x: f32, y: f32, w: f32, h: f32, color: Color)
pub fn rect(&self, x: f32, y: f32, w: f32, h: f32, color: Color, strength: f32)
pub fn on_mouse_down(&mut self, button: &MouseButton)
pub fn on_mouse_up(&mut self, button: &MouseButton)
pub fn on_mouse_move(
&mut self,
x: f32,
y: f32,
movement_x: f32,
movement_y: f32
)
pub fn on_mouse_wheel(&mut self, delta: i32)
pub fn on_key_down(&mut self, code: VirtualKeyCode)
pub fn on_key_up(&mut self, code: VirtualKeyCode)
pub fn on_modifier_changed(&mut self, state: &ModifiersState)
pub fn on_key_press(&mut self, char: char)
pub fn on_touch_down(&mut self, id: u64, x: f32, y: f32)
pub fn on_touch_up(&mut self, id: u64, x: f32, y: f32)
pub fn on_touch_move(&mut self, id: u64, x: f32, y: f32)
pub fn on_cut(&mut self) -> String
pub fn on_copy(&mut self) -> String
pub fn on_paste(&mut self, s: String)
pub fn element_w(&self) -> f32
pub fn element_h(&self) -> f32
pub fn element_offset(&self) -> f32
pub fn arrow_size(&self) -> f32
pub fn check_size(&self) -> f32
pub fn check_select_size(&self) -> f32
pub fn font_size(&self) -> f32
pub fn scroll_w(&self) -> i32
pub fn text_offset(&self) -> f32
pub fn tab_w(&self) -> i32
pub fn header_drag_h(&self) -> i32
pub fn scale(&self) -> f32
pub fn resize(&mut self, handle: Handle, w: i32, h: i32, window_id: i32)
pub fn inline_radio(
&mut self,
handle: &Handle,
texts: &[&str],
align: Align
) -> i32
pub fn color_wheel(
&mut self,
handle: &Handle,
alpha: bool,
w: Option<f32>,
color_preview: bool
) -> Color
pub fn file_browser(&mut self, handle: &Handle, folders_only: bool) -> String
pub fn float_input(
&mut self,
handle: &Handle,
label: &str,
align: Align,
precision: f32
) -> f32
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Ui
impl !Send for Ui
impl !Sync for Ui
impl Unpin for Ui
impl !UnwindSafe for Ui
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.