Merge branch '4600_filter_segfault'
[midnight-commander.git] / lib / widget / buttonbar.h
blobaf9249c9335dd75cd4298bbaa881b54b8af82700
2 /** \file buttonbar.h
3 * \brief Header: WButtonBar widget
4 */
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 typedef struct WButtonBar
24 Widget widget;
26 struct
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;
35 /*** global variables defined in .c file *********************************************************/
37 /*** declarations of public functions ************************************************************/
39 WButtonBar *buttonbar_new (void);
40 void buttonbar_set_label (WButtonBar * bb, int idx, const char *text,
41 const global_keymap_t * keymap, Widget * receiver);
42 WButtonBar *buttonbar_find (const WDialog * h);
44 /*** inline functions ****************************************************************************/
46 #endif /* MC__WIDGET_BUTTONBAR_H */