aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-09-05 23:11:55 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-13 22:40:53 +0100
commit671bc3532d476cc780138a8a8d41c2d7cf46b13d (patch)
tree40dd9ef04f937eb3149d66fe7b9a080ee09fcfcc
parent5038f3c64d97c71d2d1048638fb4bc1a32ad6a31 (diff)
downloadusdx-671bc3532d476cc780138a8a8d41c2d7cf46b13d.tar.gz
usdx-671bc3532d476cc780138a8a8d41c2d7cf46b13d.tar.xz
usdx-671bc3532d476cc780138a8a8d41c2d7cf46b13d.zip
menu: add some comments
-rw-r--r--src/menu/drawable_control.hpp23
-rw-r--r--src/menu/text.hpp5
2 files changed, 25 insertions, 3 deletions
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<int> position;
+
+ /**
+ * Size of the control.
+ */
Dimension<int> 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<int>& position);
diff --git a/src/menu/text.hpp b/src/menu/text.hpp
index d32a2523..7a57adab 100644
--- a/src/menu/text.hpp
+++ b/src/menu/text.hpp
@@ -48,9 +48,8 @@ namespace usdx
std::string text;
/**
- * If true, only the left and top coordinates of the bounds
- * are used. If false and if the text is longer than the
- * rectangle, it should be cut off.
+ * If true, the text may overlap the rectangle of the control, otherwise
+ * it will be cut off, if the text is larger than the rectangle.
*/
bool auto_size;