Struct fltk::misc::Tooltip

source ·
pub struct Tooltip {}
Expand description

Controls tooltips on an application-wide basis; use .set_tooltip() to add a tooltip to a particular widget

Implementations§

source§

impl Tooltip

source

pub fn delay() -> f32

Gets the tooltips delay

source

pub fn set_delay(f: f32)

Sets the tooltips delay

source

pub fn hidedelay() -> f32

Gets the tooltips hide delay

source

pub fn set_hidedelay(f: f32)

Sets the tooltips hide delay

source

pub fn hoverdelay() -> f32

Gets the tooltips hover delay

source

pub fn set_hoverdelay(f: f32)

Sets the tooltips hover delay

source

pub fn enabled() -> bool

Returns whether the tooltips are enabled

source

pub fn enable(b: bool)

Sets tooltips to be displayed if b is true; otherwise not to be displayed

source

pub fn disable()

Disables the display of all tooltips

source

pub fn enter_area<W: WidgetExt>( widget: &W, x: i32, y: i32, w: i32, h: i32, tip: &'static CStr )

Used to provide tooltips for internal pieces of your widget. Check FLTK’s documentation. The text of the tooltip must be a static CStr since the data is not copied by FLTK. This also avoid memory leaks in user code.

source

pub fn current_widget() -> impl WidgetExt

Returns the current widget associated with the tooltip

source

pub fn current<W: WidgetExt>(w: &W)

Sets the current widget associated with the tooltip

source

pub fn font() -> Font

Gets the tooltips font

source

pub fn set_font(font: Font)

Sets the tooltips font

source

pub fn font_size() -> i32

Gets the tooltips font size

source

pub fn set_font_size(s: i32)

Sets the tooltips font size

source

pub fn color() -> Color

Gets the tooltips color

source

pub fn set_color(c: Color)

Sets the tooltips color

source

pub fn text_color() -> Color

Gets the tooltips text color

source

pub fn set_text_color(c: Color)

Sets the tooltips text color

source

pub fn margin_width() -> i32

Gets the tooltips margin width

source

pub fn set_margin_width(v: i32)

Sets the tooltips margin width

source

pub fn margin_height() -> i32

Gets the tooltips margin height

source

pub fn set_margin_height(v: i32)

Sets the tooltips margin height

source

pub fn wrap_width() -> i32

Gets the tooltips wrap width

source

pub fn set_wrap_width(v: i32)

Sets the tooltips wrap width

source

pub fn current_window() -> impl WindowExt

Returns the window used for tooltips

Trait Implementations§

source§

impl Clone for Tooltip

source§

fn clone(&self) -> Tooltip

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Tooltip

source§

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

Formats the value using the given formatter. 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.