diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-04-11 21:19:48 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-13 22:40:52 +0100 |
commit | e0e9997a5e92ce2a31f0ff4d139109be4434105b (patch) | |
tree | e8c3baa67eb65ffc16a9c96fdbb067d142f194bd /src/menu/drawable_control.hpp | |
parent | 40caf6163ff2e1274d71146c207fbde0c099b089 (diff) | |
download | usdx-e0e9997a5e92ce2a31f0ff4d139109be4434105b.tar.gz usdx-e0e9997a5e92ce2a31f0ff4d139109be4434105b.tar.xz usdx-e0e9997a5e92ce2a31f0ff4d139109be4434105b.zip |
menu: generalized frame_background to background
background could now be a background for all DrawableControl instances
each subclass should call the parents draw() during executing the
draw() method for background painting
TODO: background should know the size of the control to only draw the
background there
Diffstat (limited to '')
-rw-r--r-- | src/menu/drawable_control.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/menu/drawable_control.hpp b/src/menu/drawable_control.hpp index 261f0514..fa1fdd4d 100644 --- a/src/menu/drawable_control.hpp +++ b/src/menu/drawable_control.hpp @@ -35,6 +35,7 @@ #include "control.hpp" #include "utils/point.hpp" #include "utils/dimension.hpp" +#include "background.hpp" namespace usdx { @@ -50,9 +51,12 @@ namespace usdx bool clipping_required; + Background* background; + boost::mutex position_mutex; boost::mutex size_mutex; boost::mutex clipping_required_mutex; + boost::mutex background_mutex; protected: Container* parent; @@ -71,6 +75,8 @@ namespace usdx bool get_clipping_required(void) const; void set_clipping_required(const bool); + virtual void draw(void); + public: DrawableControl(Container*); virtual ~DrawableControl(); @@ -92,6 +98,9 @@ namespace usdx int get_height(void) const; void remove_parent(void); + + void set_background(Background*); + const Background* get_background(void) const; }; }; |