Skip to content
Snippets Groups Projects
Commit adbd4269 authored by Joakim Hunskaar's avatar Joakim Hunskaar
Browse files

added getters for width and height, and new function setSize

parent f658094e
No related branches found
No related tags found
No related merge requests found
......@@ -32,5 +32,8 @@ namespace TDT4102 {
void setCallback(std::function<void(void)> callback);
virtual ~Widget() {}
void setVisible(bool isVisible);
unsigned int getWidth() const;
unsigned int getHeight() const;
void setSize(unsigned int newWidth, unsigned int newHeight);
};
}
\ No newline at end of file
......@@ -18,4 +18,17 @@ TDT4102::Widget::Widget(TDT4102::Point location, unsigned int widgetWidth, unsig
void TDT4102::Widget::setVisible(bool visible) {
isVisible = visible;
}
unsigned int TDT4102::Widget::getWidth() const {
return width;
}
unsigned int TDT4102::Widget::getHeight() const {
return height;
}
void TDT4102::Widget::setSize(unsigned int newWidth, unsigned int newHeight) {
width = newWidth;
height = newHeight;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment