1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2005 by Kevin Ferrare
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef _GUI_BUTTONBAR_H_
21 #define _GUI_BUTTONBAR_H_
24 #include "screen_access.h"
28 #define BUTTONBAR_HEIGHT 8
29 #define BUTTONBAR_MAX_BUTTONS 3
30 #define BUTTONBAR_CAPTION_LENGTH 8
35 char caption
[BUTTONBAR_MAX_BUTTONS
][BUTTONBAR_CAPTION_LENGTH
];
36 struct screen
* display
;
40 * Initializes the buttonbar
41 * - buttonbar : the buttonbar
43 extern void gui_buttonbar_init(struct gui_buttonbar
* buttonbar
);
46 * Attach the buttonbar to a screen
47 * - buttonbar : the buttonbar
48 * - display : the display to attach the buttonbar
50 extern void gui_buttonbar_set_display(struct gui_buttonbar
* buttonbar
,
51 struct screen
* display
);
54 * Set the caption of the items of the buttonbar
55 * - buttonbar : the buttonbar
56 * - caption1,2,3 : the first, second and thirds items of the bar
58 extern void gui_buttonbar_set(struct gui_buttonbar
* buttonbar
,
61 const char *caption3
);
64 * Disable the buttonbar
65 * - buttonbar : the buttonbar
67 extern void gui_buttonbar_unset(struct gui_buttonbar
* buttonbar
);
70 * Draw the buttonbar on it's attached screen
71 * - buttonbar : the buttonbar
73 extern void gui_buttonbar_draw(struct gui_buttonbar
* buttonbar
);
76 * Returns true if the buttonbar has something to display, false otherwise
77 * - buttonbar : the buttonbar
79 extern bool gui_buttonbar_isset(struct gui_buttonbar
* buttonbar
);
81 #define BUTTONBAR_HEIGHT 0
83 #endif /* _GUI_BUTTONBAR_H_ */