Skip to content

Commit 372b423

Browse files
Update tabs docs
1 parent f9ee80d commit 372b423

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/gui/widgets/tabs.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,19 @@
88
//!
99
//! ## Headless Tabs
1010
//!
11-
//! The [`TabGroup`] entity manages a collection of [`Tab`] entities. Each tab entity should have two children:
12-
//! first for a header and then for content area. The [`TabGroup`] handles user interactions, such as
13-
//! switching between tabs and rendering the appropriate content based on the selected tab.
11+
//! [`Tab`] entities are arranged into groups using a controlling [`TabGroup`] component.
12+
//! The [`TabGroup`] manages which tab is currently active and ensures that only the content of the active tab is visible at any given time.
13+
//! The link between [`Tab`] and [`TabGroup`] entities is established through the [`InTabGroup`]/[`HasTabs`] relationship.
1414
//!
15-
//! These components represent "headless" widgets, meaning they provide the underlying
15+
//! Underneath each [`Tab`] is a content entity, linked via the [`HasContent`]/[`ContentOfTab`] relationship.
16+
//! When a tab is activated, its content is shown, while its sibling tabs' content is hidden.
17+
//!
18+
//! [`TabGroup`]s handles user interactions (e.g., clicking on a tab header) (via [`TabPlugin`]) and updates the content nodes accordingly.
19+
//!
20+
//! These components define "headless" widgets, meaning they provide the underlying
1621
//! functionality without any specific styling or appearance. This allows developers to
1722
//! customize the look and feel of the tabs according to their application's design requirements.
1823
//!
19-
//! This behavior is managed by the [`TabPlugin`], which registers the necessary systems and observers
20-
//! to handle tab interactions and state management.
21-
//!
2224
//! //! # Example
2325
//!
2426
//! ```rust

0 commit comments

Comments
 (0)