Shinya Kitaoka 810553
#pragma once
Shinya Kitaoka 810553
Toshihiro Shimizu 890ddd
#ifndef TSTENCILCONTROL_H
Toshihiro Shimizu 890ddd
#define TSTENCILCONTROL_H
Toshihiro Shimizu 890ddd
Shinya Kitaoka 262a92
#include <memory></memory>
Shinya Kitaoka 262a92
Toshihiro Shimizu 890ddd
#include "tcommon.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef DVAPI
Toshihiro Shimizu 890ddd
#undef DVVAR
Toshihiro Shimizu 890ddd
#ifdef TGL_EXPORTS
Toshihiro Shimizu 890ddd
#define DVAPI DV_EXPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_EXPORT_VAR
Toshihiro Shimizu 890ddd
#else
Toshihiro Shimizu 890ddd
#define DVAPI DV_IMPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_IMPORT_VAR
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//singleton
Toshihiro Shimizu 890ddd
class DVAPI TStencilControl
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	enum MaskType {
Toshihiro Shimizu 890ddd
		SHOW_INSIDE = 0,
Toshihiro Shimizu 890ddd
		SHOW_OUTSIDE
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	enum DrawMode {
Toshihiro Shimizu 890ddd
		DRAW_ONLY_MASK = 0,
Toshihiro Shimizu 890ddd
		DRAW_ALSO_ON_SCREEN,
Toshihiro Shimizu 890ddd
		DRAW_ON_SCREEN_ONLY_ONCE
Toshihiro Shimizu 890ddd
	};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Toshihiro Shimizu 890ddd
	class Imp;
Shinya Kitaoka 262a92
	std::unique_ptr<imp> m_imp;</imp>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	static TStencilControl *instance();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	TStencilControl();
Toshihiro Shimizu 890ddd
	~TStencilControl();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void beginMask(DrawMode drawMode = DRAW_ONLY_MASK);
Toshihiro Shimizu 890ddd
	void endMask();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void enableMask(MaskType maskType);
Toshihiro Shimizu 890ddd
	void disableMask();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif