get rid of window refresh

This commit is contained in:
2025-07-31 16:13:13 +02:00
parent 3e9b7b4326
commit 48d2089b69
4 changed files with 2 additions and 5 deletions

View File

@@ -97,7 +97,7 @@ public:
return *_grid[x][y];
}
void refresh() override {
void refresh() {
for (int i = 0; i < nWidth; ++i) {
for (int j = 0; j < nHeight; ++j) {
if (i == _current_focus_x && j == _current_focus_y) {

View File

@@ -57,7 +57,6 @@ public:
template<typename WindowType, typename... Args>
void set_window(Args&&... args) {
_window = std::make_unique<WindowType>(static_cast<Derived*>(this), std::forward<Args>(args)...);
_window->refresh();
}
Surface(const Surface& other) = delete;

View File

@@ -38,7 +38,7 @@ public:
return EventHandlingResult::DONE;
}
void refresh() override {
void refresh() {
this->_owner->clear();
size_t _max_col = this->_owner->get_width() / 8;
size_t _max_row = this->_owner->get_height() / 16;

View File

@@ -25,8 +25,6 @@ public:
// static_assert(is_specialization_of<Surface, SurfaceType>::value);
}
virtual void refresh() = 0;
virtual ~Window() = default;
EventHandlingResult handle(auto Event) { return handle_v(Event); }