1 /*
2  * Copyright (C) 2002 - David W. Durham
3  *
4  * This file is part of ReZound, an audio editing application.
5  *
6  * ReZound is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published
8  * by the Free Software Foundation; either version 2 of the License,
9  * or (at your option) any later version.
10  *
11  * ReZound is distributed in the hope that it will be useful, but
12  * 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  */
20 
21 #ifndef __CStatusComm_H__
22 #define __CStatusComm_H__
23 
24 #include "../../config/common.h"
25 #include "fox_compat.h"
26 
27 #include "../backend/AStatusComm.h"
28 
29 class CProgressDialog;
30 
31 
32 #ifdef FOX_NO_NAMESPACE
33 	class FXWindow;
34 #else
35 	namespace FX { class FXWindow; }
36 	using namespace FX;
37 #endif
38 
39 #define MAX_PROGRESS_DIALOGS 8
40 
41 class CStatusComm : public AStatusComm
42 {
43 public:
44 	CStatusComm(FXWindow *mainWindow);
45 	virtual ~CStatusComm();
46 
47 	virtual void error(const string &message,VSeverity severity=none,bool reformatIfNeeded=true);
48 	virtual void warning(const string &message,bool reformatIfNeeded=true);
49 	virtual void message(const string &message,bool reformatIfNeeded=true);
50 	virtual VAnswer question(const string &message,/*VQuestion*/int options,bool reformatIfNeeded=true);
51 
52 	virtual void beep();
53 
54 	virtual int beginProgressBar(const string &title,bool showCancelButton=false);
55 	virtual bool updateProgressBar(int handle,int progress,const string timeElapsed,const string timeRemaining);
56 	virtual void endProgressBar(int handle);
57 	virtual void endAllProgressBars();
58 
59 private:
60 	FXWindow *mainWindow;
61 	CProgressDialog *progressDialogs[MAX_PROGRESS_DIALOGS];
62 
63 };
64 
65 #endif
66