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