Document free functions
This commit is contained in:
@@ -108,6 +108,7 @@ impl<M: ManagedView> PopoverMenu<M> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Creates a [PopoverMenu]
|
||||||
pub fn popover_menu<M: ManagedView>(id: impl Into<ElementId>) -> PopoverMenu<M> {
|
pub fn popover_menu<M: ManagedView>(id: impl Into<ElementId>) -> PopoverMenu<M> {
|
||||||
PopoverMenu {
|
PopoverMenu {
|
||||||
id: id.into(),
|
id: id.into(),
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ impl<M: ManagedView> RightClickMenu<M> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Creates a [RightClickMenu]
|
||||||
pub fn right_click_menu<M: ManagedView>(id: impl Into<ElementId>) -> RightClickMenu<M> {
|
pub fn right_click_menu<M: ManagedView>(id: impl Into<ElementId>) -> RightClickMenu<M> {
|
||||||
RightClickMenu {
|
RightClickMenu {
|
||||||
id: id.into(),
|
id: id.into(),
|
||||||
|
|||||||
@@ -2,17 +2,13 @@ use gpui::{div, Div};
|
|||||||
|
|
||||||
use crate::StyledExt;
|
use crate::StyledExt;
|
||||||
|
|
||||||
/// Horizontally stacks elements.
|
/// Horizontally stacks elements. Sets `flex()`, `flex_row()`, `items_center()`
|
||||||
///
|
|
||||||
/// Sets `flex()`, `flex_row()`, `items_center()`
|
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub fn h_stack() -> Div {
|
pub fn h_stack() -> Div {
|
||||||
div().h_flex()
|
div().h_flex()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Vertically stacks elements.
|
/// Vertically stacks elements. Sets `flex()`, `flex_col()`
|
||||||
///
|
|
||||||
/// Sets `flex()`, `flex_col()`
|
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub fn v_stack() -> Div {
|
pub fn v_stack() -> Div {
|
||||||
div().v_flex()
|
div().v_flex()
|
||||||
|
|||||||
Reference in New Issue
Block a user