本文へスキップ

Splitter

ポインターとキーボードで操作できるハンドルを備えた、サイズ変更可能なペインを作ります。

デモを読み込み中…

#インポート

quickgui から Splitter をインポートします。

use quickgui::*;

#使い方

let splitter = Splitter::new("workspace", &state);
splitter.root().flex_row()

#構成

  • Splitter::root
  • Splitter::pane
  • Splitter::handle

#API リファレンス

項目を展開すると説明と完全なシグネチャが表示されます。ダッシュは宣言に既定値が記載されていないことを示します。

pub fn new(root_id: impl Into<ElementId>, state: &SplitterState) -> Self
root_idpub const fn root_id(self) -> ElementId—

Configures root id for this part.

pub const fn root_id(self) -> ElementId
ソースを見る
statepub const fn state(self) -> SplitterState—

Configures state for this part.

pub const fn state(self) -> SplitterState
ソースを見る
pane_idpub fn pane_id(self, index: usize) -> ElementId—

Configures pane id for this part.

pub fn pane_id(self, index: usize) -> ElementId
ソースを見る
handle_idpub fn handle_id(self, index: usize) -> ElementId—

Configures handle id for this part.

pub fn handle_id(self, index: usize) -> ElementId
ソースを見る
panepub fn pane(self, index: usize) -> Option<SplitterPane>—

Describe one pane.

pub fn pane(self, index: usize) -> Option<SplitterPane>
ソースを見る
handlepub fn handle(self, index: usize) -> Option<SplitterHandle>—

Describe the handle that sits after pane `index`.

pub fn handle(self, index: usize) -> Option<SplitterHandle>
ソースを見る

Splitter::root_with

ソースを見る
pub fn root_with(self, root: Element) -> Element

Decorate an application-owned root without adding appearance. The root becomes a flex container on the split axis because pane order along that axis is the behavior itself. Colors, gaps, borders, and padding stay caller-owned.

Splitter::root

ソースを見る
pub fn root(self) -> Element

Create the unstyled root part. Use [`Self::root_with`] to supply an existing element.