Struct fltk_decl::DeclarativeApp
source · pub struct DeclarativeApp { /* private fields */ }Expand description
Entry point for your declarative app
Implementations§
source§impl DeclarativeApp
impl DeclarativeApp
sourcepub fn new(
w: i32,
h: i32,
label: &str,
path: &'static str,
load_fn: fn(_: &'static str) -> Option<Widget>
) -> Self
pub fn new( w: i32, h: i32, label: &str, path: &'static str, load_fn: fn(_: &'static str) -> Option<Widget> ) -> Self
Instantiate a new declarative app
sourcepub fn new_inline(w: i32, h: i32, label: &str, widget: Option<Widget>) -> Self
pub fn new_inline(w: i32, h: i32, label: &str, widget: Option<Widget>) -> Self
Instantiate a new declarative app
sourcepub fn run<F: FnMut(&mut Window) + 'static>(
&self,
run_cb: F
) -> Result<(), Box<dyn Error>>
pub fn run<F: FnMut(&mut Window) + 'static>( &self, run_cb: F ) -> Result<(), Box<dyn Error>>
Run your declarative app. The callback exposes the app’s main window
sourcepub fn run_once<F: FnMut(&mut Window) + 'static>(
&self,
run_cb: F
) -> Result<(), Box<dyn Error>>
pub fn run_once<F: FnMut(&mut Window) + 'static>( &self, run_cb: F ) -> Result<(), Box<dyn Error>>
Run the app without hot-reloading!
sourcepub fn dump_image(&self)
pub fn dump_image(&self)
Just load the image of the window
Trait Implementations§
source§impl Clone for DeclarativeApp
impl Clone for DeclarativeApp
source§fn clone(&self) -> DeclarativeApp
fn clone(&self) -> DeclarativeApp
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl RefUnwindSafe for DeclarativeApp
impl Send for DeclarativeApp
impl Sync for DeclarativeApp
impl Unpin for DeclarativeApp
impl UnwindSafe for DeclarativeApp
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