root/lib/widget/menu.h

/* [previous][next][first][last][top][bottom][index][help]  */

INCLUDED FROM


   1 /*
   2    Header file for pulldown menu engine for Midnignt Commander
   3  */
   4 
   5 /** \file menu.h
   6  *  \brief Header: pulldown menu code
   7  */
   8 
   9 #ifndef MC__WIDGET_MENU_H
  10 #define MC__WIDGET_MENU_H
  11 
  12 /*** typedefs(not structures) and defined constants **********************************************/
  13 
  14 #define MENUBAR(x) ((WMenuBar *)(x))
  15 
  16 #define menu_separator_new() NULL
  17 
  18 /*** enums ***************************************************************************************/
  19 
  20 /*** structures declarations (and typedefs of structures)*****************************************/
  21 
  22 struct menu_entry_t;
  23 typedef struct menu_entry_t menu_entry_t;
  24 
  25 struct menu_t;
  26 typedef struct menu_t menu_t;
  27 
  28 /* The button bar menu */
  29 typedef struct WMenuBar
  30 {
  31     Widget widget;
  32 
  33     gboolean is_dropped;        /* If the menubar has dropped */
  34     GList *menu;                /* The actual menus */
  35     guint current;              /* Current menu on the top bar */
  36     unsigned long previous_widget;      /* Selected widget ID before activating menu */
  37 } WMenuBar;
  38 
  39 /*** global variables defined in .c file *********************************************************/
  40 
  41 extern const global_keymap_t *menu_map;
  42 
  43 /*** declarations of public functions ************************************************************/
  44 
  45 menu_entry_t *menu_entry_new (const char *name, long command);
  46 void menu_entry_free (menu_entry_t * me);
  47 
  48 menu_t *menu_new (const char *name, GList * entries, const char *help_node);
  49 void menu_set_name (menu_t * menu, const char *name);
  50 void menu_free (menu_t * menu);
  51 
  52 WMenuBar *menubar_new (GList * menu);
  53 void menubar_set_menu (WMenuBar * menubar, GList * menu);
  54 void menubar_add_menu (WMenuBar * menubar, menu_t * menu);
  55 void menubar_arrange (WMenuBar * menubar);
  56 
  57 WMenuBar *menubar_find (const WDialog * h);
  58 
  59 void menubar_activate (WMenuBar * menubar, gboolean dropped, int which);
  60 
  61 /*** inline functions ****************************************************************************/
  62 
  63 #endif /* MC__WIDGET_MENU_H */

/* [previous][next][first][last][top][bottom][index][help]  */