3 * \brief Header: WButtonBar widget
6 #ifndef MC__WIDGET_BUTTONBAR_H
7 #define MC__WIDGET_BUTTONBAR_H
9 /*** typedefs(not structures) and defined constants **********************************************/
11 #define BUTTONBAR(x) ((WButtonBar *)(x))
13 /* number of bttons in buttonbar */
14 #define BUTTONBAR_LABELS_NUM 10
16 #define buttonbar_clear_label(bb, idx, recv) buttonbar_set_label (bb, idx, "", NULL, recv)
18 /*** enums ***************************************************************************************/
20 /*** structures declarations (and typedefs of structures)*****************************************/
22 struct global_keymap_t
;
24 typedef struct WButtonBar
27 gboolean visible
; /* Is it visible? */
31 unsigned long command
;
33 int end_coord
; /* cumulative width of buttons so far */
34 } labels
[BUTTONBAR_LABELS_NUM
];
37 struct global_keymap_t
;
39 /*** global variables defined in .c file *********************************************************/
41 /*** declarations of public functions ************************************************************/
43 WButtonBar
*buttonbar_new (gboolean visible
);
44 void buttonbar_set_label (WButtonBar
* bb
, int idx
, const char *text
,
45 const struct global_keymap_t
*keymap
, const Widget
* receiver
);
46 WButtonBar
*find_buttonbar (const WDialog
* h
);
48 /*** inline functions ****************************************************************************/
51 buttonbar_redraw (WButtonBar
* bb
)
54 send_message (bb
, NULL
, MSG_DRAW
, 0, NULL
);
58 buttonbar_set_visible (WButtonBar
* bb
, gboolean visible
)
60 bb
->visible
= visible
;
63 #endif /* MC__WIDGET_BUTTONBAR_H */