From 780382ab640815e8e92c59d9147432df855359b4 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 14 Sep 2012 22:26:19 +0200 Subject: menu: add some comments --- src/menu/drawable.hpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'src/menu/drawable.hpp') diff --git a/src/menu/drawable.hpp b/src/menu/drawable.hpp index 74ecef94..08471471 100644 --- a/src/menu/drawable.hpp +++ b/src/menu/drawable.hpp @@ -33,11 +33,21 @@ namespace usdx class Drawable { private: + /** + * Whether the drawable should be visible at the moment or not. + */ bool visible; protected: /** - * Pure virtual method, that descendant classes have to implement. + * Pure virtual method, that descendant classes have to + * implement. It should contain all actions that are required for + * displaying this drawable. This methoed gets allways called from the + * same thread, from that the video output is initialized at programm + * start. + * + * WARNING: This method should not be called manually. If you want to + * request, that a drawable is redrawn, use repaint() instead. */ virtual void draw(void) = 0; @@ -46,17 +56,17 @@ namespace usdx virtual ~Drawable(void) {}; /** - * Method for redraw this Object. If visible issues draw. + * Method for redraw this object. If visible executes the draw method. */ - void repaint(void); + virtual void repaint(void); /** - * Setter for visible. + * Set if the drawable should be visible. */ virtual void set_visible(bool value); /** - * Getter for visible. + * Returns whether the drawable should be visible. */ virtual const bool is_visible(void) const; }; -- cgit v1.2.3