aboutsummaryrefslogtreecommitdiff
path: root/src/tui/command.rs
diff options
context:
space:
mode:
authorlukeflo2024-10-24 14:58:50 +0200
committerlukeflo2024-10-24 14:58:50 +0200
commitc01722b7b517ea5fbee942276ca9f6442cae068b (patch)
tree6b9ae39c4fae09ba7a5feb5f21a900ae84701fa9 /src/tui/command.rs
parentf32b6a19851b8b103ac843503ab008197f0639cd (diff)
downloadbibiman-c01722b7b517ea5fbee942276ca9f6442cae068b.tar.gz
bibiman-c01722b7b517ea5fbee942276ca9f6442cae068b.zip
implementig tui_input for searching
Diffstat (limited to 'src/tui/command.rs')
-rw-r--r--src/tui/command.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/tui/command.rs b/src/tui/command.rs
index 8416a3e..823a1dc 100644
--- a/src/tui/command.rs
+++ b/src/tui/command.rs
@@ -28,7 +28,10 @@ use std::process::{Command, Stdio};
impl Bibiman {
// Entry Table commands
- // Movement
+ /// Select next entry in Table holding the bibliographic entries.
+ ///
+ /// Takes u16 value as argument to specify number of entries which
+ /// should be scrolled
pub fn select_next_entry(&mut self, entries: u16) {
self.entry_table.entry_info_scroll = 0;
self.entry_table.entry_info_scroll_state =
@@ -40,6 +43,10 @@ impl Bibiman {
.position(self.entry_table.entry_table_state.selected().unwrap());
}
+ /// Select previous entry in Table holding the bib entries.
+ ///
+ /// Takes u16 value as argument to specify number of entries which
+ /// should be scrolled
pub fn select_previous_entry(&mut self, entries: u16) {
self.entry_table.entry_info_scroll = 0;
self.entry_table.entry_info_scroll_state =
@@ -51,6 +58,7 @@ impl Bibiman {
.position(self.entry_table.entry_table_state.selected().unwrap());
}
+ /// Select first entry in bib list
pub fn select_first_entry(&mut self) {
self.entry_table.entry_info_scroll = 0;
self.entry_table.entry_info_scroll_state =
@@ -59,6 +67,7 @@ impl Bibiman {
self.entry_table.entry_scroll_state = self.entry_table.entry_scroll_state.position(0);
}
+ /// Select last entry in bib list
pub fn select_last_entry(&mut self) {
self.entry_table.entry_info_scroll = 0;
self.entry_table.entry_info_scroll_state =
@@ -70,6 +79,7 @@ impl Bibiman {
.position(self.entry_table.entry_table_items.len());
}
+ /// Select next (right) column of entry table
pub fn select_next_column(&mut self) {
match self.entry_table.entry_table_selected_column {
EntryTableColumn::Authors => {
@@ -87,6 +97,7 @@ impl Bibiman {
}
}
+ /// Select previous (left) column of entry table
pub fn select_prev_column(&mut self) {
match self.entry_table.entry_table_selected_column {
EntryTableColumn::Authors => {