nathan@0: /* nathan@0: * MP3/MPlayer plugin to VDR (C++) nathan@0: * nathan@0: * (C) 2001-2006 Stefan Huelswitt nathan@0: * nathan@0: * This code is free software; you can redistribute it and/or nathan@0: * modify it under the terms of the GNU General Public License nathan@0: * as published by the Free Software Foundation; either version 2 nathan@0: * of the License, or (at your option) any later version. nathan@0: * nathan@0: * This code is distributed in the hope that it will be useful, nathan@0: * but WITHOUT ANY WARRANTY; without even the implied warranty of nathan@0: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the nathan@0: * GNU General Public License for more details. nathan@0: * nathan@0: * You should have received a copy of the GNU General Public License nathan@0: * along with this program; if not, write to the Free Software nathan@0: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. nathan@0: * Or, point your browser to http://www.gnu.org/copyleft/gpl.html nathan@0: */ nathan@0: nathan@0: #ifndef ___MENU_H nathan@0: #define ___MENU_H nathan@0: nathan@0: #include "common.h" nathan@0: #if APIVERSNUM >= 10307 nathan@0: #include nathan@0: #else nathan@0: #include nathan@0: #endif nathan@0: nathan@0: // ---------------------------------------------------------------- nathan@0: nathan@0: void Status(const char *text); nathan@0: void Error(const char *text); nathan@0: void Info(const char *text); nathan@0: nathan@0: // ---------------------------------------------------------------- nathan@0: nathan@0: class cFileSources; nathan@0: class cFileSource; nathan@0: class cFileObj; nathan@0: class cDirList; nathan@0: nathan@0: // ---------------------------------------------------------------- nathan@0: nathan@0: class cMenuBrowse : public cOsdMenu { nathan@0: private: nathan@0: eOSState Select(bool isred); nathan@0: eOSState Parent(void); nathan@0: bool LoadDir(const char *dir); nathan@0: protected: nathan@0: static cFileObj *lastselect; nathan@0: // nathan@0: cDirList *list; nathan@0: cFileSource *source; nathan@0: bool dirselectable, withID3; nathan@0: char *currentdir, *parent; nathan@0: const char * const *excl; nathan@0: // nathan@0: bool NewDir(const char *dir); nathan@0: void SetSource(cFileSource *Source); nathan@0: cFileObj *CurrentItem(void); nathan@0: virtual void SetButtons(void); nathan@0: virtual eOSState ID3Info(void); nathan@0: virtual eOSState ProcessStdKey(eKeys Key, eOSState state); nathan@0: public: nathan@0: cMenuBrowse(cFileSource *Source, bool Dirselect, bool WithID3, const char *title, const char * const *Excl); nathan@0: ~cMenuBrowse(); nathan@0: static cFileObj *GetSelected(void) { return lastselect; } nathan@0: }; nathan@0: nathan@0: // ---------------------------------------------------------------- nathan@0: nathan@0: class cMenuSource : public cOsdMenu { nathan@0: private: nathan@0: static cFileSource *selected; nathan@0: cFileSource *current; nathan@0: // nathan@0: eOSState Mount(void); nathan@0: eOSState Unmount(void); nathan@0: eOSState Eject(void); nathan@0: eOSState Select(void); nathan@0: bool DoMount(cFileSource *src); nathan@0: bool CheckMount(void); nathan@0: public: nathan@0: cMenuSource(cFileSources *Sources, const char *title); nathan@0: virtual eOSState ProcessKey(eKeys Key); nathan@0: static cFileSource *GetSelected(void) { return selected; } nathan@0: }; nathan@0: nathan@0: // ---------------------------------------------------------------- nathan@0: nathan@0: class cProgressBar : public cBitmap { nathan@0: public: nathan@0: cProgressBar(int Width, int Height, int Current, int Total); nathan@0: }; nathan@0: nathan@0: #endif //___MENU_H