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
Shinya Kitaoka 120a6e
// singleton
Shinya Kitaoka 120a6e
class DVAPI TStencilControl {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  enum MaskType { SHOW_INSIDE = 0, SHOW_OUTSIDE };
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  enum DrawMode {
Shinya Kitaoka 120a6e
    DRAW_ONLY_MASK = 0,
Shinya Kitaoka 120a6e
    DRAW_ALSO_ON_SCREEN,
Shinya Kitaoka 120a6e
    DRAW_ON_SCREEN_ONLY_ONCE
Shinya Kitaoka 120a6e
  };
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Shinya Kitaoka 120a6e
  class Imp;
Shinya Kitaoka 120a6e
  std::unique_ptr<imp> m_imp;</imp>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  static TStencilControl *instance();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  TStencilControl();
Shinya Kitaoka 120a6e
  ~TStencilControl();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void beginMask(DrawMode drawMode = DRAW_ONLY_MASK);
Shinya Kitaoka 120a6e
  void endMask();
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
  void enableMask(MaskType maskType);
Shinya Kitaoka 120a6e
  void disableMask();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif