1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/menu.h Sat Dec 29 14:47:40 2007 +0100
1.3 @@ -0,0 +1,99 @@
1.4 +/*
1.5 + * MP3/MPlayer plugin to VDR (C++)
1.6 + *
1.7 + * (C) 2001-2006 Stefan Huelswitt <s.huelswitt@gmx.de>
1.8 + *
1.9 + * This code is free software; you can redistribute it and/or
1.10 + * modify it under the terms of the GNU General Public License
1.11 + * as published by the Free Software Foundation; either version 2
1.12 + * of the License, or (at your option) any later version.
1.13 + *
1.14 + * This code is distributed in the hope that it will be useful,
1.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.17 + * GNU General Public License for more details.
1.18 + *
1.19 + * You should have received a copy of the GNU General Public License
1.20 + * along with this program; if not, write to the Free Software
1.21 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1.22 + * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
1.23 + */
1.24 +
1.25 +#ifndef ___MENU_H
1.26 +#define ___MENU_H
1.27 +
1.28 +#include "common.h"
1.29 +#if APIVERSNUM >= 10307
1.30 +#include <vdr/osdbase.h>
1.31 +#else
1.32 +#include <vdr/osd.h>
1.33 +#endif
1.34 +
1.35 +// ----------------------------------------------------------------
1.36 +
1.37 +void Status(const char *text);
1.38 +void Error(const char *text);
1.39 +void Info(const char *text);
1.40 +
1.41 +// ----------------------------------------------------------------
1.42 +
1.43 +class cFileSources;
1.44 +class cFileSource;
1.45 +class cFileObj;
1.46 +class cDirList;
1.47 +
1.48 +// ----------------------------------------------------------------
1.49 +
1.50 +class cMenuBrowse : public cOsdMenu {
1.51 +private:
1.52 + eOSState Select(bool isred);
1.53 + eOSState Parent(void);
1.54 + bool LoadDir(const char *dir);
1.55 +protected:
1.56 + static cFileObj *lastselect;
1.57 + //
1.58 + cDirList *list;
1.59 + cFileSource *source;
1.60 + bool dirselectable, withID3;
1.61 + char *currentdir, *parent;
1.62 + const char * const *excl;
1.63 +//
1.64 + bool NewDir(const char *dir);
1.65 + void SetSource(cFileSource *Source);
1.66 + cFileObj *CurrentItem(void);
1.67 + virtual void SetButtons(void);
1.68 + virtual eOSState ID3Info(void);
1.69 + virtual eOSState ProcessStdKey(eKeys Key, eOSState state);
1.70 +public:
1.71 + cMenuBrowse(cFileSource *Source, bool Dirselect, bool WithID3, const char *title, const char * const *Excl);
1.72 + ~cMenuBrowse();
1.73 + static cFileObj *GetSelected(void) { return lastselect; }
1.74 + };
1.75 +
1.76 +// ----------------------------------------------------------------
1.77 +
1.78 +class cMenuSource : public cOsdMenu {
1.79 +private:
1.80 + static cFileSource *selected;
1.81 + cFileSource *current;
1.82 + //
1.83 + eOSState Mount(void);
1.84 + eOSState Unmount(void);
1.85 + eOSState Eject(void);
1.86 + eOSState Select(void);
1.87 + bool DoMount(cFileSource *src);
1.88 + bool CheckMount(void);
1.89 +public:
1.90 + cMenuSource(cFileSources *Sources, const char *title);
1.91 + virtual eOSState ProcessKey(eKeys Key);
1.92 + static cFileSource *GetSelected(void) { return selected; }
1.93 + };
1.94 +
1.95 +// ----------------------------------------------------------------
1.96 +
1.97 +class cProgressBar : public cBitmap {
1.98 +public:
1.99 + cProgressBar(int Width, int Height, int Current, int Total);
1.100 + };
1.101 +
1.102 +#endif //___MENU_H