Sidebar functions. More...
#include "config.h"#include <stdbool.h>#include <string.h>#include "private.h"#include "mutt/lib.h"#include "config/lib.h"#include "core/lib.h"#include "gui/lib.h"#include "functions_sidebar.h"#include "lib.h"#include "editor/lib.h"#include "history/lib.h"#include "index/lib.h"#include "key/lib.h"#include "menu/lib.h"#include "functions_fuzzy.h"#include "module_data.h"Go to the source code of this file.
Functions | |
| void | sidebar_init_keys (struct NeoMutt *n, struct SubMenu *sm_generic) |
| Initialise the Sidebar Keybindings - Implements ::init_keys_api. | |
| struct SubMenu * | sidebar_get_submenu (void) |
| Get the Sidebar SubMenu. | |
| bool | sb_next (struct SidebarWindowData *wdata) |
| Find the next unhidden Mailbox. | |
| static bool | sb_next_n (struct SidebarWindowData *wdata, int count) |
| Move down N unhidden Mailboxes, capping at the last. | |
| static bool | sb_prev_n (struct SidebarWindowData *wdata, int count) |
| Move up N unhidden Mailboxes, capping at the first. | |
| static struct SbEntry ** | sb_next_new (struct SidebarWindowData *wdata, size_t begin, size_t end) |
| Return the next mailbox with new messages. | |
| bool | sb_prev (struct SidebarWindowData *wdata) |
| Find the previous unhidden Mailbox. | |
| static struct SbEntry ** | sb_prev_new (struct SidebarWindowData *wdata, size_t begin, size_t end) |
| Return the previous mailbox with new messages. | |
| static int | sb_screen_row_index (struct SidebarWindowData *wdata, int wanted_row) |
| Find the entry shown at a given row of the visible page. | |
| static int | sb_index_visible_before (struct SidebarWindowData *wdata, int index, int count) |
| Find the entry N unhidden entries before another. | |
| static int | sb_index_visible_after (struct SidebarWindowData *wdata, int index, int count) |
| Find the entry N unhidden entries after another. | |
| static int | sb_last_visible (struct SidebarWindowData *wdata) |
| Find the last unhidden entry. | |
| static int | sb_scroll_view (struct SidebarFunctionData *fdata, int delta) |
| Scroll the viewport, dragging the selection into view. | |
| int | op_sidebar_first (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Selects the first unhidden mailbox - Implements sidebar_function_t -. | |
| static int | op_sidebar_select_entry_by_number (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Jump to a specific mailbox - Implements sidebar_function_t -. | |
| int | op_sidebar_last (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Selects the last unhidden mailbox - Implements sidebar_function_t -. | |
| int | op_sidebar_next (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Selects the next unhidden mailbox - Implements sidebar_function_t -. | |
| static int | op_sidebar_next_new (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Selects the next new mailbox - Implements sidebar_function_t -. | |
| int | op_sidebar_open (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Open highlighted mailbox - Implements sidebar_function_t -. | |
| int | op_sidebar_prev (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Selects the previous unhidden mailbox - Implements sidebar_function_t -. | |
| static int | op_sidebar_prev_new (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Selects the previous new mailbox - Implements sidebar_function_t -. | |
| static int | op_sidebar_select_page_top (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Selects the entry at the top of the visible page - Implements sidebar_function_t -. | |
| static int | op_sidebar_select_page_middle (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Selects the entry at the middle of the visible page - Implements sidebar_function_t -. | |
| static int | op_sidebar_select_page_bottom (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Selects the entry at the bottom of the visible page - Implements sidebar_function_t -. | |
| static int | op_sidebar_scroll_half_down (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Scrolls down by half a page - Implements sidebar_function_t -. | |
| static int | op_sidebar_scroll_half_up (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Scrolls up by half a page - Implements sidebar_function_t -. | |
| static int | op_sidebar_scroll_line_down (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Scrolls down by one line - Implements sidebar_function_t -. | |
| static int | op_sidebar_scroll_line_up (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Scrolls up by one line - Implements sidebar_function_t -. | |
| int | op_sidebar_scroll_page_down (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Scrolls down by one page - Implements sidebar_function_t -. | |
| int | op_sidebar_scroll_page_up (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Scrolls up by one page - Implements sidebar_function_t -. | |
| static int | sb_scroll_selection_to_row (struct SidebarFunctionData *fdata, int wanted_row) |
| Scroll the view so the selection is at a given row. | |
| static int | op_sidebar_scroll_selection_to_top (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Scrolls so the selection is at the top of the screen - Implements sidebar_function_t -. | |
| static int | op_sidebar_scroll_selection_to_middle (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Scrolls so the selection is at the middle of the screen - Implements sidebar_function_t -. | |
| static int | op_sidebar_scroll_selection_to_bottom (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Scrolls so the selection is at the bottom of the screen - Implements sidebar_function_t -. | |
| static int | op_sidebar_toggle_visible (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Make the sidebar (in)visible - Implements sidebar_function_t -. | |
| static int | op_sidebar_toggle_virtual (struct SidebarFunctionData *fdata, const struct KeyEvent *event) |
| Deprecated - Implements sidebar_function_t -. | |
| int | sb_function_dispatcher (struct MuttWindow *win, const struct KeyEvent *event) |
| Perform a Sidebar function - Implements function_dispatcher_t -. | |
Variables | |
| static const struct MenuFuncOp | OpSidebar [] |
| Functions for the Sidebar Window. | |
| const struct MenuOpSeq | SidebarDefaultBindings [] |
| Key bindings for the Sidebar Window. | |
| static const struct SidebarFunction | SidebarFunctions [] |
| All the NeoMutt functions that the Sidebar supports. | |
Sidebar functions.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file functions_sidebar.c.
Initialise the Sidebar Keybindings - Implements ::init_keys_api.
Definition at line 90 of file functions_sidebar.c.
| struct SubMenu * sidebar_get_submenu | ( | void | ) |
Get the Sidebar SubMenu.
| ptr | Sidebar SubMenu |
Definition at line 114 of file functions_sidebar.c.
| bool sb_next | ( | struct SidebarWindowData * | wdata | ) |
Find the next unhidden Mailbox.
| wdata | Sidebar data |
| true | Mailbox found |
Definition at line 127 of file functions_sidebar.c.
|
static |
Move down N unhidden Mailboxes, capping at the last.
| wdata | Sidebar data |
| count | Number of entries to move |
| true | Moved at least one entry |
| false | Already at the last unhidden entry |
Definition at line 149 of file functions_sidebar.c.
|
static |
Move up N unhidden Mailboxes, capping at the first.
| wdata | Sidebar data |
| count | Number of entries to move |
| true | Moved at least one entry |
| false | Already at the first unhidden entry |
Definition at line 167 of file functions_sidebar.c.
|
static |
Return the next mailbox with new messages.
| wdata | Sidebar data |
| begin | Starting index for searching |
| end | Ending index for searching |
| ptr | Pointer to the first entry with new messages |
| NULL | None could be found |
Definition at line 186 of file functions_sidebar.c.
| bool sb_prev | ( | struct SidebarWindowData * | wdata | ) |
Find the previous unhidden Mailbox.
| wdata | Sidebar data |
| true | Mailbox found |
Definition at line 202 of file functions_sidebar.c.
|
static |
Return the previous mailbox with new messages.
| wdata | Sidebar data |
| begin | Starting index for searching |
| end | Ending index for searching |
| ptr | Pointer to the first entry with new messages |
| NULL | None could be found |
Definition at line 228 of file functions_sidebar.c.
|
static |
Find the entry shown at a given row of the visible page.
| wdata | Sidebar data |
| wanted_row | Row within the page (0 = top) |
| num | Index into wdata->entries |
| -1 | No entry found |
If the requested row is beyond the last visible entry, the last visible entry on the page is returned.
Definition at line 250 of file functions_sidebar.c.
|
static |
Find the entry N unhidden entries before another.
| wdata | Sidebar data |
| index | Starting index |
| count | Number of unhidden entries to move up |
| num | Index into wdata->entries (capped at the first unhidden entry) |
Definition at line 283 of file functions_sidebar.c.
|
static |
Find the entry N unhidden entries after another.
| wdata | Sidebar data |
| index | Starting index |
| count | Number of unhidden entries to move down |
| num | Index into wdata->entries (capped at the last unhidden entry) |
Definition at line 311 of file functions_sidebar.c.
|
static |
Find the last unhidden entry.
| wdata | Sidebar data |
| num | Index into wdata->entries |
| -1 | No visible entry found |
Definition at line 341 of file functions_sidebar.c.
|
static |
Scroll the viewport, dragging the selection into view.
| fdata | Sidebar function data |
| delta | Number of visible entries to scroll (negative = up) |
| enum | FunctionRetval |
Move the viewport (top_index) by delta visible entries. The selection (highlight) is left unchanged unless it would fall off the screen, in which case it is dragged to the nearest visible row. This mirrors the Menu.
Definition at line 364 of file functions_sidebar.c.
|
static |
Scroll the view so the selection is at a given row.
| fdata | Sidebar function data |
| wanted_row | Row at which the selection should appear (0 = top) |
| enum | FunctionRetval |
The current selection (highlight) is unchanged; only the view is moved.
Definition at line 806 of file functions_sidebar.c.
|
static |
Functions for the Sidebar Window.
Definition at line 52 of file functions_sidebar.c.
| const struct MenuOpSeq SidebarDefaultBindings[] |
Key bindings for the Sidebar Window.
Definition at line 82 of file functions_sidebar.c.
|
static |
All the NeoMutt functions that the Sidebar supports.
Definition at line 876 of file functions_sidebar.c.