Proc macros for components, views
This commit is contained in:
@@ -12,13 +12,15 @@ use std::rc::Rc;
|
||||
|
||||
use ruin_reactivity::effect;
|
||||
use ruin_ui::{
|
||||
Color, CursorIcon, Edges, Element, ElementId, InteractionTree, LayoutSnapshot, PlatformEvent,
|
||||
PointerButton, PointerEvent, PointerRouter, RoutedPointerEvent, RoutedPointerEventKind,
|
||||
TextFontFamily, TextSpan, TextSpanWeight, TextStyle, TextSystem, UiSize, WindowController,
|
||||
WindowSpec, WindowUpdate, layout_snapshot_with_text_system,
|
||||
Border, Color, CursorIcon, Edges, Element, ElementId, InteractionTree, LayoutSnapshot,
|
||||
PlatformEvent, PointerButton, PointerEvent, PointerRouter, RoutedPointerEvent,
|
||||
RoutedPointerEventKind, TextFontFamily, TextSpan, TextSpanWeight, TextStyle, TextSystem,
|
||||
UiSize, WindowController, WindowSpec, WindowUpdate, layout_snapshot_with_text_system,
|
||||
};
|
||||
use ruin_ui_platform_wayland::start_wayland_ui;
|
||||
|
||||
pub use ruin_app_proc_macros::{component, view};
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Box<dyn Error>>;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
@@ -564,6 +566,11 @@ impl ContainerBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn border(mut self, border: Border) -> Self {
|
||||
self.element = self.element.border(border.width, border.color);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn width(mut self, width: f32) -> Self {
|
||||
self.element = self.element.width(width);
|
||||
self
|
||||
@@ -949,7 +956,8 @@ pub mod prelude {
|
||||
pub use crate::{
|
||||
App, ButtonBuilder, Children, Component, ContainerBuilder, FontWeight, IntoEdges, IntoView,
|
||||
Memo, Mountable, Result, Signal, TextBuilder, TextChildren, TextRole, View, Window, block,
|
||||
button, colors, column, row, surfaces, text, use_memo, use_signal, use_window_title,
|
||||
button, colors, column, component, row, surfaces, text, use_memo, use_signal,
|
||||
use_window_title, view,
|
||||
};
|
||||
pub use ruin_ui::{
|
||||
Color, CursorIcon, Edges, Element, ElementId, PointerButton, PointerEventKind,
|
||||
|
||||
Reference in New Issue
Block a user