pub struct WText { /* private fields */ }
Expand description
This 2D Widget represents text overlay.
Implementations
sourceimpl 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
sourceimpl Boxed for WText
impl Boxed for WText
sourceimpl WTextTrait for WText
impl WTextTrait for WText
sourceimpl WTextTraitConst for WText
impl WTextTraitConst for WText
sourceimpl Widget2DTrait for WText
impl Widget2DTrait for WText
sourceimpl Widget2DTraitConst for WText
impl Widget2DTraitConst for WText
fn as_raw_Widget2D(&self) -> *const c_void
sourceimpl WidgetTrait for WText
impl WidgetTrait for WText
sourceimpl WidgetTraitConst for WText
impl WidgetTraitConst for WText
fn as_raw_Widget(&self) -> *const c_void
impl Send for WText
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more