updated documentation headers for better readability.
This commit is contained in:
parent
d27a7b4ac6
commit
6275b255d5
21
src/main.rs
21
src/main.rs
@ -1,8 +1,8 @@
|
||||
/*
|
||||
Program: Bibliofile
|
||||
Language: Rustc 1.71.0
|
||||
ide: CLion
|
||||
Operating system: POP_OS
|
||||
Language: Rustc 1.74.0
|
||||
ide: kate
|
||||
Operating system: Arch Linux
|
||||
Purpose: TUI-based ereader and library manager for Linux terminal environments.
|
||||
Last edited: 11/18/23
|
||||
*/
|
||||
@ -164,7 +164,12 @@ fn get_text(s: &mut Cursive) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
This function is called to turn the page back 1.
|
||||
function: get_text
|
||||
params: Cursive session
|
||||
Returns type: void
|
||||
*/
|
||||
fn get_last_text(s: &mut Cursive) {
|
||||
|
||||
|
||||
@ -226,6 +231,12 @@ fn get_last_text(s: &mut Cursive) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Loads basic config files for ebook. Checks if there is a bookmark, and if not, displays what it sees and passes along
|
||||
to the appropriate function.
|
||||
*/
|
||||
fn get_init_text(s: &mut Cursive) {
|
||||
|
||||
//removes old layer, builds new one
|
||||
@ -269,7 +280,7 @@ fn get_init_text(s: &mut Cursive) {
|
||||
//refreshed screen layout
|
||||
s.add_layer(Dialog::around(TextView::new(text))
|
||||
.title(title.unwrap() + " page: " + &usize_num.to_string())
|
||||
.button("last", |s| {get_text(s);})
|
||||
.button("last", |s| {get_last_text(s);})
|
||||
.button("quit", |s| s.quit())
|
||||
.button("bookmark", move |s| {bookmark_func(s, page_num, &bookmark_file_name);})
|
||||
.button("next", |s| {get_text(s);})
|
||||
|
Loading…
Reference in New Issue
Block a user