pub struct Context { /* private fields */ }
Implementations§
Source§impl Context
impl Context
pub fn new(alloc: &mut Allocator, font: &UserFont) -> Context
pub fn clip_mut(&mut self) -> &mut Clipboard
pub fn clip(&self) -> &Clipboard
pub fn last_widget_state(&self) -> Flags
pub fn delta_time_seconds(&self) -> f32
pub fn input_mut(&mut self) -> &mut Input
pub fn style_mut(&mut self) -> &mut Style
pub fn draw_list_mut(&mut self) -> &mut DrawList
pub fn input(&self) -> &Input
pub fn style(&self) -> &Style
pub fn draw_list(&self) -> &DrawList
pub fn clear(&mut self)
pub fn begin(&mut self, title: String<'_>, bounds: Rect, flags: Flags) -> bool
pub fn begin_titled( &mut self, name: String<'_>, title: String<'_>, bounds: Rect, flags: Flags, ) -> i32
pub fn end(&mut self)
pub fn window_find<S: AsRef<str>>(&self, name: S) -> Option<&Window>
pub fn window_find_mut(&mut self, name: String<'_>) -> Option<&mut Window>
pub fn window_get_bounds(&self) -> Rect
pub fn window_get_size(&self) -> Vec2
pub fn window_get_position(&self) -> Vec2
pub fn window_get_width(&self) -> f32
pub fn window_get_height(&self) -> f32
pub fn window_get_panel_mut(&mut self) -> Option<&mut Panel>
pub fn window_get_panel(&self) -> Option<&Panel>
pub fn window_get_content_region(&self) -> Rect
pub fn window_get_content_region_min(&self) -> Vec2
pub fn window_get_content_region_max(&self) -> Vec2
pub fn window_get_content_region_size(&self) -> Vec2
pub fn window_get_canvas_mut(&mut self) -> Option<&mut CommandBuffer>
pub fn window_get_canvas(&self) -> Option<&CommandBuffer>
pub fn window_has_focus(&self) -> bool
pub fn window_is_collapsed(&self, name: String<'_>) -> bool
pub fn window_is_closed(&self, name: String<'_>) -> bool
pub fn window_is_active(&self, name: String<'_>) -> bool
pub fn window_is_hovered(&self) -> bool
pub fn window_is_any_hovered(&self) -> bool
pub fn item_is_any_active(&self) -> bool
pub fn window_set_bounds<S: AsRef<str>>(&mut self, name: S, bounds: Rect)
pub fn window_set_position<S: AsRef<str>>(&mut self, name: S, pos: Vec2)
pub fn window_set_size<S: AsRef<str>>(&mut self, name: S, size: Vec2)
pub fn window_set_focus(&mut self, name: String<'_>)
pub fn window_close(&mut self, name: String<'_>)
pub fn window_collapse(&mut self, name: String<'_>, state: CollapseState)
pub fn window_collapse_if( &mut self, name: String<'_>, state: CollapseState, cond: bool, )
pub fn window_show(&mut self, name: String<'_>, state: ShowState)
pub fn window_show_if(&mut self, name: String<'_>, state: ShowState, cond: bool)
pub fn layout_row_dynamic(&mut self, height: f32, cols: i32)
pub fn layout_row_static(&mut self, height: f32, item_width: i32, cols: i32)
pub fn layout_row_begin( &mut self, fmt: LayoutFormat, row_height: f32, cols: i32, )
pub fn layout_row_push(&mut self, value: f32)
pub fn layout_row_end(&mut self)
pub fn layout_row(&mut self, fmt: LayoutFormat, height: f32, cols_ratio: &[f32])
pub fn layout_space_begin( &mut self, fmt: LayoutFormat, height: f32, widget_count: i32, )
pub fn layout_space_push(&mut self, space: Rect)
pub fn layout_space_end(&mut self)
pub fn layout_space_bounds(&mut self) -> Rect
pub fn layout_space_to_screen(&mut self, space: Vec2) -> Vec2
pub fn layout_space_to_local(&mut self, space: Vec2) -> Vec2
pub fn layout_space_rect_to_screen(&mut self, space: Rect) -> Rect
pub fn layout_space_rect_to_local(&mut self, space: Rect) -> Rect
pub fn layout_ratio_from_pixel(&mut self, pixel_width: f32) -> f32
pub fn group_begin(&mut self, title: String<'_>, flags: Flags) -> i32
pub fn group_end(&mut self)
pub fn tree_push_hashed( &mut self, ty: TreeType, title: String<'_>, initial_state: CollapseState, hash: String<'_>, len: i32, seed: i32, ) -> i32
pub fn tree_image_push_hashed( &mut self, ty: TreeType, i: Image, title: String<'_>, initial_state: CollapseState, hash: String<'_>, len: i32, seed: i32, ) -> i32
pub fn tree_pop(&mut self)
pub fn text(&mut self, text: &str, flags: Flags)
pub fn text_colored(&mut self, text: &str, flags: Flags, color: Color)
pub fn text_wrap(&mut self, text: &str)
pub fn text_wrap_colored(&mut self, text: &str, color: Color)
pub fn label(&mut self, text: String<'_>, flags: Flags)
pub fn label_colored(&mut self, text: String<'_>, flags: Flags, color: Color)
pub fn label_wrap(&mut self, text: String<'_>)
pub fn label_colored_wrap(&mut self, text: String<'_>, color: Color)
pub fn image(&mut self, img: Image)
pub fn check_label(&mut self, title: String<'_>, active: bool) -> i32
pub fn check_text(&mut self, title: &str, active: bool) -> i32
pub fn check_flags_label( &mut self, title: String<'_>, flags: u32, value: u32, ) -> u32
pub fn check_flags_text(&mut self, title: &str, flags: u32, value: u32) -> u32
pub fn checkbox_label(&mut self, title: String<'_>, active: &mut bool) -> bool
pub fn checkbox_text(&mut self, title: &str, active: &mut bool) -> bool
pub fn checkbox_flags_label( &mut self, title: String<'_>, flags: &mut u32, value: u32, ) -> bool
pub fn checkbox_flags_text( &mut self, title: &str, flags: &mut u32, value: u32, ) -> bool
pub fn radio_label(&mut self, title: String<'_>, active: &mut bool) -> bool
pub fn radio_text(&mut self, title: &str, active: &mut bool) -> bool
pub fn option_label(&mut self, title: String<'_>, active: bool) -> bool
pub fn option_text(&mut self, title: &str, active: bool) -> bool
pub fn selectable_label( &mut self, title: String<'_>, align: Flags, value: &mut i32, ) -> bool
pub fn selectable_text( &mut self, title: &str, align: Flags, value: &mut i32, ) -> bool
pub fn selectable_image_label( &mut self, img: Image, title: String<'_>, align: Flags, value: &mut i32, ) -> bool
pub fn selectable_image_text( &mut self, img: Image, title: &str, align: Flags, value: &mut i32, ) -> bool
pub fn select_label( &mut self, title: String<'_>, align: Flags, value: i32, ) -> i32
pub fn select_text(&mut self, title: &str, align: Flags, value: i32) -> i32
pub fn select_image_label( &mut self, img: Image, title: String<'_>, align: Flags, value: i32, ) -> i32
pub fn select_image_text( &mut self, img: Image, title: &str, align: Flags, value: i32, ) -> i32
pub fn slide_float(&mut self, min: f32, val: f32, max: f32, step: f32) -> f32
pub fn slide_int(&mut self, min: i32, val: i32, max: i32, step: i32) -> i32
pub fn slider_float( &mut self, min: f32, val: &mut f32, max: f32, step: f32, ) -> bool
pub fn slider_int( &mut self, min: i32, val: &mut i32, max: i32, step: i32, ) -> bool
pub fn progress( &mut self, cur: &mut Size, max: Size, is_modifyable: bool, ) -> bool
pub fn prog(&mut self, cur: Size, max: Size, is_modifyable: bool) -> usize
pub fn color_picker(&mut self, color: ColorF, fmt: ColorFormat) -> ColorF
pub fn color_pick(&mut self, fmt: ColorFormat) -> (bool, ColorF)
pub fn property_int( &mut self, name: String<'_>, min: i32, val: &mut i32, max: i32, step: i32, inc_per_pixel: f32, )
pub fn property_float( &mut self, name: String<'_>, min: f32, val: &mut f32, max: f32, step: f32, inc_per_pixel: f32, )
pub fn property_double( &mut self, name: String<'_>, min: f64, val: &mut f64, max: f64, step: f64, inc_per_pixel: f32, )
pub fn propertyi( &mut self, name: String<'_>, min: i32, val: i32, max: i32, step: i32, inc_per_pixel: f32, ) -> i32
pub fn propertyf( &mut self, name: String<'_>, min: f32, val: f32, max: f32, step: f32, inc_per_pixel: f32, ) -> f32
pub fn propertyd( &mut self, name: String<'_>, min: f64, val: f64, max: f64, step: f64, inc_per_pixel: f32, ) -> f64
pub fn edit_string_custom_filter( &mut self, flags: Flags, buffer: &mut [u8], len: &mut i32, filter: fn(&TextEdit, char) -> bool, ) -> Flags
pub fn edit_string( &mut self, flags: Flags, buffer: &mut [u8], len: &mut i32, filter: PluginFilter, ) -> Flags
pub fn edit_buffer( &mut self, flags: Flags, editor: &mut TextEdit, filter: PluginFilter, ) -> Flags
pub fn chart_begin( &mut self, ty: ChartType, num: i32, min: f32, max: f32, ) -> bool
pub fn chart_begin_colored( &mut self, ty: ChartType, color: Color, active: Color, num: i32, min: f32, max: f32, ) -> bool
pub fn chart_add_slot( &mut self, ty: ChartType, count: i32, min_value: f32, max_value: f32, )
pub fn chart_add_slot_colored( &mut self, ty: ChartType, color: Color, active: Color, count: i32, min_value: f32, max_value: f32, )
pub fn chart_push(&mut self, value: f32) -> Flags
pub fn chart_push_slot(&mut self, value: f32, count: i32) -> Flags
pub fn chart_end(&mut self)
pub fn plot(&mut self, ty: ChartType, values: &[f32])
pub fn popup_begin( &mut self, ty: PopupType, title: String<'_>, flags: Flags, bounds: Rect, ) -> bool
pub fn popup_close(&mut self)
pub fn popup_end(&mut self)
pub fn combo( &mut self, items: &mut StringArray<'_>, selected: i32, item_height: i32, size: Vec2, ) -> i32
pub fn combo_separator( &mut self, items_separated_by_separator: String<'_>, separator: char, selected: i32, item_height: i32, size: Vec2, ) -> i32
pub fn combo_begin_label(&mut self, selected: String<'_>, size: Vec2) -> bool
pub fn combo_begin_text(&mut self, selected: &str, size: Vec2) -> bool
pub fn combo_begin_color(&mut self, color: Color, size: Vec2) -> bool
pub fn combo_begin_symbol(&mut self, sym: SymbolType, size: Vec2) -> bool
pub fn combo_begin_symbol_label( &mut self, label: String<'_>, sym: SymbolType, size: Vec2, ) -> bool
pub fn combo_begin_symbol_text( &mut self, label: &str, sym: SymbolType, size: Vec2, ) -> bool
pub fn combo_begin_image(&mut self, img: Image, size: Vec2) -> bool
pub fn combo_begin_image_label( &mut self, label: String<'_>, img: Image, size: Vec2, ) -> bool
pub fn combo_begin_image_text( &mut self, label: &str, img: Image, size: Vec2, ) -> bool
pub fn combo_item_label(&mut self, label: String<'_>, alignment: Flags) -> bool
pub fn combo_item_text(&mut self, label: &str, alignment: Flags) -> bool
pub fn combo_item_image_label( &mut self, img: Image, label: String<'_>, alignment: Flags, ) -> bool
pub fn combo_item_image_text( &mut self, img: Image, label: &str, alignment: Flags, ) -> bool
pub fn combo_item_symbol_label( &mut self, sym: SymbolType, label: String<'_>, alignment: Flags, ) -> bool
pub fn combo_item_symbol_text( &mut self, sym: SymbolType, label: &str, alignment: Flags, ) -> bool
pub fn combo_close(&mut self)
pub fn combo_end(&mut self)
pub fn contextual_begin( &mut self, flags: Flags, bounds: Vec2, trigger_bounds: Rect, ) -> bool
pub fn contextual_item_label(&mut self, label: String<'_>, align: Flags) -> bool
pub fn contextual_item_text(&mut self, label: &str, align: Flags) -> bool
pub fn contextual_item_image_label( &mut self, img: Image, label: String<'_>, align: Flags, ) -> bool
pub fn contextual_item_image_text( &mut self, img: Image, label: &str, align: Flags, ) -> bool
pub fn contextual_item_symbol_label( &mut self, sym: SymbolType, label: String<'_>, align: Flags, ) -> bool
pub fn contextual_item_symbol_text( &mut self, sym: SymbolType, label: &str, align: Flags, ) -> bool
pub fn contextual_close(&mut self)
pub fn contextual_end(&mut self)
pub fn tooltip(&mut self, text: String<'_>)
pub fn tooltip_begin(&mut self, width: f32) -> bool
pub fn tooltip_end(&mut self)
pub fn convert( &mut self, cmds: &mut Buffer, vertices: &mut Buffer, elements: &mut Buffer, config: &ConvertConfig, )
pub fn input_begin(&mut self)
pub fn input_motion(&mut self, x: i32, y: i32)
pub fn input_key(&mut self, key: Key, down: bool)
pub fn input_scroll(&mut self, y: Vec2)
pub fn input_char(&mut self, c: u8)
pub fn input_glyph(&mut self, g: Glyph)
pub fn input_unicode(&mut self, r: char)
pub fn input_end(&mut self)
pub fn style_default(&mut self)
pub fn style_from_table(&mut self, table: &ColorMap)
pub fn style_load_cursor(&mut self, cur: StyleCursor, res: &Cursor)
pub fn style_load_all_cursors(&mut self, table: &mut CursorMap<'_>)
pub fn style_set_font(&mut self, font: &UserFont)
pub fn style_set_cursor(&mut self, cur: StyleCursor) -> bool
pub fn style_show_cursor(&mut self)
pub fn style_hide_cursor(&mut self)
pub fn style_push_font(&mut self, font: &mut UserFont) -> bool
pub fn style_push_float(&mut self, addr: &mut f32, val: f32) -> bool
pub fn style_push_vec2(&mut self, addr: &mut Vec2, val: Vec2) -> bool
pub fn style_push_style_item( &mut self, addr: &mut StyleItem, val: StyleItem, ) -> bool
pub fn style_push_flags(&mut self, addr: &mut Flags, val: Flags) -> bool
pub fn style_push_color(&mut self, addr: &mut Color, val: Color) -> bool
pub fn style_pop_font(&mut self) -> bool
pub fn style_pop_float(&mut self) -> bool
pub fn style_pop_vec2(&mut self) -> bool
pub fn style_pop_style_item(&mut self) -> bool
pub fn style_pop_flags(&mut self) -> bool
pub fn style_pop_color(&mut self) -> bool
pub fn widget_bounds(&mut self) -> Rect
pub fn widget_position(&mut self) -> Vec2
pub fn widget_size(&mut self) -> Vec2
pub fn widget_width(&mut self) -> f32
pub fn widget_height(&mut self) -> f32
pub fn widget_is_hovered(&mut self) -> bool
pub fn widget_is_mouse_clicked(&mut self, b: Button) -> bool
pub fn widget_has_mouse_click_down(&mut self, b: Button, down: bool) -> bool
pub fn widget(&self, arg1: &mut Rect) -> WidgetLayoutState
pub fn spacing(&mut self, cols: i32)
pub fn draw_begin(&self, buf: &Buffer) -> Option<&DrawCommand>
pub fn draw_next<'a>( &self, prev: &DrawCommand, buf: &Buffer, ) -> Option<&'a DrawCommand>
pub fn next_cmd<'a, 'b>(&self, arg2: &'b Command) -> Option<&'a Command>
pub fn begin_cmd(&self) -> Option<&Command>
pub fn draw_command_iterator<'a>( &'a mut self, buf: &'a Buffer, ) -> DrawCommandIterator<'a>
pub fn command_iterator(&mut self) -> CommandIterator<'_>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more