[−][src]Struct pushrod_render::render::widget::BaseWidget
This is an example top-level Widget
object that is used to draw a background and a border
of specified colors. COLOR_BASE
determines the background fill color, and the COLOR_BORDER
determines the color of the border. The width of the border is controlled by the
get_config().border_width
property.
Implementations
impl BaseWidget
[src]
Base top-level implementation of the BaseWidget
, which other classes can extend.
pub fn new(x: i32, y: i32, w: u32, h: u32) -> Self
[src]
Constructs a new base widget, given the points of origin and size.
Trait Implementations
impl Widget for BaseWidget
[src]
Implementation for drawing a BaseWidget
, with the Widget
trait objects applied.
fn draw(&mut self, _canvas: &mut Canvas<Window>)
[src]
fn get_config(&mut self) -> &mut WidgetConfig
[src]
This function is a macro-created getter function that returns the Widget
's configuration
object as a borrowed mutable reference. This code is auto-generated using the
default_widget_properties!()
macro.
fn get_system_properties(&mut self) -> &mut HashMap<i32, String>
[src]
This function is a macro-created getter function that returns the Widget
's system
properties as a borrowed mutable reference. This code is auto-generated using the
default_widget_properties!()
macro.
fn get_callbacks(&mut self) -> &mut CallbackRegistry
[src]
This function is a macro-created getter function that returns the Widget
's
CallbackRegistry
object as a borrowed mutable reference. This code is auto-generated
using the default_widget_properties!()
macro.
fn tick_callback(&mut self, _widgets: &Vec<WidgetContainer>)
[src]
This function is a macro-created tick callback override, created by the
default_widget_callbacks!()
macro.
fn mouse_entered_callback(&mut self, _widgets: &Vec<WidgetContainer>)
[src]
This function is a macro-created mouse entered callback override, created by the
default_widget_callbacks!()
macro.
fn mouse_exited_callback(&mut self, _widgets: &Vec<WidgetContainer>)
[src]
This function is a macro-created mouse exited callback override, created by the
default_widget_callbacks!()
macro.
fn mouse_moved_callback(
&mut self,
_widgets: &Vec<WidgetContainer>,
_points: Vec<i32>
)
[src]
&mut self,
_widgets: &Vec<WidgetContainer>,
_points: Vec<i32>
)
This function is a macro-created mouse moved callback override, created by the
default_widget_callbacks!()
macro.
fn mouse_scrolled_callback(
&mut self,
_widgets: &Vec<WidgetContainer>,
_points: Vec<i32>
)
[src]
&mut self,
_widgets: &Vec<WidgetContainer>,
_points: Vec<i32>
)
This function is a macro-created mouse scrolled callback override, created by the
default_widget_callbacks!()
macro.
fn mouse_entered(&mut self, _widgets: &Vec<WidgetContainer>)
[src]
fn mouse_exited(&mut self, _widgets: &Vec<WidgetContainer>)
[src]
fn mouse_moved(&mut self, _widgets: &Vec<WidgetContainer>, _points: Vec<i32>)
[src]
fn mouse_scrolled(&mut self, _widgets: &Vec<WidgetContainer>, _points: Vec<i32>)
[src]
fn button_clicked(
&mut self,
_button: u8,
_state: bool,
_widgets: &Vec<WidgetContainer>
)
[src]
&mut self,
_button: u8,
_state: bool,
_widgets: &Vec<WidgetContainer>
)
fn tick(&mut self, _widgets: &Vec<WidgetContainer>)
[src]
fn button_clicked_callback(
&mut self,
_widgets: &Vec<WidgetContainer>,
_button: u8,
_state: bool
)
[src]
&mut self,
_widgets: &Vec<WidgetContainer>,
_button: u8,
_state: bool
)
fn set_origin(&mut self, _origin: Vec<i32>)
[src]
fn set_size(&mut self, _size: Vec<u32>)
[src]
fn get_drawing_area(&mut self) -> Rect
[src]
Auto Trait Implementations
impl !RefUnwindSafe for BaseWidget
impl !Send for BaseWidget
impl !Sync for BaseWidget
impl Unpin for BaseWidget
impl !UnwindSafe for BaseWidget
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>,