View
レイアウト、描画、ポインター入力、アクセシビリティに使える汎用の保持型コンテナです。
デモを読み込み中…
div()
.p(20.0)
.gap(12.0)
.child(text("Hello from Rust"))
.child(button().on_click(continue_clicked).child("Continue"))#インポート
quickgui から div をインポートします。
use quickgui::*;#使い方
div()
.p(20.0)
.gap(12.0)
.child(text("Hello from Rust"))
.child(button().on_click(continue_clicked).child("Continue"))#API リファレンス
項目を展開すると説明と完全なシグネチャが表示されます。ダッシュは宣言に既定値が記載されていないことを示します。
div
ソースを見るpub fn div() -> ElementCreate a container element.
bgpub fn bg(mut self, color: Color) -> Self—
pxpub fn px(mut self, value: f32) -> Self—
hoverpub fn hover(mut self, style: impl FnOnce(ElementStateStyle) -> ElementStateStyle) -> Self—
Configures hover for this part.
pub fn hover(mut self, style: impl FnOnce(ElementStateStyle) -> ElementStateStyle) -> Selfソースを見るchildpub fn child(mut self, child: impl IntoElement) -> Self—
on_clickpub fn on_click<V>(mut self, listener: crate::ClickListener<V>) -> Self—
Attach a listener registered by [`crate::ViewContext::listener`].
pub fn on_click<V>(mut self, listener: crate::ClickListener<V>) -> Selfソースを見る