diff options
| author | categorille <69397914+categorille@users.noreply.github.com> | 2021-02-17 15:55:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-17 15:55:09 +0100 |
| commit | 6e5607ba26d8c1daa384d9eb8c6e138b68360d02 (patch) | |
| tree | ff7cbeaa74dba9692d224f77f6ad5a7fb8a0ac77 /src/client | |
| parent | infra(simplify build and install) (diff) | |
| download | sl0ppij-6e5607ba26d8c1daa384d9eb8c6e138b68360d02.tar.gz sl0ppij-6e5607ba26d8c1daa384d9eb8c6e138b68360d02.tar.xz sl0ppij-6e5607ba26d8c1daa384d9eb8c6e138b68360d02.zip | |
docs: first documentation step (#185)
* added some documentation to the input module
* added a bunch of documentation already, doing this non-linearly
* added more comments
* forgot cargo ftm again oop
* PR change requests applied, some forgotten/imcomplete doc added
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/panes/terminal_pane.rs | 3 | ||||
| -rw-r--r-- | src/client/tab.rs | 11 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/client/panes/terminal_pane.rs b/src/client/panes/terminal_pane.rs index 21244fab..e00b323d 100644 --- a/src/client/panes/terminal_pane.rs +++ b/src/client/panes/terminal_pane.rs @@ -18,6 +18,9 @@ pub enum PaneId { Terminal(RawFd), Plugin(u32), // FIXME: Drop the trait object, make this a wrapper for the struct? } + +/// Contains the position and size of a [`Pane`], or more generally of any terminal, measured +/// in character rows and columns. #[derive(Clone, Copy, Debug, Default)] pub struct PositionAndSize { pub x: usize, diff --git a/src/client/tab.rs b/src/client/tab.rs index 3b508a82..174948c1 100644 --- a/src/client/tab.rs +++ b/src/client/tab.rs @@ -1,3 +1,5 @@ +//! `Tab`s holds multiple panes. It tracks their coordinates (x/y) and size, as well as how they should be resized + use crate::common::{AppInstruction, SenderWithContext}; use crate::panes::{PaneId, PositionAndSize, TerminalPane}; use crate::pty_bus::{PtyInstruction, VteEvent}; @@ -13,15 +15,6 @@ use std::{io::Write, sync::mpsc::channel}; use crate::utils::logging::debug_log_to_file; -/* - * Tab - * - * this holds multiple panes (currently terminal panes) which are currently displayed - * when this tab is active. - * it tracks their coordinates (x/y) and size, as well as how they should be resized - * - */ - const CURSOR_HEIGHT_WIDTH_RATIO: usize = 4; // this is not accurate and kind of a magic number, TODO: look into this const MIN_TERMINAL_HEIGHT: usize = 2; const MIN_TERMINAL_WIDTH: usize = 4; |
