[−][src]Struct native_windows_gui::ColorDialog
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]
fn default() -> ColorDialog[src]
Auto Trait Implementations
impl !RefUnwindSafe for ColorDialog
impl !Send for ColorDialog
impl !Sync for ColorDialog
impl Unpin for ColorDialog
impl UnwindSafe for ColorDialog
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,