pub trait View: 'static {
// Required methods
fn id(&self) -> ViewId;
fn metrics(&self) -> ViewMetrics;
fn present(&self, picture: Arc<Picture>);
// Provided methods
fn gesture_settings(&self) -> GestureSettings { ... }
fn start_text_input(&self, configuration: &TextInputConfiguration) { ... }
fn stop_text_input(&self) { ... }
fn set_text_input_editing_state(&self, value: &TextEditingValue) { ... }
fn set_text_input_composing_rect(&self, rect: Rect) { ... }
fn set_text_input_caret_rect(&self, rect: Rect) { ... }
fn set_text_input_client_geometry(&self, size: Size, transform: &Matrix4) { ... }
}Expand description
A stable handle to one host-provided view.
present is Flutter FlutterView.render. The host owns
the surface; the framework records a crate::Picture and hands it over.
Required Methods§
Provided Methods§
Sourcefn gesture_settings(&self) -> GestureSettings
fn gesture_settings(&self) -> GestureSettings
Flutter FlutterView.gestureSettings.
Sourcefn start_text_input(&self, configuration: &TextInputConfiguration)
fn start_text_input(&self, configuration: &TextInputConfiguration)
Flutter TextInput.attach / TextInputConnection.show: start an IME
session for this view. The default drops it.
Sourcefn stop_text_input(&self)
fn stop_text_input(&self)
Flutter TextInputConnection.close: end the IME session. The default
drops it.
Sourcefn set_text_input_editing_state(&self, value: &TextEditingValue)
fn set_text_input_editing_state(&self, value: &TextEditingValue)
Flutter TextInputConnection.setEditingState. The default drops it.
Sourcefn set_text_input_composing_rect(&self, rect: Rect)
fn set_text_input_composing_rect(&self, rect: Rect)
Flutter TextInput.setComposingRect. The default drops it.
Sourcefn set_text_input_caret_rect(&self, rect: Rect)
fn set_text_input_caret_rect(&self, rect: Rect)
Flutter TextInput.setCaretRect. The default drops it.
Sourcefn set_text_input_client_geometry(&self, size: Size, transform: &Matrix4)
fn set_text_input_client_geometry(&self, size: Size, transform: &Matrix4)
Flutter TextInput.setEditableSizeAndTransform. The default drops it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".