Trait StyleContextExt

Source
pub trait StyleContextExt: 'static {
Show 41 methods // Required methods fn add_class(&self, class_name: &str); fn add_provider<P: IsA<StyleProvider>>(&self, provider: &P, priority: u32); fn get_background_color(&self, state: StateFlags) -> RGBA; fn get_border(&self, state: StateFlags) -> Border; fn get_border_color(&self, state: StateFlags) -> RGBA; fn get_color(&self, state: StateFlags) -> RGBA; fn get_frame_clock(&self) -> Option<FrameClock>; fn get_junction_sides(&self) -> JunctionSides; fn get_margin(&self, state: StateFlags) -> Border; fn get_padding(&self, state: StateFlags) -> Border; fn get_parent(&self) -> Option<StyleContext>; fn get_path(&self) -> Option<WidgetPath>; fn get_scale(&self) -> i32; fn get_screen(&self) -> Option<Screen>; fn get_section(&self, property: &str) -> Option<CssSection>; fn get_state(&self) -> StateFlags; fn has_class(&self, class_name: &str) -> bool; fn list_classes(&self) -> Vec<GString>; fn lookup_color(&self, color_name: &str) -> Option<RGBA>; fn remove_class(&self, class_name: &str); fn remove_provider<P: IsA<StyleProvider>>(&self, provider: &P); fn restore(&self); fn save(&self); fn set_background<P: IsA<Window>>(&self, window: &P); fn set_frame_clock(&self, frame_clock: &FrameClock); fn set_junction_sides(&self, sides: JunctionSides); fn set_parent<P: IsA<StyleContext>>(&self, parent: Option<&P>); fn set_path(&self, path: &WidgetPath); fn set_scale(&self, scale: i32); fn set_screen(&self, screen: &Screen); fn set_state(&self, flags: StateFlags); fn to_string(&self, flags: StyleContextPrintFlags) -> GString; fn get_property_direction(&self) -> TextDirection; fn set_property_direction(&self, direction: TextDirection); fn get_property_paint_clock(&self) -> Option<FrameClock>; fn set_property_paint_clock(&self, paint_clock: Option<&FrameClock>); fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_direction_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_property_paint_clock_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_property_parent_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_property_screen_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId;
}

Required Methodsยง

Source

fn add_class(&self, class_name: &str)

Source

fn add_provider<P: IsA<StyleProvider>>(&self, provider: &P, priority: u32)

Source

fn get_background_color(&self, state: StateFlags) -> RGBA

๐Ÿ‘ŽDeprecated
Source

fn get_border(&self, state: StateFlags) -> Border

Source

fn get_border_color(&self, state: StateFlags) -> RGBA

๐Ÿ‘ŽDeprecated
Source

fn get_color(&self, state: StateFlags) -> RGBA

Source

fn get_frame_clock(&self) -> Option<FrameClock>

Source

fn get_junction_sides(&self) -> JunctionSides

Source

fn get_margin(&self, state: StateFlags) -> Border

Source

fn get_padding(&self, state: StateFlags) -> Border

Source

fn get_parent(&self) -> Option<StyleContext>

Source

fn get_path(&self) -> Option<WidgetPath>

Source

fn get_scale(&self) -> i32

Source

fn get_screen(&self) -> Option<Screen>

Source

fn get_section(&self, property: &str) -> Option<CssSection>

Source

fn get_state(&self) -> StateFlags

Source

fn has_class(&self, class_name: &str) -> bool

Source

fn list_classes(&self) -> Vec<GString>

Source

fn lookup_color(&self, color_name: &str) -> Option<RGBA>

Source

fn remove_class(&self, class_name: &str)

Source

fn remove_provider<P: IsA<StyleProvider>>(&self, provider: &P)

Source

fn restore(&self)

Source

fn save(&self)

Source

fn set_background<P: IsA<Window>>(&self, window: &P)

๐Ÿ‘ŽDeprecated
Source

fn set_frame_clock(&self, frame_clock: &FrameClock)

Source

fn set_junction_sides(&self, sides: JunctionSides)

Source

fn set_parent<P: IsA<StyleContext>>(&self, parent: Option<&P>)

Source

fn set_path(&self, path: &WidgetPath)

Source

fn set_scale(&self, scale: i32)

Source

fn set_screen(&self, screen: &Screen)

Source

fn set_state(&self, flags: StateFlags)

Source

fn to_string(&self, flags: StyleContextPrintFlags) -> GString

Source

fn get_property_direction(&self) -> TextDirection

Source

fn set_property_direction(&self, direction: TextDirection)

Source

fn get_property_paint_clock(&self) -> Option<FrameClock>

Source

fn set_property_paint_clock(&self, paint_clock: Option<&FrameClock>)

Source

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

Source

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

Source

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

Source

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

Source

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

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ยง