aboutsummaryrefslogtreecommitdiff
path: root/src/viewerpercent.h
blob: d40ca1bbd987a6d6059fd4e0eb4180ba31709fda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef VIEWER_PERCENT_H
#define VIEWER_PERCENT_H

#include <stdint.h>

#include "viewer.h"

class ViewerPercent : public Viewer
{
public:
	ViewerPercent();
	virtual ~ViewerPercent();

	virtual void beginCommand( Action::eAction nAct, const std::string &sTarget );
	virtual void endCommand();

	virtual void beginRequiresCheck( bool bCached, const std::string &sName );
	virtual void endRequiresCheck();
	virtual void beginPerform( Perform *pPerform );
	virtual void endPerform();
	virtual void beginPerforms( int nCount );
	virtual void endPerforms();
	virtual void beginAction( const std::string &sName, int nCommands );
	virtual void endAction();

	void printPercent( const std::string &sCur );

private:
	int nTotalCommands;
	int nCurCommand;
	int nTotalPerforms;
	int nCurPerform;
	std::string sTarget;
	int nLastLen;
	int nWidth;
	int nTermWidth;
};

#endif