#include "Component.h" extern terminal term; Component::Component(int x1, int y1, int x2, int y2): Rectangle(x1, y1, x2, y2){ } void Component::erase(){ term.savecur(); for (int i = getUprl().second; i <= getLowr().second; i++){ term.curmove(getUprl().first, i); term.clrchrs(getLowr().first - getUprl().first + 1); } term.restcur(); } Component::~Component(){} void Component::enter(){} void Component::leave(){} void Component::centralize(int& x, int& y, int strsiz){ x = getUprl().first + (getLowr().first - getUprl().first)/2 - strsiz/2 + (strsiz%2 == 0?1:0); y = getUprl().second + (getLowr().second - getUprl().second)/2; }