We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 584743a commit 6a36881Copy full SHA for 6a36881
promkit/src/core/listbox.rs
@@ -33,6 +33,14 @@ impl Listbox {
33
))
34
}
35
36
+ pub fn len(&self) -> usize {
37
+ self.0.contents().len()
38
+ }
39
+
40
+ pub fn push_string(&mut self, item: String) {
41
+ self.0.contents_mut().push(StyledGraphemes::from(item));
42
43
44
/// Creates a new `Listbox` from a vector of `StyledGraphemes`.
45
pub fn from_styled_graphemes(items: Vec<StyledGraphemes>) -> Self {
46
Self(Cursor::new(items, 0, false))
@@ -79,4 +87,8 @@ impl Listbox {
79
87
pub fn move_to_tail(&mut self) {
80
88
self.0.move_to_tail()
81
89
90
91
+ pub fn is_tail(&self) -> bool {
92
+ self.0.is_tail()
93
82
94
0 commit comments