pub struct WText { /* private fields */ }
Expand description
This 2D Widget represents text overlay.
Implementations§
source§impl WText
impl WText
sourcepub fn new(
text: &str,
pos: Point,
font_size: i32,
color: &Color
) -> Result<WText>
pub fn new( text: &str, pos: Point, font_size: i32, color: &Color ) -> Result<WText>
Constructs a WText.
Parameters
- text: Text content of the widget.
- pos: Position of the text.
- font_size: Font size.
- color: Color of the text.
C++ default parameters
- font_size: 20
- color: Color::white()
Trait Implementations§
source§impl Boxed for WText
impl Boxed for WText
source§impl WTextTrait for WText
impl WTextTrait for WText
source§impl WTextTraitConst for WText
impl WTextTraitConst for WText
source§impl Widget2DTrait for WText
impl Widget2DTrait for WText
source§impl Widget2DTraitConst for WText
impl Widget2DTraitConst for WText
fn as_raw_Widget2D(&self) -> *const c_void
source§impl WidgetTrait for WText
impl WidgetTrait for WText
source§impl WidgetTraitConst for WText
impl WidgetTraitConst for WText
impl Send for WText
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more