[][src]Struct pushrod::widget::radio_button_widget::RadioButtonWidget

pub struct RadioButtonWidget { /* fields omitted */ }

This is the RadioButtonWidget, which contains a top-level widget for display, overriding the draw method to draw the base widget and the border for this box.

Example usage: IN PROGRESS

Methods

impl RadioButtonWidget[src]

Implementation of the constructor for the RadioButtonWidget.

pub fn new(
    factory: &mut GfxFactory,
    font_name: String,
    text: String,
    font_size: u32,
    justify: TextJustify,
    selected: bool
) -> Self
[src]

Trait Implementations

impl Widget for RadioButtonWidget[src]

Implementation of the RadioButtonWidget object with the Widget traits implemented. The base widget is a BoxWidget, which overlays a TextWidget over the top. This Widget responds to the button down/up callbacks internally.

fn injects_events(&mut self) -> bool[src]

This function injects events, as other radio buttons need to become invalidated that may be part of the same group ID.

fn inject_event(&mut self, widget_id: i32) -> Option<CallbackEvent>[src]

Returns an injected event where appropriate.

fn draw(&mut self, c: Context, g: &mut G2d, clip: &DrawState)[src]

Draws the contents of the widget in this order:

  • Base widget first
  • Box graphic for the specified width

fn invalidate(&mut self)[src]

Indicates that a widget needs to be redrawn/refreshed.

fn clear_invalidate(&mut self)[src]

Clears the invalidation flag.

fn is_invalidated(&mut self) -> bool[src]

Checks to see whether or not the widget needs to be redrawn/refreshed.

fn get_config(&mut self, config: u8) -> Option<&Config>[src]

fn set_point(&mut self, config: u8, x: i32, y: i32)[src]

fn set_size(&mut self, config: u8, w: i32, h: i32)[src]

fn set_color(&mut self, config: u8, color: Color)[src]

fn set_numeric(&mut self, config: u8, value: u64)[src]

fn set_text(&mut self, config: u8, text: String)[src]

fn set_toggle(&mut self, config: u8, flag: bool)[src]

fn draw_with_offset(
    &mut self,
    c: Context,
    g: &mut G2d,
    clip: &DrawState,
    point_offset: Point
)
[src]

Sets an alternate context with a drawing offset and size scale, then calls the underlying draw routine. If this is not the desired effect, this routine can be overridden, but this will handle the offset drawing for 90% of the Widget draw routines. Read more

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> Erased for T