/*
 * mainwnd.h: Main OSD Window
 *
 */

#ifndef _MAINWND__H
#define _MAINWND__H

#include <vdr/plugin.h>
#include <vdr/interface.h>
#include "filewnd.h"
#include "global.h"
#include "functhread.h"

class cMainWnd : public cOsdObject
{
private:
    cOsd	*pOSD;				// OSD Object
    cFileWnd	*pPanelWnd[_DEF_MAX_WIN];	// Panels Object
    int		m_iCurrentPanel;		// Active Panel
    int		m_iReturnWords;
    cFuncThread *cpThread;
protected:
    virtual void RedrawAll(int iPanelNr = -1);
    virtual int StartFunction(const char *sFile, const char *sToFile, int iFunction);
public:
    cMainWnd(void);
    ~cMainWnd(void);
    virtual void Show(void);
    virtual eOSState ProcessKey(eKeys Key);
    virtual void CreatePanels(void);
    cFileWnd *GetActivePanel();
    cFileWnd *GetNextPanel(bool bChangeCurrentPanel = false);
    virtual bool CopyFile(bool bAsk = true);
    virtual bool DeleteFile(bool bAsk = true);
    virtual bool RemoveFile(void);
    virtual bool Confirm(const char *s, int Seconds = 5);
    eKeys Wait(int Seconds = 0);
    void ShowStatusText(const char *s);
    void ClearStatus(void);
    char *GetPanelDir(int iPanel);
    void SetPanelDir(int iPanel, const char *sDir);
};

#endif //_MAINWND__H
