Changeset - r25138:e5e59d0df7ea
[Not reviewed]
master
0 1 0
Niels Martin Hansen - 3 years ago 2021-04-04 08:34:37
nielsm@indvikleren.dk
Add: NWidgetBase::GetCurrentRect function
1 file changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/widget_type.h
Show inline comments
 
@@ -158,6 +158,16 @@ public:
 
	virtual void Draw(const Window *w) = 0;
 
	virtual void SetDirty(const Window *w) const;
 

	
 
	Rect GetCurrentRect() const
 
	{
 
		Rect r;
 
		r.left = this->pos_x;
 
		r.top = this->pos_y;
 
		r.right = this->pos_x + this->current_x;
 
		r.bottom = this->pos_y + this->current_y;
 
		return r;
 
	}
 

	
 
	WidgetType type;      ///< Type of the widget / nested widget.
 
	uint fill_x;          ///< Horizontal fill stepsize (from initial size, \c 0 means not resizable).
 
	uint fill_y;          ///< Vertical fill stepsize (from initial size, \c 0 means not resizable).
0 comments (0 inline, 0 general)