/* -*- c++ -*- * Copyright ©2008 Hugo Mills * * This software is distributed under the terms of the GNU GPL v3 * For more information on the GPL, see the file COPYING or * visit http://www.gnu.org/ * * This software is distributed without warranty */ #ifndef RENDERCONTEXTSTACKED_H #define RENDERCONTEXTSTACKED_H #include "rendercontext.h" #include class RenderContextStacked : public RenderContext { public: RenderContextStacked() : RenderContext(-1, NULL) { } RenderContextStacked(RenderContext* c); virtual ~RenderContextStacked(); virtual void render(Output* what) const; virtual int size(void) const { return xsize() * ysize() * stack.size(); } virtual void halve(RenderContext** r0, RenderContext** r1) const; void add(RenderContext* r) { stack.push_back(r); } private: std::list stack; // We prohibit external use of the default shallow copy // constructor and assignment operator (they're not needed, and we // doesn't like the semantics, precious. RenderContextStacked(const RenderContextStacked&); RenderContext& operator=(const RenderContext&); }; #endif