diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 17:44:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 17:44:12 +0000 |
commit | 8ccb487c21368a7fdc8c7c72315325bf0aa06147 (patch) | |
tree | b2056fae01d325924508a41731edfbd4c3cddd23 /lib/widget/buttonbar.h | |
parent | Initial commit. (diff) | |
download | mc-8ccb487c21368a7fdc8c7c72315325bf0aa06147.tar.xz mc-8ccb487c21368a7fdc8c7c72315325bf0aa06147.zip |
Adding upstream version 3:4.8.29.upstream/3%4.8.29upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | lib/widget/buttonbar.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/widget/buttonbar.h b/lib/widget/buttonbar.h new file mode 100644 index 0000000..9fc049a --- /dev/null +++ b/lib/widget/buttonbar.h @@ -0,0 +1,46 @@ + +/** \file buttonbar.h + * \brief Header: WButtonBar widget + */ + +#ifndef MC__WIDGET_BUTTONBAR_H +#define MC__WIDGET_BUTTONBAR_H + +/*** typedefs(not structures) and defined constants **********************************************/ + +#define BUTTONBAR(x) ((WButtonBar *)(x)) + +/* number of bttons in buttonbar */ +#define BUTTONBAR_LABELS_NUM 10 + +#define buttonbar_clear_label(bb, idx, recv) buttonbar_set_label (bb, idx, "", NULL, recv) + +/*** enums ***************************************************************************************/ + +/*** structures declarations (and typedefs of structures)*****************************************/ + +typedef struct WButtonBar +{ + Widget widget; + + struct + { + char *text; + long command; + Widget *receiver; + int end_coord; /* cumulative width of buttons so far */ + } labels[BUTTONBAR_LABELS_NUM]; +} WButtonBar; + +/*** global variables defined in .c file *********************************************************/ + +/*** declarations of public functions ************************************************************/ + +WButtonBar *buttonbar_new (void); +void buttonbar_set_label (WButtonBar * bb, int idx, const char *text, + const global_keymap_t * keymap, Widget * receiver); +WButtonBar *find_buttonbar (const WDialog * h); + +/*** inline functions ****************************************************************************/ + +#endif /* MC__WIDGET_BUTTONBAR_H */ |