root/lib/widget/buttonbar.h

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

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. buttonbar_set_visible

   1 
   2 /** \file buttonbar.h
   3  *  \brief Header: WButtonBar widget
   4  */
   5 
   6 #ifndef MC__WIDGET_BUTTONBAR_H
   7 #define MC__WIDGET_BUTTONBAR_H
   8 
   9 /*** typedefs(not structures) and defined constants **********************************************/
  10 
  11 #define BUTTONBAR(x) ((WButtonBar *)(x))
  12 
  13 /* number of bttons in buttonbar */
  14 #define BUTTONBAR_LABELS_NUM 10
  15 
  16 #define buttonbar_clear_label(bb, idx, recv) buttonbar_set_label (bb, idx, "", NULL, recv)
  17 
  18 /*** enums ***************************************************************************************/
  19 
  20 /*** structures declarations (and typedefs of structures)*****************************************/
  21 
  22 typedef struct WButtonBar
  23 {
  24     Widget widget;
  25     gboolean visible;           /* Is it visible? */
  26     struct
  27     {
  28         char *text;
  29         long command;
  30         Widget *receiver;
  31         int end_coord;          /* cumulative width of buttons so far */
  32     } labels[BUTTONBAR_LABELS_NUM];
  33 } WButtonBar;
  34 
  35 /*** global variables defined in .c file *********************************************************/
  36 
  37 /*** declarations of public functions ************************************************************/
  38 
  39 WButtonBar *buttonbar_new (gboolean visible);
  40 void buttonbar_set_label (WButtonBar * bb, int idx, const char *text,
  41                           const global_keymap_t * keymap, Widget * receiver);
  42 WButtonBar *find_buttonbar (const WDialog * h);
  43 
  44 /*** inline functions ****************************************************************************/
  45 
  46 static inline void
  47 buttonbar_set_visible (WButtonBar * bb, gboolean visible)
     /* [previous][next][first][last][top][bottom][index][help]  */
  48 {
  49     bb->visible = visible;
  50 }
  51 
  52 #endif /* MC__WIDGET_BUTTONBAR_H */

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