diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-09-14 22:26:19 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-13 22:41:06 +0100 |
commit | 780382ab640815e8e92c59d9147432df855359b4 (patch) | |
tree | 46042fa245aa4002dc2188b2f1722bce130c1313 /src/menu/drawable.hpp | |
parent | c85f1cde101d5c6c8912c1131d4d43a828d87015 (diff) | |
download | usdx-780382ab640815e8e92c59d9147432df855359b4.tar.gz usdx-780382ab640815e8e92c59d9147432df855359b4.tar.xz usdx-780382ab640815e8e92c59d9147432df855359b4.zip |
menu: add some comments
Diffstat (limited to 'src/menu/drawable.hpp')
-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; }; |