#include <list>
#include <stdexcept>
+#include <msp/core/noncopyable.h>
#include "layout.h"
#include "mspgltk_api.h"
arrangement_error(const std::string &w): std::logic_error(w) { }
};
-class MSPGLTK_API Arrangement
+class MSPGLTK_API Arrangement: public NonCopyable
{
protected:
enum Side
namespace Msp {
namespace GLtk {
+CachedPart::CachedPart(CachedPart &&other):
+ part(other.part),
+ texture(other.texture),
+ mesh(other.mesh)
+{
+ other.mesh = nullptr;
+}
+
+CachedPart &CachedPart::operator=(CachedPart &&other)
+{
+ delete mesh;
+ part = other.part;
+ texture = other.texture;
+ mesh = other.mesh;
+ other.mesh = nullptr;
+ return *this;
+}
+
CachedPart::~CachedPart()
{
delete mesh;
const GL::Texture2D *texture = nullptr;
GL::Mesh *mesh = nullptr;
+ CachedPart() = default;
+ CachedPart(CachedPart &&);
+ CachedPart &operator=(CachedPart &&);
~CachedPart();
};
#define MSP_GLTK_WIDGET_H_
#include <string>
+#include <msp/core/noncopyable.h>
#include <msp/datafile/objectloader.h>
#include <msp/gl/renderer.h>
#include "geometry.h"
/**
Base class for all widgets.
*/
-class MSPGLTK_API Widget
+class MSPGLTK_API Widget: public NonCopyable
{
friend class Container;
Time::TimeDelta anim_interval;
Widget() = default;
-private:
- Widget(const Widget &);
- Widget &operator=(const Widget &);
public:
virtual ~Widget();