Struct fltk::dialog::HelpDialog

source ·
pub struct HelpDialog { /* private fields */ }
Expand description

Creates a help dialog

Implementations§

source§

impl HelpDialog

source

pub fn new(x: i32, y: i32, w: i32, h: i32) -> HelpDialog

Creates a new Help dialog with position(x, y) and size(w, h)

source

pub fn hide(&mut self)

Hides the help dialog

source

pub fn load<P: AsRef<Path>>(&mut self, file: P) -> Result<(), FltkError>

Loads a file for the help dialog

Errors

Errors on non-existent path

source

pub fn position(&mut self, x: i32, y: i32)

Sets the position of the help dialog

source

pub fn resize(&mut self, x: i32, y: i32, w: i32, h: i32)

Resizes the help dialog

source

pub fn show(&mut self)

Shows the help dialog

source

pub fn set_text_size(&mut self, s: i32)

Sets the text size

source

pub fn text_size(&self) -> i32

Returns the text size

source

pub fn set_value(&mut self, f: &str)

Sets the value of the help dialog

source

pub fn value(&self) -> Option<String>

Returns the value of the help dialog

source

pub fn visible(&self) -> bool

Returns whether the help dialog is visible

source

pub fn shown(&self) -> bool

Returns whether the help dialog is visible

source

pub fn width(&self) -> i32

Returns the width of the help dialog

source

pub fn height(&self) -> i32

Returns the height of the help dialog

source

pub fn w(&self) -> i32

Returns the width of the help dialog

source

pub fn h(&self) -> i32

Returns the height of the help dialog

source

pub fn x(&self) -> i32

Returns the x position of the help dialog

source

pub fn y(&self) -> i32

Returns the y position of the help dialog

Trait Implementations§

source§

impl Debug for HelpDialog

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for HelpDialog

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Drop for HelpDialog

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.