ribir_core 0.4.0-alpha.53

A non-intrusive declarative GUI framework, to build modern native/wasm cross-platform applications.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::prelude::*;

/// A widget that represents an empty node in the widget tree.
///
/// This widget is used when you need a placeholder widget that doesn't render
/// anything and doesn't accept children. It's useful for conditional rendering
/// or as a neutral widget in compositions.
#[derive(Declare)]
pub struct Void;

impl Render for Void {
  fn perform_layout(&self, clamp: BoxClamp, _: &mut LayoutCtx) -> Size { clamp.min }

  fn paint(&self, _: &mut PaintingCtx) {}
}