[][src]Struct cursive::views::Panel

pub struct Panel<V: View> { /* fields omitted */ }

Draws a border around a wrapped view.

Methods

impl<V: View> Panel<V>[src]

pub fn new(view: V) -> Self[src]

Creates a new panel around the given view.

pub fn get_inner(&self) -> &V[src]

Gets access to the inner view.

pub fn get_inner_mut(&mut self) -> &mut V[src]

Gets mutable access to the inner view.

pub fn title<S: Into<String>>(self, label: S) -> Self[src]

Sets the title of the dialog.

If not empty, it will be visible at the top.

pub fn set_title<S: Into<String>>(&mut self, label: S)[src]

Sets the title of the dialog.

pub fn title_position(self, align: HAlign) -> Self[src]

Sets the horizontal position of the title in the dialog. The default position is HAlign::Center

pub fn set_title_position(&mut self, align: HAlign)[src]

Sets the horizontal position of the title in the dialog. The default position is HAlign::Center

Trait Implementations

impl<V: View> ViewWrapper for Panel<V>[src]

type V = V

Type that this view wraps.

fn wrap_take_focus(&mut self, source: Direction) -> bool[src]

Wraps the take_focus method.

fn wrap_call_on_any<'a>(&mut self, selector: &Selector, callback: AnyCb<'a>)[src]

Wraps the find method.

fn wrap_focus_view(&mut self, selector: &Selector) -> Result<(), ()>[src]

Wraps the focus_view method.

impl<V: Debug + View> Debug for Panel<V>[src]

Auto Trait Implementations

impl<V> Unpin for Panel<V> where
    V: Unpin

impl<V> Sync for Panel<V> where
    V: Sync

impl<V> Send for Panel<V> where
    V: Send

impl<V> UnwindSafe for Panel<V> where
    V: UnwindSafe

impl<V> RefUnwindSafe for Panel<V> where
    V: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]