// -*- c++ -*- #pragma once #ifndef __REFLEX_RUBY_VIEW_H__ #define __REFLEX_RUBY_VIEW_H__ #include #include #include #include #include #include #include #include namespace Reflex { Rucy::Class view_class (); // class Reflex::View template class RubyView : public Rucy::ClassWrapper { public: virtual bool show () { SYM(show); return this->value.call(show); } virtual bool hide () { SYM(hide); return this->value.call(hide); } virtual void update (float dt) { SYM(update); this->value.call(update, dt); } virtual void draw (Painter* p, const Bounds& b) { SYM(draw); this->value.call(draw, Rucy::value(p), Rucy::value(b)); } virtual void moved (coord dx, coord dy) { SYM(moved); this->value.call(moved, dx, dy); } virtual void resized (coord dwidth, coord dheight) { SYM(resized); this->value.call(resized, dwidth, dheight); } virtual void key_down (const Key& key) { SYM(key_down); this->value.call(key_down, Rucy::value(key)); } virtual void key_up (const Key& key) { SYM(key_up); this->value.call(key_up, Rucy::value(key)); } virtual void points_down (const Points& points) { SYM(points_down); this->value.call(points_down, Rucy::value(points)); } virtual void points_up (const Points& points) { SYM(points_up); this->value.call(points_up, Rucy::value(points)); } virtual void points_moved (const Points& points) { SYM(points_moved); this->value.call(points_moved, Rucy::value(points)); } };// RubyView }// Reflex RUCY_WRAPPER_VALUE_FROM_TO(Reflex::View, Reflex::view_class()) #endif//EOH