nathan@0
|
1 |
/*
|
nathan@0
|
2 |
* MP3/MPlayer plugin to VDR (C++)
|
nathan@0
|
3 |
*
|
nathan@22
|
4 |
* (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
|
nathan@0
|
5 |
*
|
nathan@0
|
6 |
* This code is free software; you can redistribute it and/or
|
nathan@0
|
7 |
* modify it under the terms of the GNU General Public License
|
nathan@0
|
8 |
* as published by the Free Software Foundation; either version 2
|
nathan@0
|
9 |
* of the License, or (at your option) any later version.
|
nathan@0
|
10 |
*
|
nathan@0
|
11 |
* This code is distributed in the hope that it will be useful,
|
nathan@0
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
nathan@0
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
nathan@0
|
14 |
* GNU General Public License for more details.
|
nathan@0
|
15 |
*
|
nathan@0
|
16 |
* You should have received a copy of the GNU General Public License
|
nathan@0
|
17 |
* along with this program; if not, write to the Free Software
|
nathan@0
|
18 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
nathan@0
|
19 |
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
|
nathan@0
|
20 |
*/
|
nathan@0
|
21 |
|
nathan@0
|
22 |
#ifndef ___MENU_H
|
nathan@0
|
23 |
#define ___MENU_H
|
nathan@0
|
24 |
|
nathan@0
|
25 |
#include "common.h"
|
nathan@0
|
26 |
#include <vdr/osdbase.h>
|
nathan@0
|
27 |
|
nathan@0
|
28 |
// ----------------------------------------------------------------
|
nathan@0
|
29 |
|
nathan@0
|
30 |
void Status(const char *text);
|
nathan@0
|
31 |
void Error(const char *text);
|
nathan@0
|
32 |
void Info(const char *text);
|
nathan@0
|
33 |
|
nathan@0
|
34 |
// ----------------------------------------------------------------
|
nathan@0
|
35 |
|
nathan@0
|
36 |
class cFileSources;
|
nathan@0
|
37 |
class cFileSource;
|
nathan@0
|
38 |
class cFileObj;
|
nathan@0
|
39 |
class cDirList;
|
nathan@0
|
40 |
|
nathan@0
|
41 |
// ----------------------------------------------------------------
|
nathan@0
|
42 |
|
nathan@0
|
43 |
class cMenuBrowse : public cOsdMenu {
|
nathan@0
|
44 |
private:
|
nathan@0
|
45 |
eOSState Select(bool isred);
|
nathan@0
|
46 |
eOSState Parent(void);
|
nathan@0
|
47 |
bool LoadDir(const char *dir);
|
nathan@0
|
48 |
protected:
|
nathan@0
|
49 |
static cFileObj *lastselect;
|
nathan@0
|
50 |
//
|
nathan@0
|
51 |
cDirList *list;
|
nathan@0
|
52 |
cFileSource *source;
|
nathan@0
|
53 |
bool dirselectable, withID3;
|
nathan@0
|
54 |
char *currentdir, *parent;
|
nathan@0
|
55 |
const char * const *excl;
|
nathan@0
|
56 |
//
|
nathan@0
|
57 |
bool NewDir(const char *dir);
|
nathan@0
|
58 |
void SetSource(cFileSource *Source);
|
nathan@0
|
59 |
cFileObj *CurrentItem(void);
|
nathan@0
|
60 |
virtual void SetButtons(void);
|
nathan@0
|
61 |
virtual eOSState ID3Info(void);
|
nathan@0
|
62 |
virtual eOSState ProcessStdKey(eKeys Key, eOSState state);
|
nathan@0
|
63 |
public:
|
nathan@0
|
64 |
cMenuBrowse(cFileSource *Source, bool Dirselect, bool WithID3, const char *title, const char * const *Excl);
|
nathan@0
|
65 |
~cMenuBrowse();
|
nathan@0
|
66 |
static cFileObj *GetSelected(void) { return lastselect; }
|
nathan@0
|
67 |
};
|
nathan@0
|
68 |
|
nathan@0
|
69 |
// ----------------------------------------------------------------
|
nathan@0
|
70 |
|
nathan@0
|
71 |
class cMenuSource : public cOsdMenu {
|
nathan@0
|
72 |
private:
|
nathan@0
|
73 |
static cFileSource *selected;
|
nathan@0
|
74 |
cFileSource *current;
|
nathan@0
|
75 |
//
|
nathan@0
|
76 |
eOSState Mount(void);
|
nathan@0
|
77 |
eOSState Unmount(void);
|
nathan@0
|
78 |
eOSState Eject(void);
|
nathan@0
|
79 |
eOSState Select(void);
|
nathan@0
|
80 |
bool DoMount(cFileSource *src);
|
nathan@0
|
81 |
bool CheckMount(void);
|
nathan@0
|
82 |
public:
|
nathan@0
|
83 |
cMenuSource(cFileSources *Sources, const char *title);
|
nathan@0
|
84 |
virtual eOSState ProcessKey(eKeys Key);
|
nathan@0
|
85 |
static cFileSource *GetSelected(void) { return selected; }
|
nathan@0
|
86 |
};
|
nathan@0
|
87 |
|
nathan@0
|
88 |
// ----------------------------------------------------------------
|
nathan@0
|
89 |
|
nathan@0
|
90 |
class cProgressBar : public cBitmap {
|
nathan@0
|
91 |
public:
|
nathan@0
|
92 |
cProgressBar(int Width, int Height, int Current, int Total);
|
nathan@0
|
93 |
};
|
nathan@0
|
94 |
|
nathan@0
|
95 |
#endif //___MENU_H
|