aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;