[][src]Struct native_windows_gui::ColorDialog

pub struct ColorDialog { /* fields omitted */ }

Displays a modal dialog box that allows the user to choose a specific color value.

Implementations

impl ColorDialog[src]

pub fn builder() -> ColorDialogBuilder[src]

pub fn run<C: Into<ControlHandle>>(&self, owner: Option<C>) -> bool[src]

Execute the color dialog. This function will return true if the user select a color or false if the dialog is cancelled

pub fn color(&self) -> [u8; 3][src]

Return the color choosen by the user. The returned color is a [r, g, b] array. If the dialog was never executed, this returns [0, 0, 0] (black);

pub fn set_saved_color(&self, index: usize, color: &[u8; 3])[src]

Sets one of the saved color in the dialog. A dialog supports up to 16 colors (index: 0 to 15).

Panics: - If the index is out of bound

pub fn saved_color(&self, index: usize) -> [u8; 3][src]

Returns one of the saved color in the dialog. A dialog supports up to 16 colors (index: 0 to 15).

Panics: - If the index is out of bound

Trait Implementations

impl Default for ColorDialog[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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.