1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2005 by Kevin Ferrare
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef _GUI_BUTTONBAR_H_
23 #define _GUI_BUTTONBAR_H_
26 #include "screen_access.h"
30 #define BUTTONBAR_HEIGHT 8
31 #define BUTTONBAR_MAX_BUTTONS 3
32 #define BUTTONBAR_CAPTION_LENGTH 8
37 char caption
[BUTTONBAR_MAX_BUTTONS
][BUTTONBAR_CAPTION_LENGTH
];
38 struct screen
* display
;
42 * Initializes the buttonbar
43 * - buttonbar : the buttonbar
45 extern void gui_buttonbar_init(struct gui_buttonbar
* buttonbar
);
48 * Attach the buttonbar to a screen
49 * - buttonbar : the buttonbar
50 * - display : the display to attach the buttonbar
52 extern void gui_buttonbar_set_display(struct gui_buttonbar
* buttonbar
,
53 struct screen
* display
);
56 * Set the caption of the items of the buttonbar
57 * - buttonbar : the buttonbar
58 * - caption1,2,3 : the first, second and thirds items of the bar
60 extern void gui_buttonbar_set(struct gui_buttonbar
* buttonbar
,
63 const char *caption3
);
66 * Disable the buttonbar
67 * - buttonbar : the buttonbar
69 extern void gui_buttonbar_unset(struct gui_buttonbar
* buttonbar
);
72 * Draw the buttonbar on it's attached screen
73 * - buttonbar : the buttonbar
75 extern void gui_buttonbar_draw(struct gui_buttonbar
* buttonbar
);
78 * Returns true if the buttonbar has something to display, false otherwise
79 * - buttonbar : the buttonbar
81 extern bool gui_buttonbar_isset(struct gui_buttonbar
* buttonbar
);
83 #define BUTTONBAR_HEIGHT 0
85 #endif /* _GUI_BUTTONBAR_H_ */