diff options
| author | Max Horn | 2008-12-27 14:30:30 +0000 | 
|---|---|---|
| committer | Max Horn | 2008-12-27 14:30:30 +0000 | 
| commit | 69f4b7a38388c444d2911d07a3636a65dd1a4d20 (patch) | |
| tree | 30226f3b0bc736fdb8dbd4f87e5fb5d6960080c0 /gui/ThemeLayout.h | |
| parent | 109d55f8d331ec8d70442d20eccc7046c8901b27 (diff) | |
| download | scummvm-rg350-69f4b7a38388c444d2911d07a3636a65dd1a4d20.tar.gz scummvm-rg350-69f4b7a38388c444d2911d07a3636a65dd1a4d20.tar.bz2 scummvm-rg350-69f4b7a38388c444d2911d07a3636a65dd1a4d20.zip  | |
Got rid of ThemeLayout::getDialogData; added some comments, asserts; moved getParentW & getParentH to class ThemeLayoutStacked
svn-id: r35571
Diffstat (limited to 'gui/ThemeLayout.h')
| -rw-r--r-- | gui/ThemeLayout.h | 26 | 
1 files changed, 12 insertions, 14 deletions
diff --git a/gui/ThemeLayout.h b/gui/ThemeLayout.h index 0824893441..c32fa44528 100644 --- a/gui/ThemeLayout.h +++ b/gui/ThemeLayout.h @@ -77,8 +77,6 @@ public:  	}  protected: -	int16 getParentW(); -	int16 getParentH();  	int16 getWidth() { return _w; }  	int16 getHeight() { return _h; } @@ -104,13 +102,6 @@ protected:  public:  	virtual bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h); -	virtual bool getDialogData(int16 &x, int16 &y, uint16 &w, uint16 &h) { -		assert(getLayoutType() == kLayoutMain); -		x = _x; y = _y; -		w = _w; h = _h; -		return true; -	} -  	void importLayout(ThemeLayout *layout);  #ifdef LAYOUT_DEBUG_DIALOG @@ -148,11 +139,11 @@ public:  #ifdef LAYOUT_DEBUG_DIALOG  	const char *getName() const { return "Global Layout"; }  #endif -	LayoutType getLayoutType() { return kLayoutMain; } +protected: +	LayoutType getLayoutType() { return kLayoutMain; }  	ThemeLayout *makeClone(ThemeLayout *newParent) { assert(!"Do not copy Main Layouts!"); return 0; } -protected:  	int16 _defaultX;  	int16 _defaultY;  }; @@ -182,6 +173,10 @@ public:  	}  #endif +protected: +	int16 getParentW(); +	int16 getParentH(); +  	LayoutType getLayoutType() { return _type; }  	ThemeLayout *makeClone(ThemeLayout *newParent) { @@ -194,7 +189,6 @@ public:  		return n;  	} -protected:  	const LayoutType _type;  }; @@ -207,9 +201,12 @@ public:  	bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h);  	void reflowLayout() {} +  #ifdef LAYOUT_DEBUG_DIALOG  	virtual const char *getName() const { return _name.c_str(); }  #endif + +protected:  	LayoutType getLayoutType() { return kLayoutWidget; }  	ThemeLayout *makeClone(ThemeLayout *newParent) { @@ -218,7 +215,6 @@ public:  		return n;  	} -protected:  	Common::String _name;  }; @@ -236,11 +232,13 @@ public:  	bool getWidgetData(const Common::String &name, int16 &x, int16 &y, uint16 &w, uint16 &h) { return false; }  	void reflowLayout() {} -	LayoutType getLayoutType() { return kLayoutWidget; }  #ifdef LAYOUT_DEBUG_DIALOG  	const char *getName() const { return "SPACE"; }  #endif +protected: +	LayoutType getLayoutType() { return kLayoutWidget; } +  	ThemeLayout *makeClone(ThemeLayout *newParent) {  		ThemeLayout *n = new ThemeLayoutSpacing(*this);  		n->_parent = newParent;  | 
