Struct makepad_widgets::Cx2d
source · pub struct Cx2d<'a> {
pub cx: &'a mut Cx,
pub draw_list_stack: Vec<DrawListId, Global>,
pub fonts_atlas_rc: CxFontsAtlasRc,
pub icon_atlas_rc: CxIconAtlasRc,
pub nav_tree_rc: CxNavTreeRc,
/* private fields */
}
Fields§
§cx: &'a mut Cx
§draw_list_stack: Vec<DrawListId, Global>
§fonts_atlas_rc: CxFontsAtlasRc
§icon_atlas_rc: CxIconAtlasRc
Implementations§
source§impl<'a> Cx2d<'a>
impl<'a> Cx2d<'a>
pub fn new(cx: &'a mut Cx, draw_event: &'a DrawEvent) -> Cx2d<'a>
pub fn current_dpi_factor(&self) -> f64
pub fn inside_pass(&self) -> bool
pub fn make_child_pass(&mut self, pass: &Pass)
pub fn begin_pass(&mut self, pass: &Pass, dpi_override: Option<f64>)
pub fn end_pass(&mut self, pass: &Pass)
pub fn set_pass_area(&mut self, pass: &Pass, area: Area)
pub fn set_pass_scaled_area(&mut self, pass: &Pass, area: Area, scale: f64)
pub fn current_pass_size(&self) -> DVec2
pub fn will_redraw(&self, draw_list_2d: &mut DrawList2d, walk: Walk) -> bool
source§impl<'a> Cx2d<'a>
impl<'a> Cx2d<'a>
pub fn new_draw_call(&mut self, draw_vars: &DrawVars) -> Option<&mut CxDrawItem>
pub fn append_to_draw_call( &mut self, draw_vars: &DrawVars ) -> Option<&mut CxDrawItem>
pub fn get_current_draw_list_id(&self) -> Option<DrawListId>
pub fn get_draw_call( &mut self, append: bool, draw_vars: &DrawVars ) -> Option<&mut CxDrawItem>
pub fn begin_many_instances( &mut self, draw_vars: &DrawVars ) -> Option<ManyInstances>
pub fn begin_many_aligned_instances( &mut self, draw_vars: &DrawVars ) -> Option<ManyInstances>
pub fn end_many_instances(&mut self, many_instances: ManyInstances) -> Area
pub fn add_instance(&mut self, draw_vars: &DrawVars) -> Area
pub fn add_aligned_instance(&mut self, draw_vars: &DrawVars) -> Area
pub fn add_aligned_rect_area(&mut self, area: &mut Area, rect: Rect)
source§impl<'a> Cx2d<'a>
impl<'a> Cx2d<'a>
pub fn turtle(&self) -> &Turtle
pub fn turtle_mut(&mut self) -> &mut Turtle
pub fn begin_turtle(&mut self, walk: Walk, layout: Layout)
pub fn defer_walk(&mut self, walk: Walk) -> Option<DeferWalk>
pub fn begin_pass_sized_turtle(&mut self, layout: Layout)
pub fn end_pass_sized_turtle(&mut self)
pub fn end_pass_sized_turtle_with_shift(&mut self, area: Area, shift: DVec2)
pub fn begin_turtle_with_guard( &mut self, walk: Walk, layout: Layout, guard_area: Area )
pub fn turtle_has_align_items(&mut self) -> bool
pub fn end_turtle(&mut self) -> Rect
pub fn end_turtle_with_area(&mut self, area: &mut Area)
pub fn end_turtle_with_guard(&mut self, guard_area: Area) -> Rect
pub fn walk_turtle(&mut self, walk: Walk) -> Rect
pub fn walk_turtle_with_area(&mut self, area: &mut Area, walk: Walk) -> Rect
pub fn walk_turtle_with_align(&mut self, walk: Walk, align_start: usize) -> Rect
pub fn peek_walk_turtle(&self, walk: Walk) -> Rect
pub fn walk_turtle_would_be_visible(&mut self, walk: Walk) -> bool
pub fn peek_walk_pos(&self, walk: Walk) -> DVec2
pub fn get_turtle_align_range(&self) -> TurtleAlignRange
pub fn shift_align_range(&mut self, range: &TurtleAlignRange, shift: DVec2)
pub fn add_rect_area(&mut self, area: &mut Area, rect: Rect)
source§impl<'a> Cx2d<'a>
impl<'a> Cx2d<'a>
pub fn lazy_construct_font_atlas(cx: &mut Cx)
pub fn reset_fonts_atlas(cx: &mut Cx)
pub fn draw_font_atlas(&mut self)
source§impl<'a> Cx2d<'a>
impl<'a> Cx2d<'a>
pub fn add_begin_scroll(&mut self) -> NavScrollIndex
pub fn add_end_scroll(&mut self, index: NavScrollIndex, area: Area)
source§impl<'a> Cx2d<'a>
impl<'a> Cx2d<'a>
pub fn lazy_construct_icon_atlas(cx: &mut Cx)
pub fn reset_icon_atlas(cx: &mut Cx)
pub fn draw_icon_atlas(&mut self)
Methods from Deref<Target = Cx>§
pub fn native_load_dependencies(&mut self)
pub fn handle_triggers(&mut self)
pub fn draw_pass_to_window( &mut self, pass_id: PassId, opengl_window: &mut OpenglWindow )
pub fn stdin_event_loop(&mut self)
pub fn setup_render_pass(&mut self, pass_id: PassId) -> Option<DVec2>
pub fn draw_pass_to_texture(&mut self, pass_id: PassId, texture_id: TextureId)
pub fn draw_pass_to_magic_texture(&mut self, pass_id: PassId)
pub fn opengl_compile_shaders(&mut self)
pub fn xr_capabilities(&self) -> &XrCapabilities
pub fn get_ref(&self) -> CxRef
pub fn get_dependency( &self, path: &str ) -> Result<Rc<Vec<u8, Global>, Global>, String>
pub fn null_texture(&self) -> Texture
pub fn redraw_id(&self) -> u64
pub fn os_type(&self) -> &OsType
pub fn in_makepad_studio(&self) -> bool
pub fn cpu_cores(&self) -> usize
pub fn gpu_info(&self) -> &GpuInfo
pub fn push_unique_platform_op(&mut self, op: CxOsOp)
pub fn show_text_ime(&mut self, area: Area, pos: DVec2)
pub fn hide_text_ime(&mut self)
pub fn text_ime_was_dismissed(&mut self)
pub fn show_clipboard_actions(&mut self, selected: String)
pub fn start_dragging(&mut self, items: Vec<DragItem, Global>)
pub fn set_cursor(&mut self, cursor: MouseCursor)
pub fn sweep_lock(&mut self, value: Area)
pub fn sweep_unlock(&mut self, value: Area)
pub fn start_timeout(&mut self, interval: f64) -> Timer
pub fn start_interval(&mut self, interval: f64) -> Timer
pub fn stop_timer(&mut self, timer: Timer)
pub fn xr_start_presenting(&mut self)
pub fn xr_stop_presenting(&mut self)
pub fn get_dpi_factor_of(&mut self, area: &Area) -> f64
pub fn get_delegated_dpi_factor(&mut self, pass_id: PassId) -> f64
pub fn redraw_pass_and_parent_passes(&mut self, pass_id: PassId)
pub fn get_pass_rect(&self, pass_id: PassId, dpi: f64) -> Option<Rect>
pub fn get_pass_rect2(&self, pass_id: PassId, dpi: f64) -> Option<Rect>
pub fn get_pass_name(&self, pass_id: PassId) -> &str
pub fn repaint_pass(&mut self, pass_id: PassId)
pub fn repaint_pass_and_child_passes(&mut self, pass_id: PassId)
pub fn redraw_pass_and_child_passes(&mut self, pass_id: PassId)
pub fn redraw_all(&mut self)
pub fn redraw_area(&mut self, area: Area)
pub fn redraw_area_and_children(&mut self, area: Area)
pub fn redraw_list(&mut self, draw_list_id: DrawListId)
pub fn redraw_list_and_children(&mut self, draw_list_id: DrawListId)
pub fn get_ime_area_rect(&self) -> Rect
pub fn update_area_refs(&mut self, old_area: Area, new_area: Area) -> Area
pub fn set_key_focus(&mut self, focus_area: Area)
pub fn revert_key_focus(&mut self)
pub fn has_key_focus(&self, focus_area: Area) -> bool
pub fn new_next_frame(&mut self) -> NextFrame
pub fn send_trigger(&mut self, area: Area, trigger: Trigger)
pub fn set_global<T>(&mut self, value: T)where T: 'static + Any,
pub fn get_global<T>(&mut self) -> &mut Twhere T: 'static + Any,
pub fn has_global<T>(&mut self) -> boolwhere T: 'static + Any,
pub fn global<T>(&mut self) -> &mut Twhere T: 'static + Any + Default,
pub fn spawner(&self) -> &Spawner
pub fn http_request(&mut self, request_id: LiveId, request: HttpRequest)
pub fn web_socket_open(&mut self, request_id: LiveId, request: HttpRequest)
pub fn web_socket_send_binary( &mut self, request_id: LiveId, data: Vec<u8, Global> )
pub fn initialize_video_decoding( &mut self, video_id: LiveId, video: Rc<Vec<u8, Global>, Global>, chunk_size: usize )
pub fn decode_next_video_chunk( &mut self, video_id: LiveId, max_frames_to_decode: usize )
pub fn fetch_next_video_frames( &mut self, video_id: LiveId, number_frames: usize )
pub fn cleanup_video_decoding(&mut self, video_id: LiveId)
pub fn println_resources(&self)
pub fn apply_error_tuple_enum_arg_not_found( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], enum_id: LiveId, base: LiveId, arg: usize )
pub fn apply_error_named_enum_invalid_prop( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], enum_id: LiveId, base: LiveId, prop: LiveId )
pub fn apply_error_wrong_enum_base( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], enum_id: LiveId, base: LiveId )
pub fn apply_error_wrong_struct_name( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], struct_id: LiveId, got_id: LiveId )
pub fn apply_error_wrong_type_for_struct( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], struct_id: LiveId )
pub fn apply_error_wrong_enum_variant( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], enum_id: LiveId, variant: LiveId )
pub fn apply_error_expected_enum( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode] )
pub fn apply_error_expected_array( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode] )
pub fn apply_error_no_matching_field( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode] )
pub fn apply_error_wrong_type_for_value( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode] )
pub fn apply_error_component_not_found( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], id: LiveId )
pub fn apply_error_wrong_value_type_for_primitive( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], prim: &str )
pub fn apply_error_wrong_expression_type_for_primitive( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], prim: &str, b: LiveEval )
pub fn apply_error_animation_missing_state( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], track: LiveId, state_id: LiveId, ids: &[LiveProp] )
pub fn apply_error_wrong_animation_track_used( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], id: LiveId, expect: LiveId, got: LiveId )
pub fn apply_error_animate_to_unknown_track( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], id: LiveId, state_id: LiveId )
pub fn apply_error_empty_object( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode] )
pub fn apply_key_frame_cannot_be_interpolated( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], a: &LiveValue, b: &LiveValue )
pub fn apply_animate_missing_apply_block( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode] )
pub fn apply_error_cant_find_target( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], id: LiveId )
pub fn apply_image_type_not_supported( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], path: &str )
pub fn apply_image_decoding_failed( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], path: &str, msg: &str )
pub fn apply_resource_not_loaded( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], path: &str, msg: &str )
pub fn apply_error_eval(&mut self, err: LiveError)
pub fn apply_error( &mut self, origin: LiveErrorOrigin, index: usize, nodes: &[LiveNode], message: String )
pub fn start_disk_live_file_watcher(&mut self, milis: u64)
pub fn handle_live_edit(&mut self) -> bool
pub fn live_expand(&mut self)
pub fn live_scan_dependencies(&mut self)
pub fn register_live_body(&mut self, live_body: LiveBody)
pub fn get_nodes_from_live_ptr<CB>(&mut self, live_ptr: LivePtr, cb: CB)where CB: FnOnce(&mut Cx, LiveFileId, usize, &[LiveNode]) -> usize,
pub fn flush_draw_shaders(&mut self)
pub fn get_geometry_ref( &mut self, fingerprint: GeometryFingerprint ) -> GeometryRef
pub fn debug_draw_tree(&self, dump_instances: bool, draw_list_id: DrawListId)
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Cx2d<'a>
impl<'a> !Send for Cx2d<'a>
impl<'a> !Sync for Cx2d<'a>
impl<'a> Unpin for Cx2d<'a>
impl<'a> !UnwindSafe for Cx2d<'a>
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