etui/widgets/popup
Types
Popup configuration. Width/height are in terminal cells.
pub type Popup {
Popup(
width: Int,
height: Int,
title: String,
border: block.Border,
fg: style.Color,
bg: style.Color,
)
}
Constructors
-
Popup( width: Int, height: Int, title: String, border: block.Border, fg: style.Color, bg: style.Color, )
Values
pub fn popup_area(
screen: geometry.Rect,
p: Popup,
) -> geometry.Rect
Inner content area (inside border and padding) for child widgets.
pub fn popup_new(width: Int, height: Int) -> Popup
New popup with given cell dimensions. Default: Rounded border, default colors.
pub fn popup_rect(
screen: geometry.Rect,
p: Popup,
) -> geometry.Rect
Centered rect for this popup within screen.
pub fn render(
buf: buffer.Buffer,
screen: geometry.Rect,
p: Popup,
) -> buffer.Buffer
Render popup overlay. Draw child widgets into popup_area after this.
pub fn with_colors(
p: Popup,
fg: style.Color,
bg: style.Color,
) -> Popup
pub fn with_style(
p: Popup,
fg: style.Color,
bg: style.Color,
) -> Popup
Set foreground and background colors.