summaryrefslogtreecommitdiff
path: root/src/gui/widgets/widget2.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-23 22:11:54 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-23 23:22:45 +0300
commit89694323abffb1c73c85d49460991b3e6f20f098 (patch)
treee4c11c4236bec6db774dd56925335a1535568ef8 /src/gui/widgets/widget2.h
parent0c3a1befd07924ce17ce2051eb45e60776480830 (diff)
downloadplus-89694323abffb1c73c85d49460991b3e6f20f098.tar.gz
plus-89694323abffb1c73c85d49460991b3e6f20f098.tar.bz2
plus-89694323abffb1c73c85d49460991b3e6f20f098.tar.xz
plus-89694323abffb1c73c85d49460991b3e6f20f098.zip
Move window variable from widget class to widget2 class.
Diffstat (limited to 'src/gui/widgets/widget2.h')
-rw-r--r--src/gui/widgets/widget2.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/widgets/widget2.h b/src/gui/widgets/widget2.h
index c8ee90406..2fdb8b12b 100644
--- a/src/gui/widgets/widget2.h
+++ b/src/gui/widgets/widget2.h
@@ -23,6 +23,8 @@
#include "gui/theme.h"
+class Widget;
+
class Widget2 notfinal
{
public:
@@ -76,15 +78,27 @@ class Widget2 notfinal
mForegroundColor2 = color;
}
+ Widget* getWindow() const A_WARN_UNUSED
+ {
+ return mWindow;
+ }
+
+ virtual void setWindow(Widget *const window)
+ {
+ mWindow = window;
+ }
+
protected:
explicit Widget2(const Widget2 *const widget) :
mPaletteOffset(widget ? widget->mPaletteOffset : 0),
+ mWindow(widget ? widget->getWindow() : nullptr),
mForegroundColor2()
{
checkPalette();
}
int mPaletteOffset;
+ Widget *mWindow;
Color mForegroundColor2;
};