Struct fyrox_ui::text_box::TextBoxBuilder
source · pub struct TextBoxBuilder { /* private fields */ }Expand description
Text box builder creates new TextBox instances and adds them to the user interface.
Implementations§
source§impl TextBoxBuilder
impl TextBoxBuilder
sourcepub fn new(widget_builder: WidgetBuilder) -> Self
pub fn new(widget_builder: WidgetBuilder) -> Self
Creates new text box widget builder with the base widget builder specified.
sourcepub fn with_font(self, font: SharedFont) -> Self
pub fn with_font(self, font: SharedFont) -> Self
Sets the desired font of the text box.
sourcepub fn with_caret_brush(self, brush: Brush) -> Self
pub fn with_caret_brush(self, brush: Brush) -> Self
Sets the desired caret brush of the text box.
sourcepub fn with_selection_brush(self, brush: Brush) -> Self
pub fn with_selection_brush(self, brush: Brush) -> Self
Sets the desired selection brush of the text box.
sourcepub fn with_filter(self, filter: Rc<RefCell<FilterCallback>>) -> Self
pub fn with_filter(self, filter: Rc<RefCell<FilterCallback>>) -> Self
Sets the desired character filter of the text box. See FilterCallback for more info.
sourcepub fn with_vertical_text_alignment(self, alignment: VerticalAlignment) -> Self
pub fn with_vertical_text_alignment(self, alignment: VerticalAlignment) -> Self
Sets the desired vertical text alignment of the text box.
sourcepub fn with_horizontal_text_alignment(
self,
alignment: HorizontalAlignment
) -> Self
pub fn with_horizontal_text_alignment( self, alignment: HorizontalAlignment ) -> Self
Sets the desired horizontal text alignment of the text box.
sourcepub fn with_text_commit_mode(self, mode: TextCommitMode) -> Self
pub fn with_text_commit_mode(self, mode: TextCommitMode) -> Self
Sets the desired text commit mode of the text box.
sourcepub fn with_multiline(self, multiline: bool) -> Self
pub fn with_multiline(self, multiline: bool) -> Self
Enables or disables multiline mode of the text box.
sourcepub fn with_editable(self, editable: bool) -> Self
pub fn with_editable(self, editable: bool) -> Self
Enables or disables editing of the text box.
sourcepub fn with_mask_char(self, mask_char: Option<char>) -> Self
pub fn with_mask_char(self, mask_char: Option<char>) -> Self
Sets the desired masking character of the text box.
sourcepub fn with_shadow(self, shadow: bool) -> Self
pub fn with_shadow(self, shadow: bool) -> Self
Whether the shadow enabled or not.
sourcepub fn with_shadow_brush(self, brush: Brush) -> Self
pub fn with_shadow_brush(self, brush: Brush) -> Self
Sets desired shadow brush. It will be used to render the shadow.
sourcepub fn with_shadow_dilation(self, thickness: f32) -> Self
pub fn with_shadow_dilation(self, thickness: f32) -> Self
Sets desired shadow dilation in units. Keep in mind that the dilation is absolute, not percentage-based.
sourcepub fn with_shadow_offset(self, offset: Vector2<f32>) -> Self
pub fn with_shadow_offset(self, offset: Vector2<f32>) -> Self
Sets desired shadow offset in units.
sourcepub fn with_skip_chars(self, chars: Vec<char>) -> Self
pub fn with_skip_chars(self, chars: Vec<char>) -> Self
Sets desired set of characters that will be treated like whitespace during Ctrl+Arrow navigation
(Ctrl+Left Arrow and Ctrl+Right Arrow). This could be useful to treat underscores like whitespaces,
which in its turn could be useful for in-game consoles where commands usually separated using
underscores (like_this_one).
Auto Trait Implementations§
impl !RefUnwindSafe for TextBoxBuilder
impl !Send for TextBoxBuilder
impl !Sync for TextBoxBuilder
impl Unpin for TextBoxBuilder
impl !UnwindSafe for TextBoxBuilder
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
source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere T: 'static,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.