Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef PROGRESSBAR_INCLUDED
Toshihiro Shimizu 890ddd
#define PROGRESSBAR_INCLUDED
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tw/popup.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI TProgressBar : public TPopup
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	class Imp;
Toshihiro Shimizu 890ddd
	Imp *m_data;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	TProgressBar(TWidget *parent, string name = "progress bar", wstring text = L"");
Toshihiro Shimizu 890ddd
	~TProgressBar();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void popup();
Toshihiro Shimizu 890ddd
	// se ritorna false vuol dire che l'utente ha premuto il bottone
Toshihiro Shimizu 890ddd
	bool changeFraction(int num, int den);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void closePopup();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void configureNotify(const TDimension &d);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TDimension getPreferredSize() const;
Toshihiro Shimizu 890ddd
	void setPreferredSize(const TDimension &d);
Toshihiro Shimizu 890ddd
	void setPreferredSize(int lx, int ly)
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		setPreferredSize(TDimension(lx, ly));
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	bool onNcPaint(
Toshihiro Shimizu 890ddd
		bool is_active,
Toshihiro Shimizu 890ddd
		const TDimension &window_size,
Toshihiro Shimizu 890ddd
		const TRect &caption_rect);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif