-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Documenting anathema #55
Conversation
1671736
to
4e431e5
Compare
anathema-backend/src/lib.rs
Outdated
fn clear(&mut self); | ||
|
||
/// Finalizes the backend. This is called just before we start running the anathema main loop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Finalizes the backend. This is called just before we start running the anathema main loop. | |
/// Finalizes the backend. This is called when the runtime starts. |
anathema-backend/src/lib.rs
Outdated
/// Finalizes the backend. This is called just before we start running the anathema main loop. | ||
/// This should set the terminal in a state where its usable for the tui, for example by enabling events. | ||
/// | ||
/// There is no guarantee that other functions will be called before this. They should not cause a panic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// There is no guarantee that other functions will be called before this. They should not cause a panic. |
anathema-backend/src/lib.rs
Outdated
fn clear(&mut self); | ||
|
||
/// Finalizes the backend. This is called just before we start running the anathema main loop. | ||
/// This should set the terminal in a state where its usable for the tui, for example by enabling events. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// This should set the terminal in a state where its usable for the tui, for example by enabling events. |
anathema-backend/src/tui/mod.rs
Outdated
@@ -38,25 +38,29 @@ pub struct TuiBackendBuilder { | |||
} | |||
|
|||
impl TuiBackendBuilder { | |||
/// Enable alt screen | |||
// Note: This will only apply when TuiBackend::finalize is called. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Note: This will only apply when TuiBackend::finalize is called. |
anathema-backend/src/tui/mod.rs
Outdated
// Note: This will only apply when TuiBackend::finalize is called. | ||
/// Enable mouse support. This won't apply until Runtime::run is called. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Note: This will only apply when TuiBackend::finalize is called. | |
/// Enable mouse support. This won't apply until Runtime::run is called. | |
/// Enable mouse support. |
anathema-runtime/src/lib.rs
Outdated
@@ -74,6 +77,10 @@ impl<T> RuntimeBuilder<T> { | |||
Ok(id.into()) | |||
} | |||
|
|||
/// Registers a [Component] as a prototype to the [Runtime], which allows the usage of multiple instances of the component in the templates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Registers a [Component] as a prototype to the [Runtime], which allows the usage of multiple instances of the component in the templates. | |
/// Registers a [Component] as a prototype with the [Runtime], which allows the usage of multiple instances of the component in the templates. |
anathema-runtime/src/lib.rs
Outdated
@@ -74,6 +77,10 @@ impl<T> RuntimeBuilder<T> { | |||
Ok(id.into()) | |||
} | |||
|
|||
/// Registers a [Component] as a prototype to the [Runtime], which allows the usage of multiple instances of the component in the templates. | |||
/// This is useful if you want to reuse the component (Such as an input or button component) or if you use your component in if-blocks or for loops. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// This is useful if you want to reuse the component (Such as an input or button component) or if you use your component in if-blocks or for loops. | |
/// This is useful for reuse of components. |
Co-authored-by: Togglebit <[email protected]>
Co-authored-by: Togglebit <[email protected]>
Co-authored-by: Togglebit <[email protected]>
Co-authored-by: Togglebit <[email protected]>
Co-authored-by: Togglebit <[email protected]>
I've taken up the task of documenting most of anathema. Any critique is welcomed. Note: I use everywhere rustdoc-style comments (
///
) except for internal api information on public api, as it is not very relevant. I use normal comments (//
) for those.