Skip to main content

sequoia_view/
lib.rs

1#![forbid(unsafe_code)]
2
3pub mod a11y;
4mod animated;
5mod any;
6pub mod app;
7pub mod async_view;
8mod backdrop;
9mod canvas;
10mod clock;
11pub mod dev_overlay;
12mod dnd;
13mod dock;
14pub mod dock_float;
15pub mod dock_view;
16pub mod dock_window;
17pub mod dockable;
18pub mod edge_dock;
19pub mod error_boundary;
20mod filter_view;
21mod focus_ring;
22mod hit_shape;
23mod icon;
24mod image;
25mod layout_live;
26mod leaf;
27mod list;
28pub mod live;
29mod live_view;
30mod modifiers;
31mod overlay;
32mod paint_draw;
33mod painter;
34mod portal;
35mod presence;
36mod responsive;
37mod rich_text;
38mod runtime;
39mod scroll_view;
40mod scrub;
41mod split_panel;
42mod styleable;
43mod surface;
44pub mod table;
45pub mod thumbnail;
46mod track;
47mod transition;
48pub mod tree;
49mod value;
50mod view;
51mod views;
52mod virtual_list;
53
54pub use a11y::{Accessible, AccessibleNode, AccessibleRole};
55pub use animated::{
56    Animated, MAX_ANIM_DT, Opacity, Pulse, Shake, Translate, fade_sample, pop_sample, pulse_sample,
57    shake_sample, slide_progress,
58};
59pub use any::AnyView;
60pub use async_view::AsyncView;
61pub use backdrop::BackdropBlur;
62pub use canvas::{Canvas, KeyBinding};
63pub use clock::{FrameClock, MAX_FRAME_STEP_SECS};
64pub use dev_overlay::DevOverlay;
65pub use dnd::{
66    DRAG_THRESHOLD, DragEnd, DragId, DragOptions, DragPayload, DragSession, DropPosition,
67    exceeded_threshold, grab_offset, insertion_index, move_item, preview_origin,
68};
69pub use dock::DockArea;
70pub use dock_float::DockFloatLayer;
71pub use dock_view::{DockSlot, DockView};
72pub use dock_window::{DetachedWindow, DockWindowHost, DockWindowRoot};
73pub use dockable::{DockHeader, DockPanel, Dockable};
74pub use edge_dock::{
75    EDGE_GHOST_PX, EDGE_HINT_PX, EDGE_LINE_PX, EdgeGhost, EdgeSide, EdgeSlab, MIN_VISIBLE_H,
76    MIN_VISIBLE_W, UNDOCK_THRESHOLD_PX, clamp_card_top_left, edge_ghost_rect, edge_hint_at,
77    exceeded_undock, main_first_index,
78};
79pub use error_boundary::ErrorBoundary;
80pub use filter_view::{
81    BackdropFiltered, DrawGradientMask, EffectNode, FilterExt, Filtered, draw_gradient_mask,
82};
83pub use focus_ring::{FocusRing, RING_OFFSET, RING_WIDTH, ring_rect};
84pub use hit_shape::{HitCircle, HitRect};
85pub use icon::Icon;
86pub use image::Image;
87pub use layout_live::AnimatedSize;
88pub use leaf::Leaf;
89pub use list::List;
90pub use live::{AnimSpec, Live, MemoLiveExt, Prop, SignalLiveExt, SpringSpec};
91pub use live_view::{LiveBackground, LiveExt, LiveOffset, LiveOpacity};
92pub use modifiers::{
93    Clip, Enter, Motion, Rotated, Scaled, StatePatch, States, ViewModifiers, When, fade, slide_y,
94    when,
95};
96pub use overlay::{
97    Anchor, Dismiss, InputMode, OverlayEntry, OverlayId, OverlayLayer, OverlayOverflow, Placement,
98    Position,
99};
100pub use painter::Painter;
101pub use portal::{DismissableLayer, Popper, Portal};
102pub use presence::{
103    ENTER_SECS, EXIT_SECS, Presence, enter_progress, enter_sample, exit_done, exit_progress,
104    exit_sample,
105};
106pub use responsive::{
107    Breakpoint, Breakpoints, Responsive, ScreenOrientation, WithSize, orientation_of,
108    screen_orientation_of,
109};
110pub use rich_text::RichText;
111pub use runtime::{ElementId, InteractState, Runtime, RuntimeError, Stats, ViewState};
112pub use scroll_view::{ScrollAxis, ScrollView, ScrollbarVisibility};
113pub use scrub::Scrub;
114pub use sequoia_animation::Easing;
115pub use sequoia_dock::{
116    DecodeError, DockDrop, DockModel, DockNode, DockOp, FloatingPanel, PanelId, PanelPayload,
117    SplitAxis, decode as dock_decode, drop_from_fraction, drop_from_fraction_or_float,
118    encode as dock_encode, preview_rect as dock_preview_rect,
119};
120pub use split_panel::SplitPanel;
121pub use styleable::{Decoratable, Styleable};
122pub use surface::{SurfaceDraw, SurfaceInputBinding};
123pub use table::{SortDir, Table, TableColumn, table_filters};
124pub use thumbnail::{ThumbnailCache, shared_cache};
125pub use track::{Orientation, Pad2D, Track1D};
126pub use transition::{Sequence, SequenceFrame, fade_in, pop_in, slide_in, stagger};
127pub use tree::{FlatRow, TreeNode, TreeView};
128pub use value::{Value, ValueExt, derived, spring_spec, value};
129pub use view::{CustomLayout, EventCtx, PaintCtx, TextMetrics, View};
130pub use views::{
131    AspectRatio, Column, FocusScope, Fragment, Grid, IntoChildren, Margined, Masonry, Panel, Row,
132    Spacer, Stack, StackPos, Text, Unit, Wrap,
133};
134pub use virtual_list::VirtualList;
135
136pub use sequoia_assets::{
137    AssetRegistry, MAX_PHOTO_DIM, PhotoError, Sprite, decode_pixels, decode_pixels_thumbnail,
138    icon_key, load_pixels, load_pixels_thumbnail,
139};
140
141pub use sequoia_core::{
142    BrushStroke, Fill, GradientKind, GradientStops, MAX_GRADIENT_STOPS, Pixels, Size, WindowId,
143};
144
145pub use sequoia_draw::{
146    Dash, FillRule, Gradient, GradientStop, LineCap, LineJoin, MinMax, Path, Peaks, Radius,
147    RasterOptions, Shape, ShapeCache, ShapeStats, Span, StrokeStyle, Transform, WaveformCache,
148    WaveformOpts, bake_strip, layout_bars, waveform_line_points, white_noise,
149};
150
151pub use paint_draw::GRADIENT_BAND_PX;
152
153pub use sequoia_input::{
154    CursorIcon, DropEffect, Event, EventPhase, Key, KeyEvent, Modifiers, PenTool, PointerButton,
155    PointerEvent, effect_for_modifiers,
156};
157pub use sequoia_layout::{
158    Align, Axis, ContainerStyle, Dock, DockStyle, FlexItem, GridFlow, GridPlacement, GridStyle,
159    Indents, Inset, Justify, LayoutCtx, LayoutStyle, MasonryStyle, Overflow, Track,
160};
161pub use sequoia_style::{
162    Backdrop, BorderSide, BoxStyle, Effect, Filter, Mask, ShadowSpec, VisualState,
163};
164pub use sequoia_text::{
165    ElideMode, FontStyle, FontWeight, LetterSpacing, RichAlign, RichCaret, RichHit, RichLine,
166    RichParagraph, RichRect, TextSpan, WrapMode,
167};
168
169pub mod prelude {
170    pub use crate::a11y::{Accessible, AccessibleNode, AccessibleRole};
171    pub use crate::animated::{Animated, Opacity, Pulse, Shake, Translate};
172    pub use crate::any::AnyView;
173    pub use crate::async_view::AsyncView;
174    pub use crate::backdrop::BackdropBlur;
175    pub use crate::canvas::{Canvas, KeyBinding};
176    pub use crate::dev_overlay::DevOverlay;
177    pub use crate::dnd::{
178        DRAG_THRESHOLD, DragEnd, DragId, DragOptions, DragPayload, DragSession, DropPosition,
179        exceeded_threshold, grab_offset, insertion_index, move_item, preview_origin,
180    };
181    pub use crate::dock::DockArea;
182    pub use crate::dock_float::DockFloatLayer;
183    pub use crate::dock_view::{DockSlot, DockView};
184    pub use crate::dock_window::{DetachedWindow, DockWindowHost, DockWindowRoot};
185    pub use crate::dockable::{DockHeader, DockPanel, Dockable};
186    pub use crate::edge_dock::{
187        EDGE_GHOST_PX, EDGE_HINT_PX, EDGE_LINE_PX, EdgeGhost, EdgeSide, EdgeSlab,
188        clamp_card_top_left, edge_ghost_rect, edge_hint_at, exceeded_undock, main_first_index,
189    };
190    pub use crate::error_boundary::ErrorBoundary;
191    pub use crate::filter_view::{
192        BackdropFiltered, EffectNode, FilterExt, Filtered, draw_gradient_mask,
193    };
194    pub use crate::focus_ring::{FocusRing, RING_OFFSET, RING_WIDTH, ring_rect};
195    pub use crate::hit_shape::{HitCircle, HitRect};
196    pub use crate::icon::Icon;
197    pub use crate::image::Image;
198    pub use crate::layout_live::AnimatedSize;
199    pub use crate::leaf::Leaf;
200    pub use crate::list::List;
201    pub use crate::live::{AnimSpec, Live, MemoLiveExt, Prop, SignalLiveExt, SpringSpec};
202    pub use crate::live_view::{LiveBackground, LiveExt, LiveOffset, LiveOpacity};
203    pub use crate::modifiers::{
204        Clip, Enter, Motion, Rotated, Scaled, StatePatch, States, ViewModifiers, When, fade,
205        slide_y, when,
206    };
207    pub use crate::overlay::{
208        Anchor, Dismiss, InputMode, OverlayEntry, OverlayId, OverlayLayer, OverlayOverflow,
209        Placement, Position,
210    };
211    pub use crate::painter::Painter;
212    pub use crate::portal::{DismissableLayer, Popper, Portal};
213    pub use crate::presence::{
214        ENTER_SECS, EXIT_SECS, Presence, enter_progress, enter_sample, exit_done, exit_progress,
215        exit_sample,
216    };
217    pub use crate::responsive::{
218        Breakpoint, Breakpoints, Responsive, ScreenOrientation, WithSize, orientation_of,
219        screen_orientation_of,
220    };
221    pub use crate::rich_text::RichText;
222    pub use crate::runtime::{ElementId, InteractState, Runtime, RuntimeError, Stats, ViewState};
223    pub use crate::scroll_view::{ScrollAxis, ScrollView, ScrollbarVisibility};
224    pub use crate::scrub::Scrub;
225    pub use crate::split_panel::SplitPanel;
226    pub use crate::styleable::{Decoratable, Styleable};
227    pub use crate::surface::{SurfaceDraw, SurfaceInputBinding};
228    pub use crate::table::{SortDir, Table, TableColumn};
229    pub use crate::thumbnail::{ThumbnailCache, shared_cache};
230    pub use crate::track::{Orientation, Pad2D, Track1D};
231    pub use crate::transition::{Sequence, fade_in, pop_in, slide_in, stagger};
232    pub use crate::tree::{FlatRow, TreeNode, TreeView};
233    pub use crate::value::{Value, ValueExt, derived, spring_spec, value};
234    pub use crate::view::{CustomLayout, EventCtx, PaintCtx, TextMetrics, View};
235    pub use crate::views::{
236        AspectRatio, Column, FocusScope, Fragment, Grid, IntoChildren, Margined, Masonry, Panel,
237        Row, Spacer, Stack, StackPos, Text, Unit, Wrap,
238    };
239    pub use crate::virtual_list::VirtualList;
240    pub use sequoia_animation::Easing;
241
242    pub use sequoia_assets::{
243        AssetRegistry, MAX_PHOTO_DIM, PhotoError, Sprite, decode_pixels, decode_pixels_thumbnail,
244        load_pixels, load_pixels_thumbnail,
245    };
246    pub use sequoia_core::BrushStop;
247    pub use sequoia_core::{
248        BrushStroke, Fill, GradientKind, GradientStops, MAX_GRADIENT_STOPS, Pixels, WindowId,
249    };
250    pub use sequoia_draw::{
251        Dash, FillRule, Gradient, GradientStop, LineCap, LineJoin, MinMax, Path, Peaks, Radius,
252        RasterOptions, Shape, ShapeCache, StrokeStyle, Transform, WaveformCache, WaveformOpts,
253        bake_strip, layout_bars, waveform_line_points, white_noise,
254    };
255    pub use sequoia_input::{
256        CursorIcon, DropEffect, Event, EventPhase, Key, KeyEvent, Modifiers, PenTool,
257        PointerButton, PointerEvent, effect_for_modifiers,
258    };
259    pub use sequoia_layout::{
260        Align, Axis, ContainerStyle, Dock, DockStyle, FlexItem, GridFlow, GridPlacement, GridStyle,
261        Indents, Inset, Justify, LayoutCtx, LayoutStyle, MasonryStyle, Overflow, Track, WrapStyle,
262    };
263    pub use sequoia_style::{Backdrop, BorderSide, BoxStyle, Effect, Filter, Mask, ShadowSpec};
264    pub use sequoia_text::{
265        ElideMode, FontStyle, FontWeight, LetterSpacing, RichAlign, RichCaret, RichHit, RichLine,
266        RichParagraph, RichRect, TextSpan, WrapMode,
267    };
268}