aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/background.hpp
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-04-15 22:50:28 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-13 22:40:52 +0100
commit816030e73aad13c39bc84ca6fdb814ba7131f19f (patch)
treeead3c4c691b3db7f396982327307c5da6ca99855 /src/menu/background.hpp
parente0e9997a5e92ce2a31f0ff4d139109be4434105b (diff)
downloadusdx-816030e73aad13c39bc84ca6fdb814ba7131f19f.tar.gz
usdx-816030e73aad13c39bc84ca6fdb814ba7131f19f.tar.xz
usdx-816030e73aad13c39bc84ca6fdb814ba7131f19f.zip
menu/background: backgrounds get to know the parent component
Backgrounds now know the parent control, they are painted in, to query the size. Backgrounds are not allowed to use glClear anymore, should only draw something during the extend of the parent control and should take care to do not modify the opengl cursor position.
Diffstat (limited to '')
-rw-r--r--src/menu/background.hpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/menu/background.hpp b/src/menu/background.hpp
index 4f997700..050b7d6c 100644
--- a/src/menu/background.hpp
+++ b/src/menu/background.hpp
@@ -31,19 +31,26 @@
namespace usdx
{
+ class DrawableControl;
+
// Background - abstract class for Backgrounds
class Background : public Drawable
{
- public:
- virtual ~Background() {};
+ private:
+ const DrawableControl& parent;
protected:
// abstract base class
- Background() {};
+ Background(const DrawableControl&);
// no copy and no assignment
Background(const Background&);
Background& operator=(const Background&);
+
+ public:
+ virtual ~Background();
+
+ const DrawableControl& get_parent(void) const;
};
};