pub struct RelmApp<Model>where
Model: ModelTrait + AppUpdate + 'static,
Model::Widgets: WidgetsTrait<Model, ()> + 'static,
<Model::Widgets as WidgetsTrait<Model, ()>>::Root: IsA<ApplicationWindow> + IsA<Window>,
Model::Components: Components<Model> + 'static,{ /* private fields */ }
Expand description
Implementations§
source§impl<Model> RelmApp<Model>where
Model: ModelTrait + AppUpdate + 'static,
Model::Widgets: WidgetsTrait<Model, ()> + 'static,
<Model::Widgets as WidgetsTrait<Model, ()>>::Root: IsA<ApplicationWindow> + IsA<Window>,
Model::Components: Components<Model> + 'static,
impl<Model> RelmApp<Model>where Model: ModelTrait + AppUpdate + 'static, Model::Widgets: WidgetsTrait<Model, ()> + 'static, <Model::Widgets as WidgetsTrait<Model, ()>>::Root: IsA<ApplicationWindow> + IsA<Window>, Model::Components: Components<Model> + 'static,
sourcepub fn run(&self)
pub fn run(&self)
Runs the application, returns once the application is closed.
Unlike gtk::Application::run
, this function
does not handle command-line arguments. To pass arguments to GTK, use
RelmApp::run_with_args
.
sourcepub fn run_with_args<S>(&self, args: &[S])where
S: AsRef<str>,
pub fn run_with_args<S>(&self, args: &[S])where S: AsRef<str>,
Runs the application with the provided command-line arguments, returns once the application is closed.
sourcepub fn with_app(model: Model, app: Application) -> Self
pub fn with_app(model: Model, app: Application) -> Self
Create a new Relm4 application with an existing gtk::Application
.