Struct imgui::text_filter::TextFilter
source · pub struct TextFilter { /* private fields */ }
Expand description
Helper to parse and apply text filters
Implementations§
source§impl TextFilter
impl TextFilter
sourcepub fn new(label: String) -> Self
pub fn new(label: String) -> Self
Creates a new TextFilter with an empty filter.
This is equivalent of new_with_filter with filter
set to ""
.
sourcepub fn new_with_filter(label: String, filter: String) -> Self
pub fn new_with_filter(label: String, filter: String) -> Self
Creates a new TextFilter with a custom filter.
sourcepub fn build(&self)
pub fn build(&self)
Builds the TextFilter with its filter attribute. You can use
pass_filter()
after it.
If you want control the filter with an InputText, check draw()
.
sourcepub fn draw(&self)
pub fn draw(&self)
Draws an InputText to control the filter of the TextFilter.
This is equivalent of draw_with_size with size
set to 0.0
.
sourcepub fn draw_with_size(&self, size: f32)
pub fn draw_with_size(&self, size: f32)
Draws an InputText to control the filter of the TextFilter.
The InputText has the size passed in parameters.
sourcepub fn pass_filter(&self, buf: &str) -> bool
pub fn pass_filter(&self, buf: &str) -> bool
pub fn pass_filter_with_end(&self, start: &str, end: &str) -> bool
Auto Trait Implementations§
impl Freeze for TextFilter
impl RefUnwindSafe for TextFilter
impl !Send for TextFilter
impl !Sync for TextFilter
impl Unpin for TextFilter
impl UnwindSafe for TextFilter
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