aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/drawable_control.hpp
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-03-22 22:33:22 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-05 17:17:52 +0100
commit3d6a2c963c24212a0650f6dce5c1a47899f0e387 (patch)
tree5c69cee69b43c5e049a9bde34a4fd4fd77bb7b86 /src/menu/drawable_control.hpp
parent37d83729fd3bc90930c4f7a9aa2ec8fdf21b9fed (diff)
downloadusdx-3d6a2c963c24212a0650f6dce5c1a47899f0e387.tar.gz
usdx-3d6a2c963c24212a0650f6dce5c1a47899f0e387.tar.xz
usdx-3d6a2c963c24212a0650f6dce5c1a47899f0e387.zip
menu/drawable_control: added position, glTransform to position before drawing
software_mouse_pointer does not need an own position anymore and simply draw it without position change
Diffstat (limited to 'src/menu/drawable_control.hpp')
-rw-r--r--src/menu/drawable_control.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/menu/drawable_control.hpp b/src/menu/drawable_control.hpp
index de3881c5..e954f291 100644
--- a/src/menu/drawable_control.hpp
+++ b/src/menu/drawable_control.hpp
@@ -28,10 +28,12 @@
#define DRAWABLE_CONTROL_HPP
#include <SDL/SDL.h>
+#include <boost/thread/mutex.hpp>
#include <log4cpp/Category.hh>
#include "drawable.hpp"
#include "control.hpp"
+#include "utils/point.hpp"
namespace usdx
{
@@ -42,6 +44,9 @@ namespace usdx
private:
static log4cpp::Category& log;
+ Point<int> position;
+
+ boost::mutex position_mutex;
protected:
Container* parent;
@@ -61,6 +66,13 @@ namespace usdx
virtual ~DrawableControl();
void repaint(void);
+
+ void set_position(const Point<int>& position);
+ void set_position(int left, int top);
+
+ const Point<int>& get_position(void) const;
+ int get_left(void) const;
+ int get_top(void) const;
};
};