Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2136 | - | 1 | /***************************************************************************** |
2 | * Copyright (C) 2013 Oliver Gemesi * |
||
3 | * * |
||
4 | * This program is free software; you can redistribute it and/or modify * |
||
5 | * it under the terms of the GNU General Public License as published by * |
||
6 | * the Free Software Foundation; either version 2 of the License. * |
||
7 | * * |
||
8 | * This program is distributed in the hope that it will be useful, * |
||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
||
11 | * GNU General Public License for more details. * |
||
12 | * * |
||
13 | * You should have received a copy of the GNU General Public License * |
||
14 | * along with this program; if not, write to the * |
||
15 | * Free Software Foundation, Inc., * |
||
16 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
||
17 | *****************************************************************************/ |
||
18 | |||
19 | //############################################################################ |
||
20 | //# HISTORY menuctrl.h |
||
21 | //# |
||
22 | //# 11.06.2014 OG |
||
23 | //# - add: MenuCtrl_GetMenuIndex() |
||
24 | //# |
||
25 | //# 11.05.2014 OG |
||
26 | //# - add: MenuCtrl_SetTitleFromParentItem() |
||
27 | //# - add: MenuCtrl_GetItemText(), MenuCtrl_IsItemTextPGM() |
||
28 | //# |
||
29 | //# 07.05.2014 OG |
||
30 | //# - add: MenuCtrl_PushSeparatorID() |
||
31 | //# |
||
32 | //# 06.05.2014 OG |
||
33 | //# - add: MenuCtrl_GetItemIdByIndex(), MenuCtrl_GetItemCount() |
||
34 | //# |
||
35 | //# 05.05.2014 OG |
||
36 | //# - add: MenuCtrl_SetDelete(), MenuCtrl_SetMove() |
||
37 | //# |
||
38 | //# 30.03.2014 OG |
||
39 | //# - del: MenuCtrl_PushML_P(), MenuCtrl_PushML() (Umstellung Sprachen abgeschlossen) |
||
40 | //# - add: MenuCtrl_PushML2(), MenuCtrl_PushML2_P() fuer Umstellung von 3 auf 2 Sprachen |
||
41 | //# |
||
42 | //# 24.03.2014 OG |
||
43 | //# - add: MenuCtrl_PushSeparator() |
||
44 | //# - add: MENU_SEPARATOR |
||
45 | //# - chg: Wert von MENU_REFRESH und MENU_REDRAW |
||
46 | //# |
||
47 | //# 23.03.2014 OG |
||
48 | //# - add: Unterstuetzung fuer MK-Parameter-Edit (mkparameters.c) |
||
49 | //# - add: MenuCtrl_PushParamEdit() |
||
50 | //# - add: define MENU_PARAMEDIT |
||
51 | //# |
||
52 | //# 17.02.2014 OG |
||
53 | //# - add: MenuCtrl_SetTopSpace() |
||
54 | //# |
||
55 | //# 15.02.2014 OG |
||
56 | //# - add: MenuCtrl_ItemSelect() |
||
57 | //# |
||
58 | //# 07.07.2013 OG |
||
59 | //# - add: MenuCtrl_ItemMarkR() |
||
60 | //# |
||
61 | //# 24.05.2013 OG |
||
62 | //# - chg: MenuCtrl_Push... Funktionen vereinheitlicht mit internen Aenderungen |
||
63 | //# betrifft externe Funktionsaufrufe die geändert wurden |
||
64 | //# - del: MenuCtrl_PushSimple_P(), MenuCtrl_PushSimple() |
||
65 | //# - add: MenuCtrl_ItemMark() |
||
66 | //# |
||
67 | //# 23.05.2013 OG |
||
68 | //# - add: MenuCtrl_PushSimple_P(), MenuCtrl_PushSimple() |
||
69 | //# |
||
70 | //# 21.05.2013 OG |
||
71 | //# - add: MenuCtrl_ShowLevel() |
||
72 | //# |
||
73 | //# 17.05.2013 OG - NEU |
||
74 | //############################################################################ |
||
75 | |||
76 | #ifndef MENUCTRL_H |
||
77 | #define MENUCTRL_H |
||
78 | |||
79 | #define MENU_ITEM 1 // Typ des Menueitems: normaler Eintrag ohne ">" am Ende |
||
80 | #define MENU_SUB 2 // Typ des Menueitems: Submenue - es wird noch ein ">" angezeigt |
||
81 | #define MENU_SEPARATOR 3 // nur fuer MenuCtrl_PushSeparator() fuer (verwendet von mkparameters.c) |
||
82 | #define MENU_PARAMEDIT 4 // nur fuer MenuCtrl_PushParamEdit() fuer (verwendet von mkparameters.c) |
||
83 | |||
84 | #define NOFUNC 0 // keine Funktion uebergeben |
||
85 | #define NOTEXT 0 // kein Text uebergeben |
||
86 | |||
87 | #define MENUEVENT_NONE 0 // wird von MenuCtrl_Ctrl() zurueckgegeben |
||
88 | #define MENUEVENT_ITEM 1 // wird von MenuCtrl_Ctrl() zurueckgegeben |
||
89 | #define MENUEVENT_KEY 2 // wird von MenuCtrl_Ctrl() zurueckgegeben |
||
90 | |||
91 | #define MENUCTRL_EVENT 0 // Parameter fuer MenuCtrl_Ctrl() - Ruecksprung nur bei einem Event |
||
92 | #define MENUCTRL_RETURN 1 // Parameter fuer MenuCtrl_Ctrl() - Ruecksprung immer |
||
93 | |||
94 | |||
95 | #define MENU_REFRESH 1 // MenuCtrl_Refresh() |
||
96 | #define MENU_REDRAW 2 // MenuCtrl_Refresh() |
||
97 | |||
98 | |||
99 | void MenuCtrl_Create( void ); |
||
100 | void MenuCtrl_Destroy( void ); |
||
101 | void MenuCtrl_ShowLevel( uint8_t value ); |
||
102 | |||
103 | void MenuCtrl_SetTitle( const char *title ); |
||
104 | void MenuCtrl_SetTitle_P( const char *title ); |
||
105 | void MenuCtrl_SetTitleFromParentItem( void ); |
||
106 | void MenuCtrl_SetCycle( uint8_t value ); |
||
107 | void MenuCtrl_SetShowBatt( uint8_t value ); |
||
108 | void MenuCtrl_SetBeep( uint8_t value ); |
||
109 | void MenuCtrl_SetKey( uint8_t key, const char *keytext, void (*keyfunc)(void) ); |
||
110 | void MenuCtrl_SetTopSpace( uint8_t value ); |
||
111 | void MenuCtrl_SetMove( uint8_t value ); |
||
112 | void MenuCtrl_SetDelete( uint8_t value ); |
||
113 | |||
114 | int8_t MenuCtrl_GetMenuIndex( void ); |
||
115 | uint8_t MenuCtrl_GetItemId( void ); |
||
116 | uint8_t MenuCtrl_GetKey( void ); |
||
117 | uint8_t MenuCtrl_GetItemIdByIndex( uint8_t index ); |
||
118 | uint8_t MenuCtrl_GetItemCount( void ); |
||
119 | const char * MenuCtrl_GetItemText( void ); |
||
120 | uint8_t MenuCtrl_IsItemTextPGM( void ); |
||
121 | |||
122 | void MenuCtrl_ItemSelect( uint8_t itemid ); |
||
123 | void MenuCtrl_ItemActive( uint8_t itemid, uint8_t value ); |
||
124 | void MenuCtrl_ItemMark( uint8_t itemid, uint8_t value ); |
||
125 | void MenuCtrl_ItemMarkR( uint8_t itemid, uint8_t value ); |
||
126 | |||
127 | void MenuCtrl_PushML2_P( uint8_t itemid, uint8_t itemtype, void (*menufunc)(void), const char *text_de, const char *text_en ); |
||
128 | void MenuCtrl_PushML2( uint8_t itemid, uint8_t itemtype, void (*menufunc)(void), const char *text_de, const char *text_en ); |
||
129 | void MenuCtrl_Push_P( uint8_t itemid, uint8_t itemtype, void (*menufunc)(void), const char *text ); |
||
130 | void MenuCtrl_Push( uint8_t itemid, uint8_t itemtype, void (*menufunc)(void), const char *text ); |
||
131 | void MenuCtrl_PushParamEdit( uint8_t itemid ); |
||
132 | void MenuCtrl_PushSeparator( void ); |
||
133 | void MenuCtrl_PushSeparatorID( uint8_t itemid ); |
||
134 | |||
135 | void MenuCtrl_Refresh( uint8_t mode ); |
||
136 | uint8_t MenuCtrl_Control( uint8_t ctrlmode ); |
||
137 | |||
138 | #endif // MENUCTRL_H |