Skip to content

Commit

Permalink
[libgui - Rust] TextInputView provides convenience accessors for the …
Browse files Browse the repository at this point in the history
…underlying TextView
  • Loading branch information
codyd51 committed Feb 7, 2024
1 parent 8847e63 commit 630682a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rust_programs/libgui/src/text_input_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ impl TextInputView {
})
}


pub fn clear(&self) {
self.view.clear()
}

pub fn add_component(self: Rc<Self>, elem: Rc<dyn UIElement>) {
Rc::clone(&self.view).add_component(elem)
}

pub fn get_text(&self) -> String {
self.view.get_text()
}
Expand Down

0 comments on commit 630682a

Please sign in to comment.