From 671bc3532d476cc780138a8a8d41c2d7cf46b13d Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 5 Sep 2012 23:11:55 +0200 Subject: menu: add some comments --- src/menu/drawable_control.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/menu/drawable_control.hpp') diff --git a/src/menu/drawable_control.hpp b/src/menu/drawable_control.hpp index ecee373d..eeb07079 100644 --- a/src/menu/drawable_control.hpp +++ b/src/menu/drawable_control.hpp @@ -44,11 +44,26 @@ namespace usdx private: static log4cpp::Category& log; + /** + * Coordinates of the top-left corner of the control. + */ Point position; + + /** + * Size of the control. + */ Dimension size; + /** + * If true, clipping is set-up before the component is drawn, to cut off + * all the drawing outside the specified size of the control. + */ bool clipping_required; + /** + * Background of the control. The background is drawn, before the real + * content is drawn. + */ Background* background; mutable boost::shared_mutex position_mutex; @@ -73,12 +88,20 @@ namespace usdx bool get_clipping_required(void) const; void set_clipping_required(const bool); + /** + * Function get called, if the control should draw itself it the + * current position on the OpenGL screen. If clipping is required, the + * clipping gets set-up before this function gets called. + */ virtual void draw(void); public: DrawableControl(Container*); virtual ~DrawableControl(); + /** + * Force the control to redraw it self. + */ void repaint(void); virtual void set_position(const Point& position); -- cgit v1.2.3