gtk4::prelude

Trait ColorChooserExt

Source
pub trait ColorChooserExt:
    IsA<ColorChooser>
    + Sealed
    + 'static {
    // Provided methods
    fn rgba(&self) -> RGBA { ... }
    fn uses_alpha(&self) -> bool { ... }
    fn set_rgba(&self, color: &RGBA) { ... }
    fn set_use_alpha(&self, use_alpha: bool) { ... }
    fn connect_color_activated<F: Fn(&Self, &RGBA) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_rgba_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_use_alpha_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
👎Deprecated: Since 4.10
Expand description

Trait containing all ColorChooser methods.

§Implementors

ColorButton, ColorChooserDialog, ColorChooserWidget, ColorChooser

Provided Methods§

Source

fn rgba(&self) -> RGBA

👎Deprecated: Since 4.10

Gets the currently-selected color.

§Deprecated since 4.10

Use ColorDialog instead

§Returns
§color

a gdk::RGBA to fill in with the current color

Source

fn uses_alpha(&self) -> bool

👎Deprecated: Since 4.10

Returns whether the color chooser shows the alpha channel.

§Deprecated since 4.10

Use ColorDialog instead

§Returns

true if the color chooser uses the alpha channel, false if not

Source

fn set_rgba(&self, color: &RGBA)

👎Deprecated: Since 4.10

Sets the color.

§Deprecated since 4.10

Use ColorDialog instead

§color

the new color

Source

fn set_use_alpha(&self, use_alpha: bool)

👎Deprecated: Since 4.10

Sets whether or not the color chooser should use the alpha channel.

§Deprecated since 4.10

Use ColorDialog instead

§use_alpha

true if color chooser should use alpha channel, false if not

Source

fn connect_color_activated<F: Fn(&Self, &RGBA) + 'static>( &self, f: F, ) -> SignalHandlerId

👎Deprecated: Since 4.10

Emitted when a color is activated from the color chooser.

This usually happens when the user clicks a color swatch, or a color is selected and the user presses one of the keys Space, Shift+Space, Return or Enter.

§Deprecated since 4.10

Use ColorDialog and ColorDialogButton instead of widgets implementing ColorChooser

§color

the color

Source

fn connect_rgba_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

👎Deprecated: Since 4.10
Source

fn connect_use_alpha_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

👎Deprecated: Since 4.10

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§