NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
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 "key/lib.h"
+ Include dependency graph for window.c:

Go to the source code of this file.

Functions

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 (const struct MenuDefinition *md, struct ConfigSubset *sub)
 Create a new Menu Window.
 

Detailed Description

Window wrapper around a Menu.

Authors
  • 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 http://www.gnu.org/licenses/.

Definition in file window.c.

Function Documentation

◆ menu_window_new()

struct MuttWindow * menu_window_new ( const struct MenuDefinition * md,
struct ConfigSubset * sub )

Create a new Menu Window.

Parameters
mdMenu Definition
subConfig items
Return values
ptrNew MuttWindow wrapping a Menu

Definition at line 139 of file window.c.

140{
144
145 struct Menu *menu = menu_new(md, win, sub);
146
149 win->wdata = menu;
151
152 return win;
153}
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:128
struct Menu * menu_new(const struct MenuDefinition *md, struct MuttWindow *win, struct ConfigSubset *sub)
Create a new Menu.
Definition menu.c:138
struct MuttWindow * mutt_window_new(enum WindowType type, enum MuttWindowOrientation orient, enum MuttWindowSize size, int cols, int rows)
Create a new Window.
@ WT_MENU
An Window containing a Menu.
Definition mutt_window.h:97
@ MUTT_WIN_ORIENT_VERTICAL
Window uses all available vertical space.
Definition mutt_window.h:38
#define MUTT_WIN_SIZE_UNLIMITED
Use as much space as possible.
Definition mutt_window.h:52
@ MUTT_WIN_SIZE_MAXIMISE
Window wants as much space as possible.
Definition mutt_window.h:48
Definition lib.h:80
struct MuttWindow * win
Window holding the Menu.
Definition lib.h:88
const struct MenuDefinition * md
Menu definition for keymap entries.
Definition lib.h:84
struct ConfigSubset * sub
Inherited config items.
Definition lib.h:89
int(* repaint)(struct MuttWindow *win)
void * wdata
Private data.
int(* recalc)(struct MuttWindow *win)
void(* wdata_free)(struct MuttWindow *win, void **ptr)
+ Here is the call graph for this function:
+ Here is the caller graph for this function: