Add menubar.
[bertos.git] / bertos / gui / menubar.h
1 /**
2  * \file
3  * Copyright 2004, 2005 Develer S.r.l. (http://www.develer.com/)
4  * All Rights Reserved.
5  *
6  * \version $Id$
7  *
8  * \author Stefano Fedrigo <aleph@develer.com>
9  *
10  * \brief Graphic menu bar widget.
11  */
12
13 /*#*
14  *#* $Log: menubar.h,v $
15  *#* Revision 1.17  2006/06/16 16:18:49  batt
16  *#* Fix doxygen docs.
17  *#*
18  *#* Revision 1.16  2005/11/16 18:10:19  bernie
19  *#* Move top-level headers to cfg/ as in DevLib.
20  *#*
21  *#* Revision 1.15  2005/02/17 03:49:21  bernie
22  *#* Update to new PGM api.
23  *#*
24  *#* Revision 1.14  2004/10/31 11:02:15  aleph
25  *#* Rename functions with correct codying conventions; Simplify version display
26  *#*
27  *#* Revision 1.13  2004/09/27 12:05:46  powersoft
28  *#* Use sel label for toggle menus and remove it
29  *#*
30  *#* Revision 1.12  2004/09/27 10:05:33  powersoft
31  *#* Menu cosmetic fixes
32  *#*/
33 #ifndef MWARE_MENUBAR_H
34 #define MWARE_MENUBAR_H
35
36 #include <appconfig.h>
37 #include <cfg/compiler.h>
38 #include <brand.h>
39
40 /** Predefined labels ids */
41 enum LabelId
42 {
43         LABEL_EMPTY,  /* empty label */
44         LABEL_MUTE,
45         LABEL_MENU,
46         LABEL_BACK,
47         LABEL_OK,
48         LABEL_CH_1,
49         LABEL_CH_2,
50         LABEL_C1PLUS2,
51         LABEL_UPARROW,
52         LABEL_DOWNARROW,
53         LABEL_MINUS,
54         LABEL_PLUS,
55         LABEL_SEL,
56         #if OEM_BRAND == OEM_CLAIRBROS
57         LABEL_GAIN,
58         #else
59         LABEL_LOCK,
60         #endif
61         LABEL_UNLOCK,
62         LABEL_MORE,
63         LABEL_EDIT,
64         LABEL_FAST,
65         LABEL_PREV,
66         LABEL_NEXT,
67         LABEL_SLOW,
68         LABEL_YES,
69         LABEL_NO,
70
71
72         LABEL_CNT
73 };
74
75 #define UP_ARROW "\x18"
76 #define DOWN_ARROW  "\x19"
77 #define RIGHT_ARROW "\xC4\x1A"
78 #define LEFT_ARROW  "\x10\xC4"
79
80 /* Forward decl */
81 struct Bitmap;
82
83 typedef struct MenuBar
84 {
85         struct Bitmap *bitmap;
86         const_iptr_t  *labels;
87         int            num_labels;
88 } MenuBar;
89
90 void mbar_init(
91                 struct MenuBar *mb,
92                 struct Bitmap *bmp,
93                 const_iptr_t *labels,
94                 int num_labels);
95 void mbar_draw(const struct MenuBar *mb);
96
97 #endif /* MWARE_MENUBAR_H */