Struct kiss_ui::dialog::Dialog [] [src]

pub struct Dialog(_);

A top-level dialog that can create a new native window when shown, and can contain a single widget (which can be a container for many widgets).

Methods

impl Dialog

fn new<W>(contents: W) -> Dialog where W: Widget

Create a new dialog with a single child.

To create a dialog containing multiple widgets, use a struct from the container module.

Note

This does not make the dialog appear on screen. .show() must be called after the dialog has been configured.

Panics

If called outside a valid KISS-UI context.

fn empty() -> Dialog

Create a new dialog with no children.

Panics

If called outside a valid KISS-UI context.

fn set_title<T: Into<String>>(self, title: T) -> Self

Set the title of this dialog, which will appear in the title bar of the native window.

fn set_size_pixels(self, width: u32, height: u32) -> Self

Set the size of this dialog in pixels.

fn get_child(self, name: &str) -> Option<BaseWidget>

Get a child of this dialog named by name.

Returns None if the child was not found.

Trait Implementations

impl Destroy for Dialog

fn destroy(self)

impl Widget for Dialog

fn show(self) -> Self

fn hide(self) -> Self

fn set_visible(self, visible: bool) -> Self

fn set_enabled(self, enabled: bool) -> Self

fn set_position(self, x: i32, y: i32) -> Self

fn get_position(self) -> (i32, i32)

fn set_name(self, name: &str) -> Self

fn get_name(&self) -> Option<WidgetStr>

fn get_sibling(self) -> Option<BaseWidget>

fn get_parent(self) -> Option<BaseWidget>

fn get_dialog(self) -> Option<Dialog>

fn get_size_pixels(self) -> (u32, u32)

fn store<N: Into<String>>(self, name: N) -> Option<BaseWidget>

fn to_base(self) -> BaseWidget

impl Copy for Dialog

impl Clone for Dialog

fn clone(&self) -> Self

fn clone_from(&mut self, source: &Self)

impl Downcast for Dialog

fn can_downcast(base: &BaseWidget) -> bool

fn try_downcast(base: BaseWidget) -> Result<Self, BaseWidget>

impl OnShow for Dialog

fn set_on_show<Cb>(self, on_show: Cb) -> Self where Cb: Callback<Self>