FireBirdLib - Topfield TMS PVR TAP Programming Library
OSDMenuInit.c
Go to the documentation of this file.
1#include <string.h>
2#include "FBLib_TMSOSDMenu.h"
3
11
17
22
26
32
36
38
46
47void OSDMenuInit (bool AllowScrollingOfLongText, bool HasValueColumn, bool NumberedItems, bool ScrollLoop, const char *TitleLeft, const char *TitleRight)
48{
49 tMenu *pMenu;
50
51 TRACEENTER();
52
53 pMenu = &Menu[CurrentMenuLevel];
54
55 memset(pMenu, 0, sizeof(tMenu));
56
58
60 pMenu->AllowScrollingOfLongText = AllowScrollingOfLongText;
61 pMenu->HasValueColumn = HasValueColumn;
62 pMenu->NumberedItems = NumberedItems;
63 pMenu->ScrollLoop = ScrollLoop;
64 pMenu->XPos = 60;
65 pMenu->Width = 600;
66 pMenu->ValueXPos = 350;
67 pMenu->ValueXOffset = 15;
68 pMenu->hasValueArrows = FALSE;
69 pMenu->MaxItems = 30;
70 pMenu->Item = TAP_MemAlloc(pMenu->MaxItems * sizeof(tItem));
71 memset(&pMenu->Item[0], 0, pMenu->MaxItems * sizeof(tItem));
72
74
75 if (TitleLeft) strncpy(pMenu->TitleLeft, TitleLeft, STDSTRINGSIZE);
76 else pMenu->TitleLeft[0] = '\0';
77
78 pMenu->TitleLeft[STDSTRINGSIZE - 1] = '\0';
79
80 if (TitleRight) strncpy(pMenu->TitleRight, TitleRight, STDSTRINGSIZE);
81 else pMenu->TitleRight[0] = '\0';
82
83 pMenu->TitleRight[STDSTRINGSIZE - 1] = '\0';
84
86
87 TRACEEXIT();
88}
#define NRMENULEVELS
@ OMDM_Standard
tOSDMenuLastCursorType
@ LCT_NRCURSORS
#define STDSTRINGSIZE
void OSDMenuLoadStdFonts(void)
tCurrentColorSelected
int ColorPickerLastCursorBlue
Definition: OSDMenuInit.c:31
int ColorPickerLastCursorRed
Definition: OSDMenuInit.c:31
tOSDMenuLastCursorType OSDMenuLastCursor
Definition: OSDMenuInit.c:10
int ColorPickerLastCursorGreen
Definition: OSDMenuInit.c:31
dword InfoBoxSaveAreaX
Definition: OSDMenuInit.c:15
dword LastUnprocessedOSDMenuKey
Definition: OSDMenuInit.c:37
tMenu Menu[NRMENULEVELS]
Definition: OSDMenuInit.c:6
tFontDataUC OSDMenuFont_18
Definition: OSDMenuInit.c:43
void OSDMenuInit(bool AllowScrollingOfLongText, bool HasValueColumn, bool NumberedItems, bool ScrollLoop, const char *TitleLeft, const char *TitleRight)
Definition: OSDMenuInit.c:47
bool OSDDirty
Definition: OSDMenuInit.c:5
tFontDataUC OSDMenuFont_10
Definition: OSDMenuInit.c:39
word ProgressBarFullRgn
Definition: OSDMenuInit.c:24
tMessageBox MessageBox
Definition: OSDMenuInit.c:19
word MessageBoxOSDRgn
Definition: OSDMenuInit.c:18
dword InfoBoxTimeOut
Definition: OSDMenuInit.c:13
dword WaitSpinnerTimeout
Definition: OSDMenuInit.c:35
bool InfoBoxExitButton
Definition: OSDMenuInit.c:16
word ProgressBarOSDRgn
Definition: OSDMenuInit.c:23
bool MessageBoxAllowScrollOver
Definition: OSDMenuInit.c:21
tFontDataUC OSDMenuFont_12
Definition: OSDMenuInit.c:40
tFontDataUC OSDMenuFont_14
Definition: OSDMenuInit.c:41
word InfoBoxOSDRgn
Definition: OSDMenuInit.c:12
dword ProgressBarLastValue
Definition: OSDMenuInit.c:25
tCurrentColorSelected CurrentColorSelected
Definition: OSDMenuInit.c:30
tFontDataUC OSDMenuFont_20B
Definition: OSDMenuInit.c:45
int WaitSpinnerIndex
Definition: OSDMenuInit.c:34
byte * InfoBoxSaveArea
Definition: OSDMenuInit.c:14
dword CurrentMenuLevel
Definition: OSDMenuInit.c:7
tFontDataUC OSDMenuFont_20
Definition: OSDMenuInit.c:44
bool ListDirty
Definition: OSDMenuInit.c:5
word ColorPickerOSDRgn
Definition: OSDMenuInit.c:27
word WaitSpinnerRgn
Definition: OSDMenuInit.c:33
bool ButtonsDirty
Definition: OSDMenuInit.c:5
word OSDRgn
Definition: OSDMenuInit.c:4
bool TitleDirty
Definition: OSDMenuInit.c:5
word OSDMenuSelectionBarRgn
Definition: OSDMenuInit.c:4
bool LogoDirty
Definition: OSDMenuInit.c:5
tCursorType MenuCursorType
Definition: OSDMenuInit.c:9
word MyOSDRgn
Definition: OSDMenuInit.c:4
dword ColorPickerDefaultColor
Definition: OSDMenuInit.c:29
bool MessageBoxNoNormalMode
Definition: OSDMenuInit.c:20
dword ButtonColor
Definition: OSDMenuInit.c:8
dword InfoBoxSaveAreaY
Definition: OSDMenuInit.c:15
tFontDataUC OSDMenuFont_16
Definition: OSDMenuInit.c:42
dword ColorPickerColor
Definition: OSDMenuInit.c:28
#define TRACEEXIT()
Definition: libFireBird.h:1244
void OSDMenuSetLineHeight(tLineHeight type)
#define TRACEENTER()
Definition: libFireBird.h:1243
tCursorType
Definition: libFireBird.h:2747
@ CT_Standard
Definition: libFireBird.h:2748
@ LH_Normal
Definition: libFireBird.h:2741
bool NumberedItems
bool AllowScrollingOfLongText
dword XPos
dword Width
tItem * Item
tOSDMenuDisplayMode OSDMenuDisplayMode
bool hasValueArrows
char TitleRight[STDSTRINGSIZE]
bool HasValueColumn
dword ValueXPos
int MaxItems
int ValueXOffset
char TitleLeft[STDSTRINGSIZE]
bool ScrollLoop