Skip to main content

nifty_runtime/
lib.rs

1//! Platform-independent core of the Nifty runtime: a retained tree of native widgets with
2//! flexbox layout, and the engine that keeps an app's windows in step with its state. Each
3//! platform crate implements [`Backend`] with that OS's widgets.
4
5#[macro_use]
6mod coded;
7
8mod backend;
9mod dialog;
10mod download;
11mod failure;
12mod geometry;
13mod layout;
14mod menu;
15mod path;
16mod paths;
17mod reactive;
18mod state;
19mod style;
20#[cfg(any(test, feature = "testing"))]
21pub mod testing;
22mod ui;
23
24pub use backend::{
25    Backend, ClickHandler, CloseHandler, DropHandler, MenuHandler, NumberHandler, Parent,
26    ResizeHandler, TextHandler, ToggleHandler, WakeHandler, Waker,
27};
28pub use dialog::{DialogHandler, DialogKind, Dialogs, FileDialog, Picked, ShowDialog};
29pub use download::{DownloadCommand, DownloadField};
30pub use failure::{Failure, MAX_CALL_DEPTH};
31pub use geometry::{Frame, Point, Size};
32pub use menu::{ALT, Key, Menu, MenuEntry, SHIFT, Shortcut, ShortcutError, SystemCommand};
33pub use path::Step;
34pub use paths::{NoHomeFolder, expand_home};
35pub use reactive::{
36    AppTemplate, Engine, ErrorHandler, Logic, MenuBar, Shown, Template, Templates, Widget,
37    WindowAction, WindowRequest, WindowTemplate,
38};
39pub use state::{StateId, StateSet};
40pub use style::{
41    Align, Axis, Backdrop, ButtonStyle, Icon, ImageSize, Justify, LabelStyle, StackStyle, Surface,
42    TextAlign, TextColor, TextStyle, ToggleStyle,
43};
44pub use ui::{Node, Position, Ui, WindowCloseHandler, WindowId};