Use cfg instead appconfig in bertos modules. Reformat. Remove CVS logs.
[bertos.git] / bertos / gui / menubar.h
1 /**
2  * \file
3  * <!--
4  * This file is part of BeRTOS.
5  *
6  * Bertos is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  * As a special exception, you may use this file as part of a free software
21  * library without restriction.  Specifically, if other files instantiate
22  * templates or use macros or inline functions from this file, or you compile
23  * this file and link it with other files to produce an executable, this
24  * file does not by itself cause the resulting executable to be covered by
25  * the GNU General Public License.  This exception does not however
26  * invalidate any other reasons why the executable file might be covered by
27  * the GNU General Public License.
28  *
29  * Copyright 2004, 2005, 2008 Develer S.r.l. (http://www.develer.com/)
30  * All Rights Reserved.
31  * -->
32  *
33  * \brief Graphic menu bar widget.
34  *
35  * \version $Id$
36  *
37  * \author Stefano Fedrigo <aleph@develer.com>
38  *
39  */
40
41 #ifndef MWARE_MENUBAR_H
42 #define MWARE_MENUBAR_H
43
44 #include <cfg/compiler.h>
45
46 /** Predefined labels ids */
47 enum LabelId
48 {
49         LABEL_EMPTY,  /* empty label */
50         LABEL_MUTE,
51         LABEL_MENU,
52         LABEL_BACK,
53         LABEL_OK,
54         LABEL_CH_1,
55         LABEL_CH_2,
56         LABEL_C1PLUS2,
57         LABEL_UPARROW,
58         LABEL_DOWNARROW,
59         LABEL_MINUS,
60         LABEL_PLUS,
61         LABEL_SEL,
62         LABEL_LOCK,
63         LABEL_UNLOCK,
64         LABEL_MORE,
65         LABEL_EDIT,
66         LABEL_FAST,
67         LABEL_PREV,
68         LABEL_NEXT,
69         LABEL_SLOW,
70         LABEL_YES,
71         LABEL_NO,
72
73
74         LABEL_CNT
75 };
76
77 #define UP_ARROW "\x18"
78 #define DOWN_ARROW  "\x19"
79 #define RIGHT_ARROW "\xC4\x1A"
80 #define LEFT_ARROW  "\x10\xC4"
81
82 /* Forward decl */
83 struct Bitmap;
84
85 typedef struct MenuBar
86 {
87         struct Bitmap *bitmap;
88         const_iptr_t  *labels;
89         int            num_labels;
90 } MenuBar;
91
92 void mbar_init(
93                 struct MenuBar *mb,
94                 struct Bitmap *bmp,
95                 const_iptr_t *labels,
96                 int num_labels);
97 void mbar_draw(const struct MenuBar *mb);
98
99 #endif /* MWARE_MENUBAR_H */