NekoWM
A gfxprim proxy backend tiling window manager
Loading...
Searching...
No Matches
Data Fields
neko_menu Struct Reference

A neko menu description. More...

#include <neko_menu.h>

Data Fields

void(* draw_entry )(size_t index, gp_pixmap *pixmap, gp_pixel fg, gp_pixel bg, gp_coord x, gp_coord y, gp_size w, gp_size h)
 Callback to draw a menu entry.
 
size_t items_cnt
 Number of items in the menu.
 
size_t items_offset
 Number of items to skip.
 
size_t item_sel
 Currently selected item.
 
unsigned int focused:1
 I set the menu is focused.
 
gp_size entry_h
 The height for the menu entry redered by the draw entry callback.
 
char * heading
 Menu heading.
 

Detailed Description

A neko menu description.

Definition at line 19 of file neko_menu.h.

Field Documentation

◆ draw_entry

void(* neko_menu::draw_entry) (size_t index, gp_pixmap *pixmap, gp_pixel fg, gp_pixel bg, gp_coord x, gp_coord y, gp_size w, gp_size h)

Callback to draw a menu entry.

Parameters
indexThe index of the entry to render.
pixmapA pixmap to render the entry into.
fgA foreground color.
bgA background color.
xA x offset to start the rendering at.
yA y offset to start the rendering at.
wThe width of the menu item.
hThe height of the menu intem.

Definition at line 32 of file neko_menu.h.

◆ focused

unsigned int neko_menu::focused

I set the menu is focused.

This changes the visual style.

Definition at line 54 of file neko_menu.h.

◆ items_offset

size_t neko_menu::items_offset

Number of items to skip.

This is modified by the menu code in order to fit the selected item into the view.

Definition at line 44 of file neko_menu.h.


The documentation for this struct was generated from the following file: