NeoMutt  2023-11-03-85-g512e01
Teaching an old dog new tricks
No Matches
window.c File Reference

Window wrapper around a Menu. More...

#include "config.h"
#include <stdbool.h>
#include "private.h"
#include "mutt/lib.h"
#include "config/lib.h"
#include "gui/lib.h"
#include "lib.h"
#include "type.h"
+ Include dependency graph for window.c:

Go to the source code of this file.


static int menu_recalc (struct MuttWindow *win)
 Recalculate the Window data - Implements MuttWindow::recalc() -.
static int menu_repaint (struct MuttWindow *win)
 Repaint the Window - Implements MuttWindow::repaint() -.
static void menu_wdata_free (struct MuttWindow *win, void **ptr)
 Free the Menu - Implements MuttWindow::wdata_free() -.
struct MuttWindowmenu_window_new (enum MenuType type, struct ConfigSubset *sub)
 Create a new Menu Window.

Detailed Description

Window wrapper around a Menu.

  • Richard Russon

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

Definition in file window.c.

Function Documentation

◆ menu_window_new()

struct MuttWindow * menu_window_new ( enum MenuType  type,
struct ConfigSubset sub 

Create a new Menu Window.

typeMenu type, e.g. MENU_PAGER
subConfig items
Return values
ptrNew MuttWindow wrapping a Menu

Definition at line 140 of file window.c.

146 struct Menu *menu = menu_new(type, win, sub);
150 win->wdata = menu;
154 return win;
static int menu_recalc(struct MuttWindow *win)
Recalculate the Window data - Implements MuttWindow::recalc() -.
Definition: window.c:80
static int menu_repaint(struct MuttWindow *win)
Repaint the Window - Implements MuttWindow::repaint() -.
Definition: window.c:93
static void menu_wdata_free(struct MuttWindow *win, void **ptr)
Free the Menu - Implements MuttWindow::wdata_free() -.
Definition: window.c:129
struct Menu * menu_new(enum MenuType type, struct MuttWindow *win, struct ConfigSubset *sub)
Create a new Menu.
Definition: menu.c:132
struct MuttWindow * mutt_window_new(enum WindowType type, enum MuttWindowOrientation orient, enum MuttWindowSize size, int cols, int rows)
Create a new Window.
Definition: mutt_window.c:182
#define WA_RECALC
Recalculate the contents of the Window.
Definition: mutt_window.h:110
An Window containing a Menu.
Definition: mutt_window.h:98
Window uses all available vertical space.
Definition: mutt_window.h:38
Use as much space as possible.
Definition: mutt_window.h:52
Window wants as much space as possible.
Definition: mutt_window.h:48
Definition: lib.h:70
struct MuttWindow * win
Window holding the Menu.
Definition: lib.h:77
enum MenuType type
Menu definition for keymap entries.
Definition: lib.h:74
struct ConfigSubset * sub
Inherited config items.
Definition: lib.h:78
int(* repaint)(struct MuttWindow *win)
Definition: mutt_window.h:187
void * wdata
Private data.
Definition: mutt_window.h:145
int(* recalc)(struct MuttWindow *win)
Definition: mutt_window.h:173
void(* wdata_free)(struct MuttWindow *win, void **ptr)
Definition: mutt_window.h:159
WindowActionFlags actions
Actions to be performed, e.g. WA_RECALC.
Definition: mutt_window.h:132
+ Here is the call graph for this function:
+ Here is the caller graph for this function: