citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 7072fbcb820d59021957be9e764a4b3f103976cb
parent 66e0540b52c9bf057ec362e714d2e1d10add5d0b
Author: kyle <kyle@getaddrinfo.net>
Date:   Wed, 28 Oct 2015 22:39:12 -0600

viewer: drawables must be idleable

don't make a distinction between the two as generally both are going to be
wanted.

Diffstat:
Mviewer/draw.h | 4----
Mviewer/text.cpp | 5+++++
Mviewer/text.h | 1+
Mviewer/viewer.cpp | 4+---
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/viewer/draw.h b/viewer/draw.h @@ -13,10 +13,6 @@ struct point { class drawable { public: virtual void draw() = 0; -}; - -class idleable { -public: virtual void idle() = 0; }; diff --git a/viewer/text.cpp b/viewer/text.cpp @@ -134,3 +134,8 @@ text::draw() render_text("The Transparent Green Fox Jumps Over The Lazy Dog", -1 + 8 * sx, 1 - 380 * sy, sx, sy); render_text("The Transparent Green Fox Jumps Over The Lazy Dog", -1 + 18 * sx, 1 - 440 * sy, sx, sy); } + +void +text::idle() +{ +} diff --git a/viewer/text.h b/viewer/text.h @@ -14,6 +14,7 @@ class text : public drawable { public: text(); void draw(); + void idle(); private: std::string font_file_name; FT_Library ft; diff --git a/viewer/viewer.cpp b/viewer/viewer.cpp @@ -21,7 +21,6 @@ public: private: static std::vector<drawable*> drawables; - static std::vector<idleable*> idleables; static af_unix_nonblock socket; static void display(); static void idle(); @@ -29,7 +28,6 @@ private: // fuckin c++ std::vector<drawable*> window::drawables; -std::vector<idleable*> window::idleables; af_unix_nonblock window::socket; window::window(int argc, char *argv[]) @@ -91,7 +89,7 @@ window::idle(void) socket.accept_one(); socket.read(); - for (auto &i : idleables) + for (auto &i : drawables) i->idle(); }