diff options
Diffstat (limited to '')
-rw-r--r-- | src/menu/drawable.hpp | 20 |
1 files changed, 15 insertions, 5 deletions
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; }; |