[−][src]Struct cgui::CWinRep
Write-dominant data structure which holds details about the window which is pushed to various backends.
Fields
title: String
width: usize
height: usize
pixels: ImageBuffer<Rgb<u8>, Vec<u8>>
exit_flag: bool
dirty_extents: [usize; 4]
Methods
impl CWinRep
[src]
pub fn write_px(&mut self, x: u32, y: u32, rgb: [u8; 3])
[src]
Writes a pixel to our buffer. Does not push to window manager until redraw() or redraw_dirty() is called.
pub fn mark_dirty(&mut self, x1: usize, y1: usize, x2: usize, y2: usize)
[src]
Marks a rectangle as dirty. x1 must be < x2, y1 must be < y2 (origin 0,0 is in upper-left corner) If called multiple times with different rectangles the dirty area will be the bounding box of all rectangles
Trait Implementations
impl RenderBack for CWinRep
[src]
fn init(&mut self)
[src]
fn redraw_dirty(&mut self)
[src]
fn redraw_box(&mut self, x1: usize, y1: usize, x2: usize, y2: usize)
[src]
fn event_tick(&self) -> String
[src]
Apps which call event_tick manually MUST call init() first. I refuse to throw a check for self.init every time the user moves their mouse. Also apps which explicitly use event_tick must free the c_string returned.
fn event_loop(&mut self)
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.