Struct makepad_widgets::Cx

pub struct Cx {
Show 14 fields pub null_texture: Texture, pub windows: CxWindowPool, pub passes: CxPassPool, pub draw_lists: CxDrawListPool, pub draw_matrices: CxDrawMatrixPool, pub textures: CxTexturePool, pub draw_shaders: CxDrawShaders, pub redraw_id: u64, pub keyboard: CxKeyboard, pub fingers: CxFingers, pub live_registry: Rc<RefCell<LiveRegistry>, Global>, pub shader_registry: ShaderRegistry, pub os: CxOs, pub debug: Debug, /* private fields */
}

Fields§

§null_texture: Texture§windows: CxWindowPool§passes: CxPassPool§draw_lists: CxDrawListPool§draw_matrices: CxDrawMatrixPool§textures: CxTexturePool§draw_shaders: CxDrawShaders§redraw_id: u64§keyboard: CxKeyboard§fingers: CxFingers§live_registry: Rc<RefCell<LiveRegistry>, Global>§shader_registry: ShaderRegistry§os: CxOs§debug: Debug

Implementations§

§

impl Cx

pub fn native_load_dependencies(&mut self)

§

impl Cx

pub fn handle_triggers(&mut self)

§

impl Cx

pub fn draw_pass_to_window( &mut self, pass_id: PassId, opengl_window: &mut OpenglWindow )

pub fn get_shared_presentable_image_os_handle( &mut self, texture: &Texture ) -> Image<RemoteFd>

§

impl Cx

pub fn event_loop(cx: Rc<RefCell<Cx>, Global>)

§

impl Cx

pub fn stdin_event_loop(&mut self)

§

impl Cx

pub fn set_default_depth_and_blend_mode()

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)

§

impl Cx

pub fn new(event_handler: Box<dyn FnMut(&mut Cx, &Event), Global>) -> Cx

§

impl Cx

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 update_menu(&mut self, menu: Menu)

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)

§

impl Cx

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,

§

impl Cx

pub fn flush_draw_shaders(&mut self)

§

impl Cx

pub fn get_geometry_ref( &mut self, fingerprint: GeometryFingerprint ) -> GeometryRef

§

impl Cx

pub fn debug_draw_tree(&self, dump_instances: bool, draw_list_id: DrawListId)

Trait Implementations§

§

impl CxDecodingApi for Cx

§

fn video_decoding_input_box( &mut self, _video_id: LiveId, _f: Box<dyn FnMut(Vec<u8, Global>) + Send, Global> )

§

fn video_decoding_input<F>(&mut self, index: LiveId, f: F)where F: FnMut(Vec<u8, Global>) + Send + 'static,

§

impl CxMediaApi for Cx

§

fn midi_input(&mut self) -> MidiInput

§

fn midi_output(&mut self) -> MidiOutput

§

fn midi_reset(&mut self)

§

fn use_midi_inputs(&mut self, ports: &[MidiPortId])

§

fn use_midi_outputs(&mut self, ports: &[MidiPortId])

§

fn use_audio_inputs(&mut self, devices: &[AudioDeviceId])

§

fn use_audio_outputs(&mut self, devices: &[AudioDeviceId])

§

fn audio_output_box( &mut self, index: usize, f: Box<dyn FnMut(AudioInfo, &mut AudioBuffer) + Send, Global> )

§

fn audio_input_box( &mut self, index: usize, f: Box<dyn FnMut(AudioInfo, &AudioBuffer) + Send, Global> )

§

fn video_input_box( &mut self, _index: usize, _f: Box<dyn FnMut(VideoBufferRef<'_>) + Send, Global> )

§

fn use_video_input(&mut self, _inputs: &[(VideoInputId, VideoFormatId)])

§

fn audio_output<F>(&mut self, index: usize, f: F)where F: FnMut(AudioInfo, &mut AudioBuffer) + Send + 'static,

§

fn audio_input<F>(&mut self, index: usize, f: F)where F: FnMut(AudioInfo, &AudioBuffer) + Send + 'static,

§

fn video_input<F>(&mut self, index: usize, f: F)where F: FnMut(VideoBufferRef<'_>) + Send + 'static,

§

impl CxOsApi for Cx

§

fn init_cx_os(&mut self)

§

fn spawn_thread<F>(&mut self, f: F)where F: FnOnce() + Send + 'static,

§

fn start_stdin_service(&mut self)

§

fn pre_start() -> bool

Auto Trait Implementations§

§

impl !RefUnwindSafe for Cx

§

impl !Send for Cx

§

impl !Sync for Cx

§

impl Unpin for Cx

§

impl !UnwindSafe for Cx

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.